From fb3dcd30a44122aca3efbfd5ca095fdbeefe47a1 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 16 Nov 2023 14:26:15 -0600 Subject: [PATCH 001/130] WIP add delgation support --- Anchor.toml | 6 + Cargo.lock | 9 + Cargo.toml | 1 + package.json | 5 +- packages/crons/package.json | 2 +- packages/crons/yarn.deploy.lock | 41 ++- packages/data-credits-sdk/yarn.deploy.lock | 37 +- packages/distributor-oracle/yarn.deploy.lock | 37 +- packages/entity-invalidator/yarn.deploy.lock | 37 +- packages/helium-admin-cli/yarn.deploy.lock | 37 +- .../yarn.deploy.lock | 37 +- packages/helium-sub-daos-sdk/yarn.deploy.lock | 37 +- packages/hotspot-utils/yarn.deploy.lock | 37 +- packages/metadata-service/yarn.deploy.lock | 37 +- packages/migration-service/yarn.deploy.lock | 37 +- .../yarn.deploy.lock | 37 +- packages/monitor-service/yarn.deploy.lock | 37 +- .../voter-stake-registry-hooks/package.json | 3 +- .../src/contexts/heliumVsrContext.tsx | 42 ++- .../src/hooks/useDelegations.ts | 12 + .../src/hooks/useRelinquishVote.ts | 18 +- .../src/hooks/useVote.ts | 21 ++ .../src/hooks/useVotingDelegatePositions.ts | 53 +++ .../src/sdk/types.ts | 6 + .../src/utils/getPositionKeys.ts | 27 +- .../yarn.deploy.lock | 46 ++- .../voter-stake-registry-sdk/package.json | 1 + .../voter-stake-registry-sdk/src/resolvers.ts | 23 +- .../voter-stake-registry-sdk/yarn.deploy.lock | 37 +- .../vsr-metadata-service/yarn.deploy.lock | 37 +- packages/xnft-hotspot/yarn.deploy.lock | 37 +- programs/voter-stake-registry/Cargo.toml | 1 + .../delegated_relinquish_vote_v0.rs | 109 ++++++ .../src/instructions/delegated_vote_v0.rs | 126 +++++++ .../instructions/initialize_registrar_v0.rs | 10 +- .../src/instructions/mod.rs | 6 + .../src/instructions/relinquish_vote_v1.rs | 7 +- .../src/instructions/update_registrar_v0.rs | 26 ++ .../src/instructions/vote_v0.rs | 4 + programs/voter-stake-registry/src/lib.rs | 15 + .../voter-stake-registry/src/state/marker.rs | 5 + .../src/state/registrar.rs | 3 +- tests/voter-stake-registry.ts | 179 +++++++++- utils/nft-delegation/Cargo.toml | 20 ++ utils/nft-delegation/idl.json | 332 ++++++++++++++++++ utils/nft-delegation/src/lib.rs | 5 + yarn.lock | 112 +++--- 47 files changed, 1673 insertions(+), 121 deletions(-) create mode 100644 packages/voter-stake-registry-hooks/src/hooks/useDelegations.ts create mode 100644 packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts create mode 100644 programs/voter-stake-registry/src/instructions/delegated_relinquish_vote_v0.rs create mode 100644 programs/voter-stake-registry/src/instructions/delegated_vote_v0.rs create mode 100644 programs/voter-stake-registry/src/instructions/update_registrar_v0.rs create mode 100644 utils/nft-delegation/Cargo.toml create mode 100644 utils/nft-delegation/idl.json create mode 100644 utils/nft-delegation/src/lib.rs diff --git a/Anchor.toml b/Anchor.toml index b8f38edb5..39ad04d66 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -74,6 +74,12 @@ address = "propFYxqmVcufMhk5esNMrexq2ogHbbC2kP9PU1qxKs" # Proposal [[test.validator.clone]] address = "66t3XARU6Ja3zj91gDZ2KoNLJHEMTYPSKqJWYb6PJJBA" # Proposal IDL +[[test.validator.clone]] +address = "nde169MVKXLYbtDbrTF8wiJc8KYJRvLXKAzHApZ5vvD" # NFT Delegation + +[[test.validator.clone]] +address = "5612ANVGVnwJRuvKJ1uSmky3A2mCfFDAi6DaK9xoZRp9" # NFT Delegation IDL + # Pyth price oracle [[test.validator.clone]] address = "7moA1i5vQUpfDwSpK6Pw9s56ahB7WFGidtbL2ujWrVvm" diff --git a/Cargo.lock b/Cargo.lock index 0339d04ca..fe30801da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2552,6 +2552,14 @@ dependencies = [ "thiserror", ] +[[package]] +name = "nft-delegation" +version = "0.0.2" +dependencies = [ + "anchor-gen", + "anchor-lang", +] + [[package]] name = "nix" version = "0.26.4" @@ -5750,6 +5758,7 @@ dependencies = [ "itertools", "log", "mpl-token-metadata", + "nft-delegation", "proposal", "serde", "shared-utils", diff --git a/Cargo.toml b/Cargo.toml index 322f6e586..b3b6ff1ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ members = [ "programs/*", "utils/proposal", + "utils/nft-delegation", ] exclude = [ "deps/metaplex-program-library/bubblegum/program", diff --git a/package.json b/package.json index 97417acfd..e5830a931 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,9 @@ "@coral-xyz/anchor-cli": "^0.28.0", "@coral-xyz/borsh": "^0.2.6", "@helium/crypto": "^4.10.2", - "@helium/modular-governance-idls": "^0.0.2", - "@helium/proposal-sdk": "^0.0.2", + "@helium/modular-governance-idls": "0.0.8-next.5+4c12e2f", + "@helium/nft-delegation-sdk": "0.0.8-next.5+4c12e2f", + "@helium/proposal-sdk": "0.0.8-next.5+4c12e2f", "@helium/transactions": "^3.38.0", "@metaplex-foundation/mpl-bubblegum": "^0.7.0", "@pythnetwork/client": "^2.8.0", diff --git a/packages/crons/package.json b/packages/crons/package.json index 664d642f2..9e0f3c8e0 100644 --- a/packages/crons/package.json +++ b/packages/crons/package.json @@ -46,7 +46,7 @@ "@helium/rewards-burn-sdk": "^0.6.1", "@helium/rewards-oracle-sdk": "^0.6.1", "@helium/spl-utils": "^0.6.1", - "@helium/state-controller-sdk": "^0.0.8", + "@helium/state-controller-sdk": "0.0.8-next.5+4c12e2f", "@helium/treasury-management-sdk": "^0.6.1", "@helium/voter-stake-registry-sdk": "^0.6.1", "@solana/spl-token": "^0.3.8", diff --git a/packages/crons/yarn.deploy.lock b/packages/crons/yarn.deploy.lock index de4083a96..31e6fc64e 100644 --- a/packages/crons/yarn.deploy.lock +++ b/packages/crons/yarn.deploy.lock @@ -138,6 +138,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -185,7 +197,7 @@ __metadata: "@helium/rewards-burn-sdk": ^0.6.1 "@helium/rewards-oracle-sdk": ^0.6.1 "@helium/spl-utils": ^0.6.1 - "@helium/state-controller-sdk": ^0.0.8 + "@helium/state-controller-sdk": 0.0.8-next.5+4c12e2f "@helium/treasury-management-sdk": ^0.6.1 "@helium/voter-stake-registry-sdk": ^0.6.1 "@solana/spl-token": ^0.3.8 @@ -363,7 +375,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -373,6 +385,18 @@ __metadata: languageName: node linkType: hard +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/organization-sdk@npm:^0.0.8": version: 0.0.8 resolution: "@helium/organization-sdk@npm:0.0.8" @@ -465,14 +489,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/state-controller-sdk@npm:^0.0.8": - version: 0.0.8 - resolution: "@helium/state-controller-sdk@npm:0.0.8" +"@helium/state-controller-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.5" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8 - checksum: 64ff3e83d47512431bdb15d9bda92225455b00099574d3ac4d523696e21ea1a08430d8c75d47390121920c67eacbde4ec91b02c4a36f2e8be038c36aac2b4c08 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + checksum: 67a94a895baa71dd6bbe817fda5bb476b07400e21d0e9e8213e0699dc05dca64684674661cde57f4002db20677d6d34e6e03e8e06a698dc05e085dfdae5deb14 languageName: node linkType: hard @@ -500,6 +524,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -706,7 +731,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/data-credits-sdk/yarn.deploy.lock b/packages/data-credits-sdk/yarn.deploy.lock index b025b8551..c44db6045 100644 --- a/packages/data-credits-sdk/yarn.deploy.lock +++ b/packages/data-credits-sdk/yarn.deploy.lock @@ -72,6 +72,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/circuit-breaker-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk" @@ -140,6 +152,28 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/treasury-management-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/treasury-management-sdk@workspace:packages/treasury-management-sdk" @@ -164,6 +198,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -324,7 +359,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/distributor-oracle/yarn.deploy.lock b/packages/distributor-oracle/yarn.deploy.lock index 22f0c47d7..9cfb1a1d7 100644 --- a/packages/distributor-oracle/yarn.deploy.lock +++ b/packages/distributor-oracle/yarn.deploy.lock @@ -138,6 +138,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -290,6 +302,28 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/rewards-burn-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/rewards-burn-sdk@workspace:packages/rewards-burn-sdk" @@ -368,6 +402,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -574,7 +609,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/entity-invalidator/yarn.deploy.lock b/packages/entity-invalidator/yarn.deploy.lock index bbb2e6db6..711384568 100644 --- a/packages/entity-invalidator/yarn.deploy.lock +++ b/packages/entity-invalidator/yarn.deploy.lock @@ -94,6 +94,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -221,6 +233,28 @@ __metadata: languageName: node linkType: hard +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/rewards-burn-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/rewards-burn-sdk@workspace:packages/rewards-burn-sdk" @@ -283,6 +317,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -459,7 +494,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/helium-admin-cli/yarn.deploy.lock b/packages/helium-admin-cli/yarn.deploy.lock index fc7fbf2cb..e40cff6b6 100644 --- a/packages/helium-admin-cli/yarn.deploy.lock +++ b/packages/helium-admin-cli/yarn.deploy.lock @@ -173,6 +173,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -427,6 +439,28 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/price-oracle-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/price-oracle-sdk@workspace:packages/price-oracle-sdk" @@ -520,6 +554,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -741,7 +776,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.22.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.73.2, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.22.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.73.2, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/helium-entity-manager-sdk/yarn.deploy.lock b/packages/helium-entity-manager-sdk/yarn.deploy.lock index 4a9eb344c..f3e97e853 100644 --- a/packages/helium-entity-manager-sdk/yarn.deploy.lock +++ b/packages/helium-entity-manager-sdk/yarn.deploy.lock @@ -94,6 +94,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -190,6 +202,28 @@ __metadata: languageName: node linkType: hard +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/rewards-burn-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/rewards-burn-sdk@workspace:packages/rewards-burn-sdk" @@ -252,6 +286,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -428,7 +463,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/helium-sub-daos-sdk/yarn.deploy.lock b/packages/helium-sub-daos-sdk/yarn.deploy.lock index c7844cd7d..b0a55c82d 100644 --- a/packages/helium-sub-daos-sdk/yarn.deploy.lock +++ b/packages/helium-sub-daos-sdk/yarn.deploy.lock @@ -72,6 +72,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/circuit-breaker-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk" @@ -120,6 +132,28 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/treasury-management-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/treasury-management-sdk@workspace:packages/treasury-management-sdk" @@ -144,6 +178,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -304,7 +339,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/hotspot-utils/yarn.deploy.lock b/packages/hotspot-utils/yarn.deploy.lock index f007e96f7..218f5f89e 100644 --- a/packages/hotspot-utils/yarn.deploy.lock +++ b/packages/hotspot-utils/yarn.deploy.lock @@ -94,6 +94,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -204,6 +216,28 @@ __metadata: languageName: node linkType: hard +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/rewards-burn-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/rewards-burn-sdk@workspace:packages/rewards-burn-sdk" @@ -266,6 +300,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -442,7 +477,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/metadata-service/yarn.deploy.lock b/packages/metadata-service/yarn.deploy.lock index 82ecf84df..e5471dfc7 100644 --- a/packages/metadata-service/yarn.deploy.lock +++ b/packages/metadata-service/yarn.deploy.lock @@ -138,6 +138,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -269,6 +281,28 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/rewards-burn-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/rewards-burn-sdk@workspace:packages/rewards-burn-sdk" @@ -331,6 +365,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -507,7 +542,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/migration-service/yarn.deploy.lock b/packages/migration-service/yarn.deploy.lock index 0d17efa5b..4b64ae959 100644 --- a/packages/migration-service/yarn.deploy.lock +++ b/packages/migration-service/yarn.deploy.lock @@ -183,6 +183,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -432,6 +444,28 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/rewards-burn-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/rewards-burn-sdk@workspace:packages/rewards-burn-sdk" @@ -510,6 +544,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -728,7 +763,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.73.2, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.73.2, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/mobile-entity-manager-sdk/yarn.deploy.lock b/packages/mobile-entity-manager-sdk/yarn.deploy.lock index c10576d1c..0a1ccd6e8 100644 --- a/packages/mobile-entity-manager-sdk/yarn.deploy.lock +++ b/packages/mobile-entity-manager-sdk/yarn.deploy.lock @@ -94,6 +94,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -208,6 +220,28 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/rewards-burn-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/rewards-burn-sdk@workspace:packages/rewards-burn-sdk" @@ -270,6 +304,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -446,7 +481,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/monitor-service/yarn.deploy.lock b/packages/monitor-service/yarn.deploy.lock index 3a01c6b8c..ec97a167d 100644 --- a/packages/monitor-service/yarn.deploy.lock +++ b/packages/monitor-service/yarn.deploy.lock @@ -128,6 +128,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -262,6 +274,16 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + "@helium/monitor-service@workspace:.": version: 0.0.0-use.local resolution: "@helium/monitor-service@workspace:." @@ -295,6 +317,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/rewards-burn-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/rewards-burn-sdk@workspace:packages/rewards-burn-sdk" @@ -357,6 +391,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -533,7 +568,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/voter-stake-registry-hooks/package.json b/packages/voter-stake-registry-hooks/package.json index ecb125035..62172f7be 100644 --- a/packages/voter-stake-registry-hooks/package.json +++ b/packages/voter-stake-registry-hooks/package.json @@ -36,7 +36,8 @@ "@helium/account-fetch-cache-hooks": "^0.6.1", "@helium/helium-react-hooks": "^0.6.1", "@helium/helium-sub-daos-sdk": "^0.6.1", - "@helium/modular-governance-hooks": "^0.0.8", + "@helium/modular-governance-hooks": "0.0.8-next.5+4c12e2f", + "@helium/nft-delegation-sdk": "0.0.8-next.5+4c12e2f", "@helium/spl-utils": "^0.6.1", "@helium/voter-stake-registry-sdk": "^0.6.1", "@metaplex-foundation/js": "^0.19.4", diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index e500b8957..0498769b7 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -1,4 +1,4 @@ -import { AnchorProvider, BN, Wallet } from "@coral-xyz/anchor"; +import { AnchorProvider, BN, Program, Wallet } from "@coral-xyz/anchor"; import { useSolanaUnixNow } from "@helium/helium-react-hooks"; import { EPOCH_LENGTH, @@ -24,6 +24,10 @@ import { } from "../utils/getPositionKeys"; import { truthy } from "@helium/spl-utils"; import { Connection, PublicKey } from "@solana/web3.js"; +import { delegationKey, init } from "@helium/nft-delegation-sdk"; +import { useDelegations } from "../hooks/useDelegations"; +import { NftDelegation } from "@helium/modular-governance-idls/lib/types/nft_delegation"; +import { positionKey } from "@helium/voter-stake-registry-sdk"; export interface HeliumVsrState { amountLocked?: BN; @@ -74,6 +78,8 @@ export const HeliumVsrStateProvider: React.FC<{ }); } }, [connection?.rpcEndpoint, wallet?.publicKey?.toBase58()]); + const me = useMemo(() => wallet?.publicKey, [wallet?.publicKey?.toBase58()]); + /// Allow refetching all NFTs by incrementing call index const [callIndex, setCallIndex] = useState(0); const refetch = useCallback(() => setCallIndex((i) => i + 1), [setCallIndex]); @@ -98,7 +104,7 @@ export const HeliumVsrStateProvider: React.FC<{ const { result, loading, error } = useAsync( async (args: GetPosArgs | undefined) => { if (args) { - return getPositionKeys(args); + return await getPositionKeys(args); } }, [args] @@ -108,9 +114,23 @@ export const HeliumVsrStateProvider: React.FC<{ }, [result?.positionKeys]); const { accounts: delegatedAccounts, loading: loadingDel } = useDelegatedPositions(delegatedPositionKeys); - const { accounts: positions, loading: loadingPositions } = usePositions( - result?.positionKeys + + const delegationKeys = useMemo(() => { + return me && result?.nfts.map((nft) => delegationKey(nft.address!, me)[0]); + }, [result?.nfts, me?.toBase58()]); + const { accounts: delegationAccounts, loading: loadingDelegations } = + useDelegations(delegationKeys); + + const allPositions = useMemo( + () => [ + ...(result?.positionKeys || []), + ...(result?.votingDelegatedPositionKeys || []), + ], + [result?.positionKeys, result?.votingDelegatedPositionKeys] ); + const myOwnedPositionsEndIdx = result?.positionKeys?.length; + const { accounts: positions, loading: loadingPositions } = + usePositions(allPositions); const now = useSolanaUnixNow(60 * 5 * 1000); const { amountLocked, votingPower, positionsWithMeta } = useMemo(() => { @@ -122,6 +142,7 @@ export const HeliumVsrStateProvider: React.FC<{ .map((position, idx) => { if (position && position.info) { const isDelegated = !!delegatedAccounts?.[idx]?.info; + const delegation = delegationAccounts?.[idx]?.info; const delegatedSubDao = isDelegated ? delegatedAccounts[idx]?.info?.subDao : null; @@ -151,6 +172,11 @@ export const HeliumVsrStateProvider: React.FC<{ hasGenesisMultiplier: position.info.genesisEnd.gt(new BN(now)), votingPower: posVotingPower, votingMint: mintCfgs[position.info.votingMintConfigIdx], + isVotingDelegatedToMe: idx >= (myOwnedPositionsEndIdx || 0), + votingDelegation: { + ...delegation, + address: delegationAccounts?.[idx]?.publicKey, + }, } as PositionWithMeta; } }) @@ -164,7 +190,13 @@ export const HeliumVsrStateProvider: React.FC<{ } return {}; - }, [positions, registrar, delegatedAccounts]); + }, [ + myOwnedPositionsEndIdx, + positions, + registrar, + delegatedAccounts, + delegationAccounts, + ]); const ret = useMemo( () => ({ loading: loading || loadingPositions || loadingDel, diff --git a/packages/voter-stake-registry-hooks/src/hooks/useDelegations.ts b/packages/voter-stake-registry-hooks/src/hooks/useDelegations.ts new file mode 100644 index 000000000..63974e95a --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/hooks/useDelegations.ts @@ -0,0 +1,12 @@ +import { useAnchorAccounts } from "@helium/helium-react-hooks"; +import { NftDelegation } from "@helium/modular-governance-idls/lib/types/nft_delegation"; +import { PublicKey } from "@solana/web3.js"; + +export const useDelegations = ( + delegationKeys: PublicKey[] | undefined +) => { + return useAnchorAccounts( + delegationKeys, + "delegationV0" + ); +}; diff --git a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts index 78c807dea..729c62459 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts @@ -41,6 +41,23 @@ export const useRelinquishVote = (proposal: PublicKey) => { const alreadyVotedThisChoice = marker?.choices.includes(choice); if (marker && alreadyVotedThisChoice) { + if (position.isVotingDelegatedToMe) { + if (marker.delegationIndex < (position.votingDelegation?.index || 0)) { + // Do not vote with a position that has been delegated to us, but voting overidden + return + } + + return await vsrProgram.methods + .delegatedRelinquishVoteV0({ + choice, + }) + .accounts({ + proposal, + owner: provider.wallet.publicKey, + position: position.pubkey, + }) + .instruction(); + } return await vsrProgram.methods .relinquishVoteV1({ choice, @@ -49,7 +66,6 @@ export const useRelinquishVote = (proposal: PublicKey) => { proposal, voter: provider.wallet.publicKey, position: position.pubkey, - refund: provider.wallet.publicKey, }) .instruction(); } diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts index 5e38bcacd..19e34edcb 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts @@ -65,6 +65,27 @@ export const useVote = (proposalKey: PublicKey) => { (marker?.choices.length || 0) >= (proposal?.maxChoicesPerVoter || 0); if (!marker || (!alreadyVotedThisChoice && !maxChoicesReached)) { + if (position.isVotingDelegatedToMe) { + if ( + marker?.delegationIndex && + marker.delegationIndex < + (position.votingDelegation?.index || 0) + ) { + // Do not vote with a position that has been delegated to us, but voting overidden + return; + } + + return await vsrProgram.methods + .delegatedVoteV0({ + choice, + }) + .accounts({ + proposal: proposalKey, + owner: provider.wallet.publicKey, + position: position.pubkey, + }) + .instruction(); + } return await vsrProgram.methods .voteV0({ choice, diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts new file mode 100644 index 000000000..880cad2c4 --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts @@ -0,0 +1,53 @@ +import { Program } from "@coral-xyz/anchor"; +import { PROGRAM_ID, init } from "@helium/nft-delegation-sdk"; +import { sendInstructions } from "@helium/spl-utils"; +import { PublicKey, TransactionInstruction } from "@solana/web3.js"; +import { useAsyncCallback } from "react-async-hook"; +import { useHeliumVsrState } from "../contexts/heliumVsrContext"; +import { PositionWithMeta } from "../sdk/types"; + +export const useVotingDelegatePositions = () => { + const { provider } = useHeliumVsrState(); + const { error, loading, execute } = useAsyncCallback( + async ({ + positions, + recipient, + programId = PROGRAM_ID, + }: { + positions: PositionWithMeta[]; + recipient: PublicKey; + programId?: PublicKey; + }) => { + const isInvalid = !provider; + + const idl = await Program.fetchIdl(programId, provider); + const nftDelegationProgram = await init(provider as any, programId, idl); + + if (loading) return; + + if (isInvalid || !nftDelegationProgram) { + throw new Error("Unable to voting delegate, Invalid params"); + } else { + const instructions: TransactionInstruction[] = []; + for (const position of positions) { + instructions.push( + await nftDelegationProgram.methods + .delegateV0() + .accounts({ + mint: position.mint, + recipient, + }) + .instruction() + ); + } + await sendInstructions(provider, instructions); + } + } + ); + + return { + error, + loading, + votingDelegatePositions: execute, + }; +}; diff --git a/packages/voter-stake-registry-hooks/src/sdk/types.ts b/packages/voter-stake-registry-hooks/src/sdk/types.ts index bb279fa91..0b86e668d 100644 --- a/packages/voter-stake-registry-hooks/src/sdk/types.ts +++ b/packages/voter-stake-registry-hooks/src/sdk/types.ts @@ -1,6 +1,7 @@ import { BN, IdlAccounts, IdlTypes } from '@coral-xyz/anchor' import { HeliumSubDaos } from '@helium/idls/lib/types/helium_sub_daos' import { VoterStakeRegistry as HeliumVoterStakeRegistry } from '@helium/idls/lib/types/voter_stake_registry' +import { NftDelegation } from '@helium/modular-governance-idls/lib/types/nft_delegation' import { Sft } from '@metaplex-foundation/js' import { PublicKey } from '@solana/web3.js' @@ -9,6 +10,8 @@ type RegistrarV0 = IdlAccounts['registrar'] export type Lockup = IdlTypes['Lockup'] export type PositionV0 = IdlAccounts['positionV0'] export type DelegatedPositionV0 = IdlAccounts['delegatedPositionV0'] +export type DelegationV0 = + IdlAccounts["delegationV0"]; export interface Registrar extends RegistrarV0 { votingMints: VotingMintConfig[] } @@ -18,11 +21,14 @@ export interface Position extends Omit { export interface PositionWithMeta extends Position { pubkey: PublicKey isDelegated: boolean + // This position could by someone elses position, but was delegated to me + isVotingDelegatedToMe: boolean delegatedSubDao: PublicKey | null hasRewards: boolean hasGenesisMultiplier: boolean votingPower: BN votingMint: VotingMintConfig + votingDelegation: DelegationV0 & { address: PublicKey } | null } export type LockupKind = IdlTypes['LockupKind'] /* export type InitializePositionV0Args = IdlTypes['InitializePositionArgsV0'] diff --git a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts index 30793f80c..f50b35a3d 100644 --- a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts +++ b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts @@ -5,6 +5,7 @@ import { positionKey, registrarKey, } from "@helium/voter-stake-registry-sdk"; +import { init } from "@helium/nft-delegation-sdk"; import { Metadata, Metaplex, Nft, Sft } from "@metaplex-foundation/js"; import { getMint, Mint } from "@solana/spl-token"; import { PublicKey } from "@solana/web3.js"; @@ -36,10 +37,28 @@ const realmNames: Record = { }; export const getPositionKeys = async ( args: GetPositionsArgs -): Promise<{ positionKeys: PublicKey[]; nfts: (Metadata | Nft | Sft)[] }> => { +): Promise<{ + votingDelegatedPositionKeys: PublicKey[]; + positionKeys: PublicKey[]; + nfts: (Metadata | Nft | Sft)[]; +}> => { const { mint, wallet, provider } = args; const connection = provider.connection; + const me = wallet; + const delegationProgram = await init(provider); + const myDelegations = await delegationProgram.account.delegationV0.all([ + { + memcmp: { + offset: 0, + bytes: me.toBase58(), + }, + }, + ]); + const delegationPositions = myDelegations.map( + (del) => positionKey(del.account.asset)[0] + ); + const metaplex = new Metaplex(connection); const registrarPk = getRegistrarKey(mint); const program = await initVsr(provider as any); @@ -61,5 +80,9 @@ export const getPositionKeys = async ( (nft) => positionKey((nft as any).mintAddress)[0] ); - return { positionKeys, nfts }; + return { + positionKeys, + votingDelegatedPositionKeys: delegationPositions, + nfts, + }; }; diff --git a/packages/voter-stake-registry-hooks/yarn.deploy.lock b/packages/voter-stake-registry-hooks/yarn.deploy.lock index 0bf987a91..5164af1df 100644 --- a/packages/voter-stake-registry-hooks/yarn.deploy.lock +++ b/packages/voter-stake-registry-hooks/yarn.deploy.lock @@ -584,6 +584,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -687,25 +699,25 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-hooks@npm:^0.0.8": - version: 0.0.8 - resolution: "@helium/modular-governance-hooks@npm:0.0.8" +"@helium/modular-governance-hooks@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/modular-governance-hooks@npm:0.0.8-next.5" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/account-fetch-cache": ^0.5.0 "@helium/account-fetch-cache-hooks": ^0.5.0 "@helium/helium-react-hooks": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8 - "@helium/organization-sdk": ^0.0.8 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/organization-sdk": ^0.0.8-next.5+4c12e2f "@solana/web3.js": ^1.78.4 peerDependencies: react: ^16.8 || ^17 || ^18 react-dom: ^16.8 || ^17 || ^18 - checksum: ad9019e9c8fb0f28c467d7ddfdf2fbe70005140f4f914389d6e20897118f218175a5cfdc11e764d2e1c5fbee6697445c0e3ff2c1de5f26c14f164d93bca832ad + checksum: ccc3f637e11c0bbf3313010525cbb78d9842cdb2c710152dde28144f646282a78bf2966e5f52f85e4ae02a9d5470fa47cf3602ecd834317334123db96d08bb92 languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -715,7 +727,19 @@ __metadata: languageName: node linkType: hard -"@helium/organization-sdk@npm:^0.0.8": +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + +"@helium/organization-sdk@npm:^0.0.8-next.5+4c12e2f": version: 0.0.8 resolution: "@helium/organization-sdk@npm:0.0.8" dependencies: @@ -786,7 +810,8 @@ __metadata: "@helium/account-fetch-cache-hooks": ^0.6.1 "@helium/helium-react-hooks": ^0.6.1 "@helium/helium-sub-daos-sdk": ^0.6.1 - "@helium/modular-governance-hooks": ^0.0.8 + "@helium/modular-governance-hooks": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@helium/spl-utils": ^0.6.1 "@helium/voter-stake-registry-sdk": ^0.6.1 "@metaplex-foundation/js": ^0.19.4 @@ -811,6 +836,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -1342,7 +1368,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.36.0, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.63.1, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.36.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.63.1, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/voter-stake-registry-sdk/package.json b/packages/voter-stake-registry-sdk/package.json index 0a6e75627..072bace81 100644 --- a/packages/voter-stake-registry-sdk/package.json +++ b/packages/voter-stake-registry-sdk/package.json @@ -34,6 +34,7 @@ "@coral-xyz/anchor": "^0.28.0", "@helium/anchor-resolvers": "^0.6.1", "@helium/idls": "^0.6.1", + "@helium/nft-delegation-sdk": "0.0.8-next.5+4c12e2f", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", "bn.js": "^5.2.0", diff --git a/packages/voter-stake-registry-sdk/src/resolvers.ts b/packages/voter-stake-registry-sdk/src/resolvers.ts index 8e1068dce..433a9bcdf 100644 --- a/packages/voter-stake-registry-sdk/src/resolvers.ts +++ b/packages/voter-stake-registry-sdk/src/resolvers.ts @@ -9,11 +9,14 @@ import { getAccount } from "@solana/spl-token"; import { PublicKey } from "@solana/web3.js"; import { init } from "."; import { voterWeightRecordKey } from "./pdas"; +import { delegationKey, nftDelegationResolvers } from "@helium/nft-delegation-sdk"; + export * from "./constants"; export * from "./pdas"; export * from "./resolvers"; export const vsrResolvers = combineResolvers( + nftDelegationResolvers, heliumCommonResolver, ataResolver({ instruction: "initializeRegistrarV0", @@ -103,13 +106,29 @@ export const vsrResolvers = combineResolvers( mint: "mint", owner: "voter", }), - resolveIndividual(async ({ accounts, path, provider }) => { - if (path[path.length - 1] === "proposalProgram") { + resolveIndividual(async ({ accounts, path, provider, programId }) => { + if (path[path.length - 1] === "proposalProgram") { return new PublicKey("propFYxqmVcufMhk5esNMrexq2ogHbbC2kP9PU1qxKs"); } else if (path[path.length - 1] === "recipient") { // @ts-ignore return provider.wallet.publicKey; + } else if ( + path[path.length - 1] == "delegation" && + accounts.registrar && + accounts.owner && + accounts.mint + ) { + const program = await init(provider as any, programId); + const registrar = await program.account.registrar.fetch( + accounts.registrar as PublicKey + ); + return delegationKey( + registrar.delegationConfig, + accounts.mint as PublicKey, + accounts.owner as PublicKey + )[0]; } + if (path[path.length - 1] === "solDestination") { // @ts-ignore return provider.wallet.publicKey; diff --git a/packages/voter-stake-registry-sdk/yarn.deploy.lock b/packages/voter-stake-registry-sdk/yarn.deploy.lock index 572c18e0c..e008f3bfb 100644 --- a/packages/voter-stake-registry-sdk/yarn.deploy.lock +++ b/packages/voter-stake-registry-sdk/yarn.deploy.lock @@ -72,6 +72,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/idls@^0.6.1": version: 0.0.0-use.local resolution: "@helium/idls@workspace:packages/idls" @@ -86,6 +98,28 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/voter-stake-registry-sdk@workspace:.": version: 0.0.0-use.local resolution: "@helium/voter-stake-registry-sdk@workspace:." @@ -93,6 +127,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -253,7 +288,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/vsr-metadata-service/yarn.deploy.lock b/packages/vsr-metadata-service/yarn.deploy.lock index 9cf1c1ded..98b746d65 100644 --- a/packages/vsr-metadata-service/yarn.deploy.lock +++ b/packages/vsr-metadata-service/yarn.deploy.lock @@ -138,6 +138,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/idls@^0.6.1": version: 0.0.0-use.local resolution: "@helium/idls@workspace:packages/idls" @@ -152,6 +164,28 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/spl-utils@^0.6.1": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" @@ -181,6 +215,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -384,7 +419,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/xnft-hotspot/yarn.deploy.lock b/packages/xnft-hotspot/yarn.deploy.lock index f8fbf3e4a..55ca8c304 100644 --- a/packages/xnft-hotspot/yarn.deploy.lock +++ b/packages/xnft-hotspot/yarn.deploy.lock @@ -348,6 +348,18 @@ __metadata: languageName: unknown linkType: soft +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + "@helium/anchor-resolvers@npm:^0.5.0": version: 0.5.0 resolution: "@helium/anchor-resolvers@npm:0.5.0" @@ -523,6 +535,28 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + "@helium/rewards-burn-sdk@^0.6.1": version: 0.0.0-use.local resolution: "@helium/rewards-burn-sdk@workspace:packages/rewards-burn-sdk" @@ -601,6 +635,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -2164,7 +2199,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.36.0, @solana/web3.js@npm:^1.37.1, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.63.1, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": +"@solana/web3.js@npm:^1.21.0, @solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.36.0, @solana/web3.js@npm:^1.37.1, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.50.1, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.63.1, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/programs/voter-stake-registry/Cargo.toml b/programs/voter-stake-registry/Cargo.toml index f254b2dd0..3bd37cee1 100644 --- a/programs/voter-stake-registry/Cargo.toml +++ b/programs/voter-stake-registry/Cargo.toml @@ -38,6 +38,7 @@ mpl-token-metadata = { workspace = true } itertools = "0.10.2" spl-governance-tools = { git = "https://github.com/solana-labs/solana-program-library.git", version = "0.1.3" } proposal = { path = "../../utils/proposal" } +nft-delegation = { path = "../../utils/nft-delegation" } shared-utils = { workspace = true } solana-security-txt = { workspace = true } default-env = { workspace = true } diff --git a/programs/voter-stake-registry/src/instructions/delegated_relinquish_vote_v0.rs b/programs/voter-stake-registry/src/instructions/delegated_relinquish_vote_v0.rs new file mode 100644 index 000000000..6b0754ea6 --- /dev/null +++ b/programs/voter-stake-registry/src/instructions/delegated_relinquish_vote_v0.rs @@ -0,0 +1,109 @@ +use crate::{error::VsrError, RelinquishVoteArgsV1}; +use anchor_lang::prelude::*; +use anchor_spl::token::Mint; +use nft_delegation::DelegationV0; +use proposal::{ProposalConfigV0, ProposalV0}; + +use crate::{registrar_seeds, state::*}; + +#[derive(Accounts)] +pub struct DelegatedRelinquishVoteV0<'info> { + /// CHECK: has one on the marker gets this + #[account(mut)] + pub rent_refund: AccountInfo<'info>, + #[account( + mut, + seeds = [b"marker", mint.key().as_ref(), proposal.key().as_ref()], + bump = marker.bump_seed, + has_one = registrar, + has_one = mint, + has_one = rent_refund, + )] + pub marker: Box>, + pub registrar: Box>, + pub owner: Signer<'info>, + #[account( + has_one = owner, + constraint = delegation.delegation_config == registrar.delegation_config, + constraint = delegation.expiration_time > Clock::get().unwrap().unix_timestamp, + // only the current or earlier delegates can change vote. + constraint = delegation.index <= marker.delegation_index + )] + pub delegation: Box>, + #[account( + mut, + has_one = mint, + has_one = registrar + )] + pub position: Box>, + pub mint: Box>, + #[account( + mut, + has_one = proposal_config, + owner = proposal_program.key(), + )] + pub proposal: Account<'info, ProposalV0>, + #[account( + has_one = on_vote_hook, + has_one = state_controller, + owner = proposal_program.key() + )] + pub proposal_config: Account<'info, ProposalConfigV0>, + /// CHECK: Checked via cpi + #[account(mut)] + pub state_controller: AccountInfo<'info>, + /// CHECK: Checked via has_one + pub on_vote_hook: AccountInfo<'info>, + /// CHECK: Checked via constraint + #[account( + constraint = *proposal.to_account_info().owner == proposal_program.key() + )] + pub proposal_program: AccountInfo<'info>, + pub system_program: Program<'info, System>, +} + +pub fn handler(ctx: Context, args: RelinquishVoteArgsV1) -> Result<()> { + let marker = &mut ctx.accounts.marker; + marker.delegation_index = ctx.accounts.delegation.index; + marker.proposal = ctx.accounts.proposal.key(); + marker.voter = ctx.accounts.owner.key(); + ctx.accounts.position.num_active_votes -= 1; + + require!( + marker.choices.iter().any(|choice| *choice == args.choice), + VsrError::NoVoteForThisChoice + ); + + marker.choices = marker + .choices + .clone() + .into_iter() + .filter(|c| *c != args.choice) + .collect::>(); + + proposal::cpi::vote_v0( + CpiContext::new_with_signer( + ctx.accounts.proposal_program.to_account_info(), + proposal::cpi::accounts::VoteV0 { + voter: ctx.accounts.owner.to_account_info(), + vote_controller: ctx.accounts.registrar.to_account_info(), + state_controller: ctx.accounts.state_controller.to_account_info(), + proposal_config: ctx.accounts.proposal_config.to_account_info(), + proposal: ctx.accounts.proposal.to_account_info(), + on_vote_hook: ctx.accounts.on_vote_hook.to_account_info(), + }, + &[registrar_seeds!(ctx.accounts.registrar)], + ), + proposal::VoteArgsV0 { + remove_vote: true, + choice: args.choice, + weight: marker.weight, + }, + )?; + + if marker.choices.is_empty() { + marker.close(ctx.accounts.rent_refund.to_account_info())?; + } + + Ok(()) +} diff --git a/programs/voter-stake-registry/src/instructions/delegated_vote_v0.rs b/programs/voter-stake-registry/src/instructions/delegated_vote_v0.rs new file mode 100644 index 000000000..449d1863d --- /dev/null +++ b/programs/voter-stake-registry/src/instructions/delegated_vote_v0.rs @@ -0,0 +1,126 @@ +use crate::{error::VsrError, VoteArgsV0}; +use anchor_lang::prelude::*; +use anchor_spl::token::Mint; +use nft_delegation::DelegationV0; + +use crate::{registrar_seeds, state::*}; +use proposal::{ProposalConfigV0, ProposalV0}; + +#[derive(Accounts)] +pub struct DelegatedVoteV0<'info> { + #[account(mut)] + pub payer: Signer<'info>, + #[account( + init_if_needed, + payer = payer, + space = 8 + 32 + std::mem::size_of::() + 1 + 2 * proposal.choices.len(), + seeds = [b"marker", mint.key().as_ref(), proposal.key().as_ref()], + bump + )] + pub marker: Box>, + pub registrar: Box>, + pub owner: Signer<'info>, + #[account( + mut, + has_one = mint, + has_one = registrar + )] + pub position: Box>, + pub mint: Box>, + #[account( + has_one = owner, + constraint = delegation.delegation_config == registrar.delegation_config, + constraint = delegation.expiration_time > Clock::get().unwrap().unix_timestamp, + // only the current or earlier delegates can change vote. Or if proposal not set, this was an `init` for the marker + constraint = delegation.index <= marker.delegation_index || marker.proposal == Pubkey::default() + )] + pub delegation: Box>, + #[account( + mut, + has_one = proposal_config, + owner = proposal_program.key(), + )] + pub proposal: Account<'info, ProposalV0>, + #[account( + has_one = on_vote_hook, + has_one = state_controller, + owner = proposal_program.key() + )] + pub proposal_config: Account<'info, ProposalConfigV0>, + /// CHECK: Checked via cpi + #[account(mut)] + pub state_controller: AccountInfo<'info>, + /// CHECK: Checked via has_one + pub on_vote_hook: AccountInfo<'info>, + /// CHECK: Checked via constraint + #[account( + constraint = *proposal.to_account_info().owner == proposal_program.key() + )] + pub proposal_program: AccountInfo<'info>, + pub system_program: Program<'info, System>, +} + +pub fn handler(ctx: Context, args: VoteArgsV0) -> Result<()> { + let marker = &mut ctx.accounts.marker; + if marker.rent_refund == Pubkey::default() { + marker.rent_refund = ctx.accounts.payer.key(); + } + marker.proposal = ctx.accounts.proposal.key(); + marker.bump_seed = ctx.bumps["marker"]; + marker.voter = ctx.accounts.owner.key(); + marker.mint = ctx.accounts.mint.key(); + marker.registrar = ctx.accounts.registrar.key(); + marker.delegation_index = ctx.accounts.delegation.index; + + // Don't allow voting for the same choice twice. + require!( + marker.choices.iter().all(|choice| *choice != args.choice), + VsrError::NftAlreadyVoted + ); + require_gt!( + ctx.accounts.proposal.max_choices_per_voter, + marker.choices.len() as u16, + VsrError::MaxChoicesExceeded + ); + + marker.choices.push(args.choice); + + ctx.accounts.position.num_active_votes += 1; + + let voting_mint_config = + &ctx.accounts.registrar.voting_mints[usize::from(ctx.accounts.position.voting_mint_config_idx)]; + + // Use the original voting weight for this nft until all votes removed + // This prevents inconsistensies with decaying positions + let weight = if marker.weight > 0 { + marker.weight + } else { + u128::from(ctx.accounts.position.voting_power( + voting_mint_config, + ctx.accounts.registrar.clock_unix_timestamp(), + )?) + }; + marker.weight = weight; + + proposal::cpi::vote_v0( + CpiContext::new_with_signer( + ctx.accounts.proposal_program.to_account_info(), + proposal::cpi::accounts::VoteV0 { + voter: ctx.accounts.owner.to_account_info(), + vote_controller: ctx.accounts.registrar.to_account_info(), + state_controller: ctx.accounts.state_controller.to_account_info(), + proposal_config: ctx.accounts.proposal_config.to_account_info(), + proposal: ctx.accounts.proposal.to_account_info(), + on_vote_hook: ctx.accounts.on_vote_hook.to_account_info(), + }, + &[registrar_seeds!(ctx.accounts.registrar)], + ), + proposal::VoteArgsV0 { + remove_vote: false, + choice: args.choice, + weight, + }, + )?; + + Ok(()) +} diff --git a/programs/voter-stake-registry/src/instructions/initialize_registrar_v0.rs b/programs/voter-stake-registry/src/instructions/initialize_registrar_v0.rs index 2b47a1a06..331475632 100644 --- a/programs/voter-stake-registry/src/instructions/initialize_registrar_v0.rs +++ b/programs/voter-stake-registry/src/instructions/initialize_registrar_v0.rs @@ -7,6 +7,7 @@ use anchor_spl::{ }; use mpl_token_metadata::types::CollectionDetails; use mpl_token_metadata::types::DataV2; +use nft_delegation::DelegationConfigV0; use shared_utils::create_metadata_accounts_v3; use shared_utils::token_metadata::{ create_master_edition_v3, CreateMasterEditionV3, CreateMetadataAccountsV3, Metadata, @@ -87,6 +88,7 @@ pub struct InitializeRegistrarV0<'info> { pub associated_token_program: Program<'info, AssociatedToken>, pub system_program: Program<'info, System>, pub token_program: Program<'info, Token>, + pub delegation_config: Option>, } impl<'info> InitializeRegistrarV0<'info> { @@ -188,8 +190,14 @@ pub fn handler(ctx: Context, args: InitializeRegistrarArg bump_seed: ctx.bumps["registrar"], collection_bump_seed: ctx.bumps["collection"], reserved1: [0; 4], - reserved2: [0; 7], + reserved2: [0; 3], voting_mints: Vec::new(), + delegation_config: ctx + .accounts + .delegation_config + .clone() + .map(|k| k.key()) + .unwrap_or_default(), }); // Verify that "realm_authority" is the expected authority on "realm" diff --git a/programs/voter-stake-registry/src/instructions/mod.rs b/programs/voter-stake-registry/src/instructions/mod.rs index f864504d7..6d4e40590 100644 --- a/programs/voter-stake-registry/src/instructions/mod.rs +++ b/programs/voter-stake-registry/src/instructions/mod.rs @@ -1,6 +1,8 @@ pub use cast_vote_v0::*; pub use close_position_v0::*; pub use configure_voting_mint_v0::*; +pub use delegated_relinquish_vote_v0::*; +pub use delegated_vote_v0::*; pub use deposit_v0::*; pub use initialize_position_v0::*; pub use initialize_registrar_v0::*; @@ -14,6 +16,7 @@ pub use set_time_offset_v0::*; pub use transfer_v0::*; pub use update_max_voter_weight_v0::*; pub use update_registrar_authority_v0::*; +pub use update_registrar_v0::*; pub use update_voter_weight_record_v0::*; pub use vote_v0::*; pub use withdraw_v0::*; @@ -21,6 +24,8 @@ pub use withdraw_v0::*; pub mod cast_vote_v0; pub mod close_position_v0; pub mod configure_voting_mint_v0; +pub mod delegated_relinquish_vote_v0; +pub mod delegated_vote_v0; pub mod deposit_v0; pub mod initialize_position_v0; pub mod initialize_registrar_v0; @@ -34,6 +39,7 @@ pub mod set_time_offset_v0; pub mod transfer_v0; pub mod update_max_voter_weight_v0; pub mod update_registrar_authority_v0; +pub mod update_registrar_v0; pub mod update_voter_weight_record_v0; pub mod vote_v0; pub mod withdraw_v0; diff --git a/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs b/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs index 66774fa73..a59e643ad 100644 --- a/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs +++ b/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs @@ -15,13 +15,14 @@ pub struct RelinquishVoteV1<'info> { /// CHECK: You're getting sol why do you care? /// Account to receive sol refund if marker is closed #[account(mut)] - pub refund: AccountInfo<'info>, + pub rent_refund: AccountInfo<'info>, #[account( mut, seeds = [b"marker", mint.key().as_ref(), proposal.key().as_ref()], bump = marker.bump_seed, has_one = registrar, - has_one = mint + has_one = mint, + has_one = rent_refund, )] pub marker: Box>, pub registrar: Box>, @@ -103,7 +104,7 @@ pub fn handler(ctx: Context, args: RelinquishVoteArgsV1) -> Re )?; if marker.choices.is_empty() { - marker.close(ctx.accounts.refund.to_account_info())?; + marker.close(ctx.accounts.rent_refund.to_account_info())?; } Ok(()) diff --git a/programs/voter-stake-registry/src/instructions/update_registrar_v0.rs b/programs/voter-stake-registry/src/instructions/update_registrar_v0.rs new file mode 100644 index 000000000..3b2862c24 --- /dev/null +++ b/programs/voter-stake-registry/src/instructions/update_registrar_v0.rs @@ -0,0 +1,26 @@ +use crate::state::*; +use anchor_lang::prelude::*; +use nft_delegation::DelegationConfigV0; + +#[derive(Accounts)] +#[instruction()] +pub struct UpdateRegistrarV0<'info> { + #[account( + mut, + has_one = realm_authority, + )] + pub registrar: Box>, + /// CHECK: checked as signer + pub realm_authority: Signer<'info>, + pub delegation_config: Option>, +} + +pub fn handler(ctx: Context) -> Result<()> { + ctx.accounts.registrar.delegation_config = ctx + .accounts + .delegation_config + .clone() + .map(|k| k.key()) + .unwrap_or_default(); + Ok(()) +} diff --git a/programs/voter-stake-registry/src/instructions/vote_v0.rs b/programs/voter-stake-registry/src/instructions/vote_v0.rs index 5e0f9885c..97c3b9013 100644 --- a/programs/voter-stake-registry/src/instructions/vote_v0.rs +++ b/programs/voter-stake-registry/src/instructions/vote_v0.rs @@ -64,11 +64,15 @@ pub struct VoteV0<'info> { pub fn handler(ctx: Context, args: VoteArgsV0) -> Result<()> { let marker = &mut ctx.accounts.marker; + if marker.rent_refund == Pubkey::default() { + marker.rent_refund = ctx.accounts.payer.key(); + } marker.proposal = ctx.accounts.proposal.key(); marker.bump_seed = ctx.bumps["marker"]; marker.voter = ctx.accounts.voter.key(); marker.mint = ctx.accounts.mint.key(); marker.registrar = ctx.accounts.registrar.key(); + marker.delegation_index = 0; // Don't allow voting for the same choice twice. require!( diff --git a/programs/voter-stake-registry/src/lib.rs b/programs/voter-stake-registry/src/lib.rs index b7145032b..d9c2b5b5d 100644 --- a/programs/voter-stake-registry/src/lib.rs +++ b/programs/voter-stake-registry/src/lib.rs @@ -137,4 +137,19 @@ pub mod voter_stake_registry { pub fn relinquish_expired_vote_v0(ctx: Context) -> Result<()> { instructions::relinquish_expired_vote_v0::handler(ctx) } + + pub fn delegated_relinquish_vote_v0( + ctx: Context, + args: RelinquishVoteArgsV1, + ) -> Result<()> { + instructions::delegated_relinquish_vote_v0::handler(ctx, args) + } + + pub fn delegated_vote_v0(ctx: Context, args: VoteArgsV0) -> Result<()> { + instructions::delegated_vote_v0::handler(ctx, args) + } + + pub fn update_registrar_v0(ctx: Context) -> Result<()> { + instructions::update_registrar_v0::handler(ctx) + } } diff --git a/programs/voter-stake-registry/src/state/marker.rs b/programs/voter-stake-registry/src/state/marker.rs index b837a3a6e..0ae6d0a59 100644 --- a/programs/voter-stake-registry/src/state/marker.rs +++ b/programs/voter-stake-registry/src/state/marker.rs @@ -12,4 +12,9 @@ pub struct VoteMarkerV0 { pub bump_seed: u8, /// Whether this vote has been cleared on the position after proposal expireds pub relinquished: bool, + // Keep track of which delegation index voted on this marker, + // earlier delegators can override + pub delegation_index: u16, + // Ensure the refund goes to whoever paid to create the marker when closing + pub rent_refund: Pubkey, } diff --git a/programs/voter-stake-registry/src/state/registrar.rs b/programs/voter-stake-registry/src/state/registrar.rs index ad476560d..c6b35cd8b 100644 --- a/programs/voter-stake-registry/src/state/registrar.rs +++ b/programs/voter-stake-registry/src/state/registrar.rs @@ -22,7 +22,8 @@ pub struct Registrar { // Empty bytes for future upgrades. pub reserved1: [u8; 4], - pub reserved2: [u64; 7], // split because `Default` does not support [u8; 60] + pub reserved2: [u64; 3], // split because `Default` does not support [u8; 60] + pub delegation_config: Pubkey, pub voting_mints: Vec, } diff --git a/tests/voter-stake-registry.ts b/tests/voter-stake-registry.ts index 9c39fac58..0210d6eba 100644 --- a/tests/voter-stake-registry.ts +++ b/tests/voter-stake-registry.ts @@ -38,6 +38,13 @@ import { expectBnAccuracy } from "./utils/expectBnAccuracy"; import { getUnixTimestamp, loadKeypair } from "./utils/solana"; import { random } from "./utils/string"; import { SPL_GOVERNANCE_PID } from "./utils/vsr"; +import { + PROGRAM_ID as DEL_PID, + init as initNftDelegation, + delegationKey, +} from "@helium/nft-delegation-sdk"; +import { NftDelegation } from "@helium/modular-governance-idls/lib/types/nft_delegation"; +import { ensureVSRIdl } from "./utils/fixtures"; chai.use(chaiAsPromised); @@ -55,11 +62,13 @@ describe("voter-stake-registry", () => { anchor.setProvider(anchor.AnchorProvider.local("http://127.0.0.1:8899")); let program: Program; + let delegateProgram: Program; let proposalProgram: Program; let registrar: PublicKey; let collection: PublicKey; let hntMint: PublicKey; let realm: PublicKey; + let delegationConfig: PublicKey | undefined; let programVersion: number; let oneWeekFromNow: number; const provider = anchor.getProvider() as anchor.AnchorProvider; @@ -71,11 +80,10 @@ describe("voter-stake-registry", () => { PROGRAM_ID, anchor.workspace.VoterStakeRegistry.idl ); - const thing = await Program.fetchIdl( - new PublicKey("propFYxqmVcufMhk5esNMrexq2ogHbbC2kP9PU1qxKs") - ); + ensureVSRIdl(program); // @ts-ignore proposalProgram = await initProposal(provider as any); + delegateProgram = await initNftDelegation(provider, DEL_PID); hntMint = await createMint(provider, 8, me, me); await createAtaAndMint(provider, hntMint, toBN(223_000_000, 8)); @@ -118,6 +126,19 @@ describe("voter-stake-registry", () => { me ); + ({ + pubkeys: { delegationConfig }, + } = await delegateProgram.methods + .initializeDelegationConfigV0({ + maxDelegationTime: new anchor.BN(1000000000000), + name: random(10), + seasons: [new anchor.BN(new Date().valueOf() / 1000 + 100000)], + }) + .accounts({ + authority: me, + }) + .rpcAndKeys()); + const { instruction: createRegistrar, pubkeys: { registrar: rkey, collection: ckey }, @@ -128,6 +149,7 @@ describe("voter-stake-registry", () => { .accounts({ realm: realm, realmGoverningTokenMint: hntMint, + delegationConfig, }) .prepare(); registrar = rkey!; @@ -479,6 +501,156 @@ describe("voter-stake-registry", () => { }); }); + describe("with delegation", async () => { + let delegatee = Keypair.generate(); + let position: PublicKey; + let mint: PublicKey; + + beforeEach(async () => { + ({ position, mint } = await createAndDeposit(10000, 200)); + await delegateProgram.methods + .delegateV0({ + expirationTime: new anchor.BN(new Date().valueOf() / 1000 + 10000), + }) + .accounts({ + delegationConfig, + mint, + recipient: delegatee.publicKey, + }) + .rpc({ skipPreflight: true }); + }); + + it("allows voting on and relinquishing votes on the proposal", async () => { + const { + pubkeys: { marker }, + } = await program.methods + .delegatedVoteV0({ + choice: 0, + }) + .accounts({ + mint, + proposal, + position, + owner: delegatee.publicKey, + }) + .signers([delegatee]) + .rpcAndKeys({ skipPreflight: true }); + + let acct = await proposalProgram.account.proposalV0.fetch(proposal!); + expect(acct.choices[0].weight.toNumber()).to.be.gt(0); + let markerA = await program.account.voteMarkerV0.fetchNullable( + marker! as PublicKey + ); + expect(markerA?.choices).to.deep.eq([0]); + + await program.methods + .delegatedRelinquishVoteV0({ + choice: 0, + }) + .accounts({ + mint, + proposal, + position, + owner: delegatee.publicKey, + }) + .signers([delegatee]) + .rpc({ skipPreflight: true }); + + acct = await proposalProgram.account.proposalV0.fetch(proposal!); + expect(acct.choices[0].weight.toNumber()).to.eq(0); + markerA = await program.account.voteMarkerV0.fetchNullable( + marker! as PublicKey + ); + expect(markerA).to.be.null; + }); + + it("allows earlier delegates to change the vote", async () => { + const { + pubkeys: { marker }, + } = await program.methods + .delegatedVoteV0({ + choice: 0, + }) + .accounts({ + mint, + proposal, + position, + owner: delegatee.publicKey, + }) + .signers([delegatee]) + .rpcAndKeys({ skipPreflight: true }); + + let acct = await proposalProgram.account.proposalV0.fetch(proposal!); + expect(acct.choices[0].weight.toNumber()).to.be.gt(0); + let markerA = await program.account.voteMarkerV0.fetchNullable( + marker! as PublicKey + ); + expect(markerA?.choices).to.deep.eq([0]); + expect(markerA?.delegationIndex).to.eq(1); + + await program.methods + .delegatedRelinquishVoteV0({ + choice: 0, + }) + .accounts({ + mint, + proposal, + position, + owner: me, + }) + .rpc({ skipPreflight: true }); + + acct = await proposalProgram.account.proposalV0.fetch(proposal!); + expect(acct.choices[0].weight.toNumber()).to.eq(0); + markerA = await program.account.voteMarkerV0.fetchNullable( + marker! as PublicKey + ); + expect(markerA).to.be.null; + + await program.methods + .delegatedVoteV0({ + choice: 1, + }) + .accounts({ + mint, + proposal, + position, + owner: me, + }) + .rpcAndKeys({ skipPreflight: true }); + + acct = await proposalProgram.account.proposalV0.fetch(proposal!); + expect(acct.choices[1].weight.toNumber()).to.be.gt(0); + markerA = await program.account.voteMarkerV0.fetchNullable( + marker! as PublicKey + ); + expect(markerA?.choices).to.deep.eq([1]); + expect(markerA?.delegationIndex).to.eq(0); + }); + + it("allows the original owner to undelegate", async () => { + const toUndelegate = delegationKey(delegationConfig!, mint, delegatee.publicKey)[0]; + const myDelegation = delegationKey(delegationConfig!, mint, me)[0]; + await delegateProgram.methods + .undelegateV0() + .accounts({ + delegation: toUndelegate, + prevDelegation: myDelegation, + currentDelegation: myDelegation, + }) + .rpc({ skipPreflight: true }); + + expect( + ( + await delegateProgram.account.delegationV0.fetch(myDelegation) + ).nextOwner.toBase58() + ).to.eq(PublicKey.default.toBase58()); + expect( + await delegateProgram.account.delegationV0.fetchNullable(toUndelegate) + ).to.be.null; + }); + }); + describe("with an active vote", async () => { let position: PublicKey; let mint: PublicKey; @@ -553,7 +725,6 @@ describe("voter-stake-registry", () => { }) .accounts({ proposal, - refund: me, position, }) .instruction() diff --git a/utils/nft-delegation/Cargo.toml b/utils/nft-delegation/Cargo.toml new file mode 100644 index 000000000..92a874a52 --- /dev/null +++ b/utils/nft-delegation/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "nft-delegation" +version = "0.0.2" +description = "Nft delegation cpi wrapper" +edition = "2021" + +[lib] +crate-type = ["cdylib", "lib"] +name = "nft_delegation" + +[features] +default = ["cpi"] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +cpi = ["no-entrypoint"] + +[dependencies] +anchor-gen = { git = "https://github.com/ChewingGlass/anchor-gen.git" } +anchor-lang = { workspace = true } diff --git a/utils/nft-delegation/idl.json b/utils/nft-delegation/idl.json new file mode 100644 index 000000000..10cd87151 --- /dev/null +++ b/utils/nft-delegation/idl.json @@ -0,0 +1,332 @@ +{ + "version": "0.0.1", + "name": "nft_delegation", + "instructions": [ + { + "name": "initializeDelegationConfigV0", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "delegationConfig", + "isMut": true, + "isSigner": false, + "pda": { + "seeds": [ + { + "kind": "const", + "type": "string", + "value": "delegation_config" + }, + { + "kind": "arg", + "type": { + "defined": "InitializeDelegationConfigArgsV0" + }, + "path": "args.name" + } + ] + } + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "InitializeDelegationConfigArgsV0" + } + } + ] + }, + { + "name": "delegateV0", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "mint", + "isMut": false, + "isSigner": false + }, + { + "name": "owner", + "isMut": false, + "isSigner": true + }, + { + "name": "tokenAccount", + "isMut": false, + "isSigner": false + }, + { + "name": "delegationConfig", + "isMut": false, + "isSigner": false + }, + { + "name": "currentDelegation", + "isMut": true, + "isSigner": false, + "pda": { + "seeds": [ + { + "kind": "const", + "type": "string", + "value": "delegation" + }, + { + "kind": "account", + "type": "publicKey", + "account": "DelegationConfigV0", + "path": "delegation_config" + }, + { + "kind": "account", + "type": "publicKey", + "account": "Mint", + "path": "mint" + }, + { + "kind": "account", + "type": "publicKey", + "path": "owner" + } + ] + } + }, + { + "name": "recipient", + "isMut": false, + "isSigner": false + }, + { + "name": "nextDelegation", + "isMut": true, + "isSigner": false, + "pda": { + "seeds": [ + { + "kind": "const", + "type": "string", + "value": "delegation" + }, + { + "kind": "account", + "type": "publicKey", + "account": "DelegationConfigV0", + "path": "delegation_config" + }, + { + "kind": "account", + "type": "publicKey", + "account": "Mint", + "path": "mint" + }, + { + "kind": "account", + "type": "publicKey", + "path": "recipient" + } + ] + } + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "DelegateArgsV0" + } + } + ] + }, + { + "name": "undelegateV0", + "accounts": [ + { + "name": "rentRefund", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": false, + "isSigner": true + }, + { + "name": "currentDelegation", + "isMut": false, + "isSigner": false, + "relations": ["owner"] + }, + { + "name": "prevDelegation", + "isMut": true, + "isSigner": false + }, + { + "name": "delegation", + "isMut": true, + "isSigner": false, + "relations": ["rent_refund"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + } + ], + "accounts": [ + { + "name": "DelegationConfigV0", + "type": { + "kind": "struct", + "fields": [ + { + "name": "authority", + "type": "publicKey" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "maxDelegationTime", + "type": "i64" + }, + { + "name": "seasons", + "type": { + "vec": "i64" + } + } + ] + } + }, + { + "name": "DelegationV0", + "type": { + "kind": "struct", + "fields": [ + { + "name": "owner", + "type": "publicKey" + }, + { + "name": "delegationConfig", + "type": "publicKey" + }, + { + "name": "asset", + "type": "publicKey" + }, + { + "name": "index", + "type": "u16" + }, + { + "name": "nextOwner", + "type": "publicKey" + }, + { + "name": "rentRefund", + "type": "publicKey" + }, + { + "name": "expirationTime", + "type": "i64" + }, + { + "name": "bumpSeed", + "type": "u8" + } + ] + } + } + ], + "types": [ + { + "name": "DelegateArgsV0", + "type": { + "kind": "struct", + "fields": [ + { + "name": "expirationTime", + "type": "i64" + } + ] + } + }, + { + "name": "InitializeDelegationConfigArgsV0", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "maxDelegationTime", + "type": "i64" + }, + { + "name": "seasons", + "type": { + "vec": "i64" + } + } + ] + } + } + ], + "errors": [ + { + "code": 6000, + "name": "ExpirationExceedsMax", + "msg": "The specified expiration time exceeds the maximum allowed for this delegation configuration" + }, + { + "code": 6001, + "name": "ExpirationExceedsSeasonMax", + "msg": "The specified expiration time exceeds the maximum allowed for this season" + }, + { + "code": 6002, + "name": "ExpirationPast", + "msg": "The specified expiration time has already passed" + }, + { + "code": 6003, + "name": "ExpirationExceedsPreceedingDelegation", + "msg": "The specified expiration time exceeds the expiration of the existing delegatio" + } + ], + "metadata": { + "address": "nde169MVKXLYbtDbrTF8wiJc8KYJRvLXKAzHApZ5vvD" + } +} diff --git a/utils/nft-delegation/src/lib.rs b/utils/nft-delegation/src/lib.rs new file mode 100644 index 000000000..f2c35abaa --- /dev/null +++ b/utils/nft-delegation/src/lib.rs @@ -0,0 +1,5 @@ +use anchor_lang::prelude::*; + +anchor_gen::generate_cpi_crate!("./idl.json"); + +declare_id!("nde169MVKXLYbtDbrTF8wiJc8KYJRvLXKAzHApZ5vvD"); diff --git a/yarn.lock b/yarn.lock index 377bacbcf..0fbb4a96d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -122,29 +122,6 @@ __metadata: languageName: node linkType: hard -"@coral-xyz/anchor@npm:^0.27.0": - version: 0.27.0 - resolution: "@coral-xyz/anchor@npm:0.27.0" - dependencies: - "@coral-xyz/borsh": "npm:^0.27.0" - "@solana/web3.js": "npm:^1.68.0" - base64-js: "npm:^1.5.1" - bn.js: "npm:^5.1.2" - bs58: "npm:^4.0.1" - buffer-layout: "npm:^1.2.2" - camelcase: "npm:^6.3.0" - cross-fetch: "npm:^3.1.5" - crypto-hash: "npm:^1.3.0" - eventemitter3: "npm:^4.0.7" - js-sha256: "npm:^0.9.0" - pako: "npm:^2.0.3" - snake-case: "npm:^3.0.4" - superstruct: "npm:^0.15.4" - toml: "npm:^3.0.0" - checksum: 369581b2ee0bb3a95e04934ad91459d921b62d7f883fafa292818eb2550b717d2ced5c98c2a817b73d6dc8dab904a41d681d11c110c41c7f78f6135d9942eb4c - languageName: node - linkType: hard - "@coral-xyz/anchor@npm:^0.28.0": version: 0.28.0 resolution: "@coral-xyz/anchor@npm:0.28.0" @@ -215,18 +192,6 @@ __metadata: languageName: node linkType: hard -"@coral-xyz/borsh@npm:^0.27.0": - version: 0.27.0 - resolution: "@coral-xyz/borsh@npm:0.27.0" - dependencies: - bn.js: "npm:^5.1.2" - buffer-layout: "npm:^1.2.0" - peerDependencies: - "@solana/web3.js": ^1.68.0 - checksum: b5e06650ad3f8cfbdb9c96c0b7329f07345f258fce8cfb1737c6ee1bf991d8fd4e90a3ac397a1f3d98c39173cc10bad3255247d77385b3542d20a0bf7e3878d9 - languageName: node - linkType: hard - "@coral-xyz/borsh@npm:^0.28.0": version: 0.28.0 resolution: "@coral-xyz/borsh@npm:0.28.0" @@ -1020,7 +985,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/anchor-resolvers@npm:^0.2.5": +"@helium/anchor-resolvers@npm:^0.2.17": version: 0.2.21 resolution: "@helium/anchor-resolvers@npm:0.2.21" dependencies: @@ -1079,7 +1044,7 @@ __metadata: "@helium/rewards-burn-sdk": ^0.6.1 "@helium/rewards-oracle-sdk": ^0.6.1 "@helium/spl-utils": ^0.6.1 - "@helium/state-controller-sdk": ^0.0.8 + "@helium/state-controller-sdk": 0.0.8-next.5+4c12e2f "@helium/treasury-management-sdk": ^0.6.1 "@helium/voter-stake-registry-sdk": ^0.6.1 "@solana/spl-token": ^0.3.8 @@ -1589,35 +1554,35 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-hooks@npm:^0.0.8": - version: 0.0.8 - resolution: "@helium/modular-governance-hooks@npm:0.0.8" +"@helium/modular-governance-hooks@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/modular-governance-hooks@npm:0.0.8-next.5" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/account-fetch-cache": ^0.5.0 "@helium/account-fetch-cache-hooks": ^0.5.0 "@helium/helium-react-hooks": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8 - "@helium/organization-sdk": ^0.0.8 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/organization-sdk": ^0.0.8-next.5+4c12e2f "@solana/web3.js": ^1.78.4 peerDependencies: react: ^16.8 || ^17 || ^18 react-dom: ^16.8 || ^17 || ^18 - checksum: ad9019e9c8fb0f28c467d7ddfdf2fbe70005140f4f914389d6e20897118f218175a5cfdc11e764d2e1c5fbee6697445c0e3ff2c1de5f26c14f164d93bca832ad + checksum: ccc3f637e11c0bbf3313010525cbb78d9842cdb2c710152dde28144f646282a78bf2966e5f52f85e4ae02a9d5470fa47cf3602ecd834317334123db96d08bb92 languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.2": - version: 0.0.2 - resolution: "@helium/modular-governance-idls@npm:0.0.2" +"@helium/modular-governance-idls@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/modular-governance-idls@npm:0.0.8-next.5" dependencies: - "@coral-xyz/anchor": "npm:^0.27.0" - "@solana/web3.js": "npm:^1.43.4" - checksum: 2ad5ab42d9a3144f7f80c8b0d04606de4ec117a477d0a48677ada302b204c93f88cab84b708e5944e84734e838c0e009252a82068fdc4ab17d5af88daa12c93f + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 08d1baf216709a6a4e6f88c64f12d73a192b56d1bf4bb3714ef6f4442f3c9aea8d9d4cd56f1782e2100e635852f3913b33718a903de8628e3f12a47b8917610c languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -1660,7 +1625,19 @@ __metadata: languageName: unknown linkType: soft -"@helium/organization-sdk@npm:^0.0.8": +"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@solana/spl-token": ^0.3.8 + checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + languageName: node + linkType: hard + +"@helium/organization-sdk@npm:^0.0.8, @helium/organization-sdk@npm:^0.0.8-next.5+4c12e2f": version: 0.0.8 resolution: "@helium/organization-sdk@npm:0.0.8" dependencies: @@ -1687,14 +1664,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/proposal-sdk@npm:^0.0.2": - version: 0.0.2 - resolution: "@helium/proposal-sdk@npm:0.0.2" +"@helium/proposal-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/proposal-sdk@npm:0.0.8-next.5" dependencies: - "@coral-xyz/anchor": "npm:^0.27.0" - "@helium/anchor-resolvers": "npm:^0.2.5" - "@helium/modular-governance-idls": "npm:^0.0.2" - checksum: 444afea92f1e6a982de10a3ef98dd8aa63324815c432124a76bc88971b48cc7bb39f1086102602e524713a4da35fce4820a7843f807479d1f634bc592d1a67d3 + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.5.0 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + checksum: 6945ef813f98283a40e9d6080343f8d1f215dd38e7d1225d206949b36088de4d35d43452541b2d901be21006d1b764ab63469ef14219788bebd1139f671d2400 languageName: node linkType: hard @@ -1792,14 +1769,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/state-controller-sdk@npm:^0.0.8": - version: 0.0.8 - resolution: "@helium/state-controller-sdk@npm:0.0.8" +"@helium/state-controller-sdk@npm:0.0.8-next.5+4c12e2f": + version: 0.0.8-next.5 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.5" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8 - checksum: 64ff3e83d47512431bdb15d9bda92225455b00099574d3ac4d523696e21ea1a08430d8c75d47390121920c67eacbde4ec91b02c4a36f2e8be038c36aac2b4c08 + "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + checksum: 67a94a895baa71dd6bbe817fda5bb476b07400e21d0e9e8213e0699dc05dca64684674661cde57f4002db20677d6d34e6e03e8e06a698dc05e085dfdae5deb14 languageName: node linkType: hard @@ -1867,7 +1844,8 @@ __metadata: "@helium/account-fetch-cache-hooks": ^0.6.1 "@helium/helium-react-hooks": ^0.6.1 "@helium/helium-sub-daos-sdk": ^0.6.1 - "@helium/modular-governance-hooks": ^0.0.8 + "@helium/modular-governance-hooks": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@helium/spl-utils": ^0.6.1 "@helium/voter-stake-registry-sdk": ^0.6.1 "@metaplex-foundation/js": ^0.19.4 @@ -1892,6 +1870,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -14455,8 +14434,9 @@ __metadata: "@coral-xyz/anchor-cli": ^0.28.0 "@coral-xyz/borsh": ^0.2.6 "@helium/crypto": ^4.10.2 - "@helium/modular-governance-idls": ^0.0.2 - "@helium/proposal-sdk": ^0.0.2 + "@helium/modular-governance-idls": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/proposal-sdk": 0.0.8-next.5+4c12e2f "@helium/transactions": ^3.38.0 "@metaplex-foundation/mpl-bubblegum": ^0.7.0 "@pythnetwork/client": ^2.8.0 From 011a7ac6832bb3cbf5449bb1bfd9a6a11f6efc2b Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 16 Nov 2023 16:09:44 -0600 Subject: [PATCH 002/130] Add scripts --- .../helium-admin-cli/delegation-seasons.json | 9 ++ packages/helium-admin-cli/package.json | 1 + .../src/set-delegation-config.ts | 108 ++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 packages/helium-admin-cli/delegation-seasons.json create mode 100644 packages/helium-admin-cli/src/set-delegation-config.ts diff --git a/packages/helium-admin-cli/delegation-seasons.json b/packages/helium-admin-cli/delegation-seasons.json new file mode 100644 index 000000000..a09a6483a --- /dev/null +++ b/packages/helium-admin-cli/delegation-seasons.json @@ -0,0 +1,9 @@ +[ + "2024-08-01T00:00:00Z", + "2025-08-01T00:00:00Z", + "2026-08-01T00:00:00Z", + "2027-08-01T00:00:00Z", + "2028-08-01T00:00:00Z", + "2029-08-01T00:00:00Z", + "2030-08-01T00:00:00Z" +] diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index 630714baa..87820792f 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -51,6 +51,7 @@ "@helium/mobile-entity-manager-sdk": "^0.6.1", "@helium/price-oracle-sdk": "^0.6.1", "@helium/spl-utils": "^0.6.1", + "@helium/nft-delegation-sdk": "0.0.8-next.5+4c12e2f", "@helium/treasury-management-sdk": "^0.6.1", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-governance": "^0.3.18", diff --git a/packages/helium-admin-cli/src/set-delegation-config.ts b/packages/helium-admin-cli/src/set-delegation-config.ts new file mode 100644 index 000000000..300099cb0 --- /dev/null +++ b/packages/helium-admin-cli/src/set-delegation-config.ts @@ -0,0 +1,108 @@ +import yargs from "yargs/yargs"; +import { exists, loadKeypair, sendInstructionsOrSquads } from "./utils"; +import os from "os"; +import * as anchor from "@coral-xyz/anchor"; +import { init } from "@helium/nft-delegation-sdk"; +import { init as initVsr } from "@helium/voter-stake-registry-sdk"; +import fs from "fs"; +import { sendInstructions } from "@helium/spl-utils"; +import { PublicKey } from "@solana/web3.js"; +import Squads from "@sqds/sdk"; + +export async function run(args: any = process.argv) { + const yarg = yargs(args).options({ + wallet: { + alias: "k", + describe: "Anchor wallet keypair", + default: `${os.homedir()}/.config/solana/id.json`, + }, + url: { + alias: "u", + default: "http://127.0.0.1:8899", + describe: "The solana url", + }, + registrar: { + type: "string", + required: true, + }, + multisig: { + type: "string", + describe: + "Address of the squads multisig to control the dao. If not provided, your wallet will be the authority", + }, + authorityIndex: { + type: "number", + describe: "Authority index for squads. Defaults to 1", + default: 1, + }, + delegationSeasonsFile: { + type: "string", + default: __dirname + "../delegation-seasons.json", + }, + }); + + const argv = await yarg.argv; + process.env.ANCHOR_WALLET = argv.wallet; + process.env.ANCHOR_PROVIDER_URL = argv.url; + anchor.setProvider(anchor.AnchorProvider.local(argv.url)); + const provider = anchor.getProvider() as anchor.AnchorProvider; + const wallet = new anchor.Wallet(loadKeypair(argv.wallet)); + + const squads = Squads.endpoint(process.env.ANCHOR_PROVIDER_URL, wallet, { + commitmentOrConfig: "finalized", + }); + let authority = provider.wallet.publicKey; + let multisig = argv.multisig ? new PublicKey(argv.multisig) : null; + if (multisig) { + authority = squads.getAuthorityPDA(multisig, argv.authorityIndex); + } + + const delProgram = await init(provider); + const vsrProgram = await initVsr(provider); + const registrar = new PublicKey(argv.registrar); + + const delegationSeasonsFile = fs.readFileSync( + argv.delegationSeasonsFile, + "utf8" + ); + const seasons = JSON.parse(delegationSeasonsFile); + + const { + pubkeys: { delegationConfig }, + instruction, + } = await delProgram.methods + .initializeDelegationConfigV0({ + // Set max time to 2 years, though seasons should take precedent + maxDelegationTime: new anchor.BN(24 * 60 * 60 * 365 * 2), + seasons, + name: "Helium", + }) + .accounts({ + authority, + }) + .prepare(); + + if (!(await exists(provider.connection, delegationConfig!))) { + console.log("Creating delegation config"); + await sendInstructions(provider, [instruction]); + } + + console.log("Updating registrar to delegation config") + await sendInstructionsOrSquads({ + provider, + instructions: [ + await vsrProgram.methods + .updateRegistrarV0() + .accounts({ + delegationConfig, + registrar, + }) + .instruction(), + ], + executeTransaction: false, + squads, + multisig: argv.multisig ? new PublicKey(argv.multisig) : undefined, + authorityIndex: argv.authorityIndex, + signers: [], + }); +} From 61f3baac4b34af6447fe4c154f8e488e60422c32 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 16 Nov 2023 17:05:52 -0600 Subject: [PATCH 003/130] Fix build --- packages/helium-admin-cli/package.json | 2 +- packages/helium-admin-cli/yarn.deploy.lock | 1 + programs/voter-stake-registry/Cargo.toml | 1 - yarn.lock | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index 87820792f..b9e5a628a 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -49,9 +49,9 @@ "@helium/helium-sub-daos-sdk": "^0.6.1", "@helium/lazy-distributor-sdk": "^0.6.1", "@helium/mobile-entity-manager-sdk": "^0.6.1", + "@helium/nft-delegation-sdk": "0.0.8-next.5+4c12e2f", "@helium/price-oracle-sdk": "^0.6.1", "@helium/spl-utils": "^0.6.1", - "@helium/nft-delegation-sdk": "0.0.8-next.5+4c12e2f", "@helium/treasury-management-sdk": "^0.6.1", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-governance": "^0.3.18", diff --git a/packages/helium-admin-cli/yarn.deploy.lock b/packages/helium-admin-cli/yarn.deploy.lock index e40cff6b6..f36511b63 100644 --- a/packages/helium-admin-cli/yarn.deploy.lock +++ b/packages/helium-admin-cli/yarn.deploy.lock @@ -315,6 +315,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.6.1 "@helium/lazy-distributor-sdk": ^0.6.1 "@helium/mobile-entity-manager-sdk": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@helium/price-oracle-sdk": ^0.6.1 "@helium/spl-utils": ^0.6.1 "@helium/treasury-management-sdk": ^0.6.1 diff --git a/programs/voter-stake-registry/Cargo.toml b/programs/voter-stake-registry/Cargo.toml index 3bd37cee1..037859378 100644 --- a/programs/voter-stake-registry/Cargo.toml +++ b/programs/voter-stake-registry/Cargo.toml @@ -56,4 +56,3 @@ bincode = "^1.3.1" log = "0.4.14" env_logger = "0.9.0" base64 = "0.13.0" - diff --git a/yarn.lock b/yarn.lock index 0fbb4a96d..b2db3c2bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1272,6 +1272,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.6.1 "@helium/lazy-distributor-sdk": ^0.6.1 "@helium/mobile-entity-manager-sdk": ^0.6.1 + "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f "@helium/price-oracle-sdk": ^0.6.1 "@helium/spl-utils": ^0.6.1 "@helium/treasury-management-sdk": ^0.6.1 From 77f4473a54d390213c7fe5f29c16b3c4b0e2d374 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 16 Nov 2023 17:06:45 -0600 Subject: [PATCH 004/130] Trigger devnet deploy --- programs/voter-stake-registry/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/programs/voter-stake-registry/Cargo.toml b/programs/voter-stake-registry/Cargo.toml index 037859378..3bd37cee1 100644 --- a/programs/voter-stake-registry/Cargo.toml +++ b/programs/voter-stake-registry/Cargo.toml @@ -56,3 +56,4 @@ bincode = "^1.3.1" log = "0.4.14" env_logger = "0.9.0" base64 = "0.13.0" + From 7b6b601c749e71e6f60e14aac061f4fce79f572e Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Fri, 17 Nov 2023 15:38:08 -0300 Subject: [PATCH 005/130] Incorporate fix around primary delegate --- package.json | 6 +- packages/crons/package.json | 2 +- packages/crons/yarn.deploy.lock | 26 +++---- packages/data-credits-sdk/yarn.deploy.lock | 14 ++-- packages/distributor-oracle/yarn.deploy.lock | 14 ++-- packages/entity-invalidator/yarn.deploy.lock | 14 ++-- packages/helium-admin-cli/package.json | 2 +- packages/helium-admin-cli/yarn.deploy.lock | 16 ++--- .../yarn.deploy.lock | 14 ++-- packages/helium-sub-daos-sdk/yarn.deploy.lock | 14 ++-- packages/hotspot-utils/yarn.deploy.lock | 14 ++-- packages/metadata-service/yarn.deploy.lock | 14 ++-- packages/migration-service/yarn.deploy.lock | 14 ++-- .../yarn.deploy.lock | 14 ++-- packages/monitor-service/yarn.deploy.lock | 14 ++-- .../voter-stake-registry-hooks/package.json | 4 +- .../src/contexts/heliumVsrContext.tsx | 8 ++- .../src/hooks/useVotingDelegatePositions.ts | 9 ++- .../yarn.deploy.lock | 32 ++++----- .../voter-stake-registry-sdk/package.json | 2 +- .../voter-stake-registry-sdk/yarn.deploy.lock | 14 ++-- .../vsr-metadata-service/yarn.deploy.lock | 14 ++-- packages/xnft-hotspot/yarn.deploy.lock | 14 ++-- tests/voter-stake-registry.ts | 10 ++- yarn.lock | 70 +++++++++---------- 25 files changed, 189 insertions(+), 180 deletions(-) diff --git a/package.json b/package.json index e5830a931..e9810835d 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,9 @@ "@coral-xyz/anchor-cli": "^0.28.0", "@coral-xyz/borsh": "^0.2.6", "@helium/crypto": "^4.10.2", - "@helium/modular-governance-idls": "0.0.8-next.5+4c12e2f", - "@helium/nft-delegation-sdk": "0.0.8-next.5+4c12e2f", - "@helium/proposal-sdk": "0.0.8-next.5+4c12e2f", + "@helium/modular-governance-idls": "0.0.8-next.10+84cdd0e", + "@helium/nft-delegation-sdk": "0.0.8-next.10+84cdd0e", + "@helium/proposal-sdk": "0.0.8-next.10+84cdd0e", "@helium/transactions": "^3.38.0", "@metaplex-foundation/mpl-bubblegum": "^0.7.0", "@pythnetwork/client": "^2.8.0", diff --git a/packages/crons/package.json b/packages/crons/package.json index 9e0f3c8e0..f899c00c6 100644 --- a/packages/crons/package.json +++ b/packages/crons/package.json @@ -46,7 +46,7 @@ "@helium/rewards-burn-sdk": "^0.6.1", "@helium/rewards-oracle-sdk": "^0.6.1", "@helium/spl-utils": "^0.6.1", - "@helium/state-controller-sdk": "0.0.8-next.5+4c12e2f", + "@helium/state-controller-sdk": "0.0.8-next.10+84cdd0e", "@helium/treasury-management-sdk": "^0.6.1", "@helium/voter-stake-registry-sdk": "^0.6.1", "@solana/spl-token": "^0.3.8", diff --git a/packages/crons/yarn.deploy.lock b/packages/crons/yarn.deploy.lock index 31e6fc64e..7d0d2d9c3 100644 --- a/packages/crons/yarn.deploy.lock +++ b/packages/crons/yarn.deploy.lock @@ -197,7 +197,7 @@ __metadata: "@helium/rewards-burn-sdk": ^0.6.1 "@helium/rewards-oracle-sdk": ^0.6.1 "@helium/spl-utils": ^0.6.1 - "@helium/state-controller-sdk": 0.0.8-next.5+4c12e2f + "@helium/state-controller-sdk": 0.0.8-next.10+84cdd0e "@helium/treasury-management-sdk": ^0.6.1 "@helium/voter-stake-registry-sdk": ^0.6.1 "@solana/spl-token": ^0.3.8 @@ -375,7 +375,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -385,15 +385,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -489,14 +489,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/state-controller-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/state-controller-sdk@npm:0.0.8-next.5" +"@helium/state-controller-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f - checksum: 67a94a895baa71dd6bbe817fda5bb476b07400e21d0e9e8213e0699dc05dca64684674661cde57f4002db20677d6d34e6e03e8e06a698dc05e085dfdae5deb14 + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + checksum: 512cba32c6ef43e67e9f3a4c0776757a22a3e9f0924e707c6d5096070fa5eed1b9a993cf50d319f9ecb8fe1e67b9d5891a9a63dcfb178d0cac7fe0aad1ba39c4 languageName: node linkType: hard @@ -524,7 +524,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/data-credits-sdk/yarn.deploy.lock b/packages/data-credits-sdk/yarn.deploy.lock index c44db6045..e731b8dc0 100644 --- a/packages/data-credits-sdk/yarn.deploy.lock +++ b/packages/data-credits-sdk/yarn.deploy.lock @@ -152,7 +152,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -162,15 +162,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -198,7 +198,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/distributor-oracle/yarn.deploy.lock b/packages/distributor-oracle/yarn.deploy.lock index 9cfb1a1d7..972af8f96 100644 --- a/packages/distributor-oracle/yarn.deploy.lock +++ b/packages/distributor-oracle/yarn.deploy.lock @@ -302,7 +302,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -312,15 +312,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -402,7 +402,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/entity-invalidator/yarn.deploy.lock b/packages/entity-invalidator/yarn.deploy.lock index 711384568..e1fb4598a 100644 --- a/packages/entity-invalidator/yarn.deploy.lock +++ b/packages/entity-invalidator/yarn.deploy.lock @@ -233,7 +233,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -243,15 +243,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -317,7 +317,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index b9e5a628a..08efc9bc9 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -49,7 +49,7 @@ "@helium/helium-sub-daos-sdk": "^0.6.1", "@helium/lazy-distributor-sdk": "^0.6.1", "@helium/mobile-entity-manager-sdk": "^0.6.1", - "@helium/nft-delegation-sdk": "0.0.8-next.5+4c12e2f", + "@helium/nft-delegation-sdk": "0.0.8-next.10+84cdd0e", "@helium/price-oracle-sdk": "^0.6.1", "@helium/spl-utils": "^0.6.1", "@helium/treasury-management-sdk": "^0.6.1", diff --git a/packages/helium-admin-cli/yarn.deploy.lock b/packages/helium-admin-cli/yarn.deploy.lock index f36511b63..5145d3128 100644 --- a/packages/helium-admin-cli/yarn.deploy.lock +++ b/packages/helium-admin-cli/yarn.deploy.lock @@ -315,7 +315,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.6.1 "@helium/lazy-distributor-sdk": ^0.6.1 "@helium/mobile-entity-manager-sdk": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@helium/price-oracle-sdk": ^0.6.1 "@helium/spl-utils": ^0.6.1 "@helium/treasury-management-sdk": ^0.6.1 @@ -440,7 +440,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -450,15 +450,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -555,7 +555,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-entity-manager-sdk/yarn.deploy.lock b/packages/helium-entity-manager-sdk/yarn.deploy.lock index f3e97e853..e4ca398a2 100644 --- a/packages/helium-entity-manager-sdk/yarn.deploy.lock +++ b/packages/helium-entity-manager-sdk/yarn.deploy.lock @@ -202,7 +202,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -212,15 +212,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -286,7 +286,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-sub-daos-sdk/yarn.deploy.lock b/packages/helium-sub-daos-sdk/yarn.deploy.lock index b0a55c82d..408e81451 100644 --- a/packages/helium-sub-daos-sdk/yarn.deploy.lock +++ b/packages/helium-sub-daos-sdk/yarn.deploy.lock @@ -132,7 +132,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -142,15 +142,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -178,7 +178,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/hotspot-utils/yarn.deploy.lock b/packages/hotspot-utils/yarn.deploy.lock index 218f5f89e..2472ee217 100644 --- a/packages/hotspot-utils/yarn.deploy.lock +++ b/packages/hotspot-utils/yarn.deploy.lock @@ -216,7 +216,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -226,15 +226,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -300,7 +300,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/metadata-service/yarn.deploy.lock b/packages/metadata-service/yarn.deploy.lock index e5471dfc7..79833bbd5 100644 --- a/packages/metadata-service/yarn.deploy.lock +++ b/packages/metadata-service/yarn.deploy.lock @@ -281,7 +281,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -291,15 +291,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -365,7 +365,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/migration-service/yarn.deploy.lock b/packages/migration-service/yarn.deploy.lock index 4b64ae959..1cfe4820b 100644 --- a/packages/migration-service/yarn.deploy.lock +++ b/packages/migration-service/yarn.deploy.lock @@ -444,7 +444,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -454,15 +454,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -544,7 +544,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/mobile-entity-manager-sdk/yarn.deploy.lock b/packages/mobile-entity-manager-sdk/yarn.deploy.lock index 0a1ccd6e8..7f45303a2 100644 --- a/packages/mobile-entity-manager-sdk/yarn.deploy.lock +++ b/packages/mobile-entity-manager-sdk/yarn.deploy.lock @@ -220,7 +220,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -230,15 +230,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -304,7 +304,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/monitor-service/yarn.deploy.lock b/packages/monitor-service/yarn.deploy.lock index ec97a167d..f40c0c592 100644 --- a/packages/monitor-service/yarn.deploy.lock +++ b/packages/monitor-service/yarn.deploy.lock @@ -274,7 +274,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -317,15 +317,15 @@ __metadata: languageName: unknown linkType: soft -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -391,7 +391,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/voter-stake-registry-hooks/package.json b/packages/voter-stake-registry-hooks/package.json index 62172f7be..e749e78cd 100644 --- a/packages/voter-stake-registry-hooks/package.json +++ b/packages/voter-stake-registry-hooks/package.json @@ -36,8 +36,8 @@ "@helium/account-fetch-cache-hooks": "^0.6.1", "@helium/helium-react-hooks": "^0.6.1", "@helium/helium-sub-daos-sdk": "^0.6.1", - "@helium/modular-governance-hooks": "0.0.8-next.5+4c12e2f", - "@helium/nft-delegation-sdk": "0.0.8-next.5+4c12e2f", + "@helium/modular-governance-hooks": "0.0.8-next.10+84cdd0e", + "@helium/nft-delegation-sdk": "0.0.8-next.10+84cdd0e", "@helium/spl-utils": "^0.6.1", "@helium/voter-stake-registry-sdk": "^0.6.1", "@metaplex-foundation/js": "^0.19.4", diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index 0498769b7..9a4ae67a2 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -116,7 +116,13 @@ export const HeliumVsrStateProvider: React.FC<{ useDelegatedPositions(delegatedPositionKeys); const delegationKeys = useMemo(() => { - return me && result?.nfts.map((nft) => delegationKey(nft.address!, me)[0]); + return ( + me && + registrar && + result?.nfts.map( + (nft) => delegationKey(registrar.delegationConfig, nft.address!, me)[0] + ) + ); }, [result?.nfts, me?.toBase58()]); const { accounts: delegationAccounts, loading: loadingDelegations } = useDelegations(delegationKeys); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts index 880cad2c4..38020d765 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts @@ -5,6 +5,7 @@ import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { PositionWithMeta } from "../sdk/types"; +import BN from "bn.js" export const useVotingDelegatePositions = () => { const { provider } = useHeliumVsrState(); @@ -13,10 +14,12 @@ export const useVotingDelegatePositions = () => { positions, recipient, programId = PROGRAM_ID, + expirationTime, }: { positions: PositionWithMeta[]; recipient: PublicKey; programId?: PublicKey; + expirationTime: BN; }) => { const isInvalid = !provider; @@ -32,9 +35,11 @@ export const useVotingDelegatePositions = () => { for (const position of positions) { instructions.push( await nftDelegationProgram.methods - .delegateV0() + .delegateV0({ + expirationTime, + }) .accounts({ - mint: position.mint, + asset: position.mint, recipient, }) .instruction() diff --git a/packages/voter-stake-registry-hooks/yarn.deploy.lock b/packages/voter-stake-registry-hooks/yarn.deploy.lock index 5164af1df..57594cfb8 100644 --- a/packages/voter-stake-registry-hooks/yarn.deploy.lock +++ b/packages/voter-stake-registry-hooks/yarn.deploy.lock @@ -699,25 +699,25 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-hooks@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/modular-governance-hooks@npm:0.0.8-next.5" +"@helium/modular-governance-hooks@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/modular-governance-hooks@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/account-fetch-cache": ^0.5.0 "@helium/account-fetch-cache-hooks": ^0.5.0 "@helium/helium-react-hooks": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f - "@helium/organization-sdk": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/organization-sdk": ^0.0.8-next.10+84cdd0e "@solana/web3.js": ^1.78.4 peerDependencies: react: ^16.8 || ^17 || ^18 react-dom: ^16.8 || ^17 || ^18 - checksum: ccc3f637e11c0bbf3313010525cbb78d9842cdb2c710152dde28144f646282a78bf2966e5f52f85e4ae02a9d5470fa47cf3602ecd834317334123db96d08bb92 + checksum: 75f8535ba89abdcd125366ff9021a4e1e2ae83cbdc7eb23f221f11d1982a5352aa737e01e8fac9bf208efa72abbab0d75e8c30eac310a7564d7371a5b9b7644a languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -727,19 +727,19 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard -"@helium/organization-sdk@npm:^0.0.8-next.5+4c12e2f": +"@helium/organization-sdk@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/organization-sdk@npm:0.0.8" dependencies: @@ -810,8 +810,8 @@ __metadata: "@helium/account-fetch-cache-hooks": ^0.6.1 "@helium/helium-react-hooks": ^0.6.1 "@helium/helium-sub-daos-sdk": ^0.6.1 - "@helium/modular-governance-hooks": 0.0.8-next.5+4c12e2f - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/modular-governance-hooks": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@helium/spl-utils": ^0.6.1 "@helium/voter-stake-registry-sdk": ^0.6.1 "@metaplex-foundation/js": ^0.19.4 @@ -836,7 +836,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/voter-stake-registry-sdk/package.json b/packages/voter-stake-registry-sdk/package.json index 072bace81..ff0011c3c 100644 --- a/packages/voter-stake-registry-sdk/package.json +++ b/packages/voter-stake-registry-sdk/package.json @@ -34,7 +34,7 @@ "@coral-xyz/anchor": "^0.28.0", "@helium/anchor-resolvers": "^0.6.1", "@helium/idls": "^0.6.1", - "@helium/nft-delegation-sdk": "0.0.8-next.5+4c12e2f", + "@helium/nft-delegation-sdk": "0.0.8-next.10+84cdd0e", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", "bn.js": "^5.2.0", diff --git a/packages/voter-stake-registry-sdk/yarn.deploy.lock b/packages/voter-stake-registry-sdk/yarn.deploy.lock index e008f3bfb..ecf7c5d22 100644 --- a/packages/voter-stake-registry-sdk/yarn.deploy.lock +++ b/packages/voter-stake-registry-sdk/yarn.deploy.lock @@ -98,7 +98,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -108,15 +108,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -127,7 +127,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/vsr-metadata-service/yarn.deploy.lock b/packages/vsr-metadata-service/yarn.deploy.lock index 98b746d65..b2046def0 100644 --- a/packages/vsr-metadata-service/yarn.deploy.lock +++ b/packages/vsr-metadata-service/yarn.deploy.lock @@ -164,7 +164,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -174,15 +174,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -215,7 +215,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/xnft-hotspot/yarn.deploy.lock b/packages/xnft-hotspot/yarn.deploy.lock index 55ca8c304..806f5b280 100644 --- a/packages/xnft-hotspot/yarn.deploy.lock +++ b/packages/xnft-hotspot/yarn.deploy.lock @@ -535,7 +535,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -545,15 +545,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard @@ -635,7 +635,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/tests/voter-stake-registry.ts b/tests/voter-stake-registry.ts index 0210d6eba..5ce9435ef 100644 --- a/tests/voter-stake-registry.ts +++ b/tests/voter-stake-registry.ts @@ -514,7 +514,7 @@ describe("voter-stake-registry", () => { }) .accounts({ delegationConfig, - mint, + asset: mint, recipient: delegatee.publicKey, }) .rpc({ skipPreflight: true }); @@ -589,14 +589,13 @@ describe("voter-stake-registry", () => { expect(markerA?.delegationIndex).to.eq(1); await program.methods - .delegatedRelinquishVoteV0({ + .relinquishVoteV1({ choice: 0, }) .accounts({ mint, proposal, position, - owner: me, }) .rpc({ skipPreflight: true }); @@ -608,14 +607,13 @@ describe("voter-stake-registry", () => { expect(markerA).to.be.null; await program.methods - .delegatedVoteV0({ + .voteV0({ choice: 1, }) .accounts({ mint, proposal, position, - owner: me, }) .rpcAndKeys({ skipPreflight: true }); @@ -630,7 +628,7 @@ describe("voter-stake-registry", () => { it("allows the original owner to undelegate", async () => { const toUndelegate = delegationKey(delegationConfig!, mint, delegatee.publicKey)[0]; - const myDelegation = delegationKey(delegationConfig!, mint, me)[0]; + const myDelegation = delegationKey(delegationConfig!, mint, PublicKey.default)[0]; await delegateProgram.methods .undelegateV0() .accounts({ diff --git a/yarn.lock b/yarn.lock index b2db3c2bd..1b5439d99 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1044,7 +1044,7 @@ __metadata: "@helium/rewards-burn-sdk": ^0.6.1 "@helium/rewards-oracle-sdk": ^0.6.1 "@helium/spl-utils": ^0.6.1 - "@helium/state-controller-sdk": 0.0.8-next.5+4c12e2f + "@helium/state-controller-sdk": 0.0.8-next.10+84cdd0e "@helium/treasury-management-sdk": ^0.6.1 "@helium/voter-stake-registry-sdk": ^0.6.1 "@solana/spl-token": ^0.3.8 @@ -1272,7 +1272,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.6.1 "@helium/lazy-distributor-sdk": ^0.6.1 "@helium/mobile-entity-manager-sdk": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@helium/price-oracle-sdk": ^0.6.1 "@helium/spl-utils": ^0.6.1 "@helium/treasury-management-sdk": ^0.6.1 @@ -1555,35 +1555,35 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-hooks@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/modular-governance-hooks@npm:0.0.8-next.5" +"@helium/modular-governance-hooks@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/modular-governance-hooks@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/account-fetch-cache": ^0.5.0 "@helium/account-fetch-cache-hooks": ^0.5.0 "@helium/helium-react-hooks": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f - "@helium/organization-sdk": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/organization-sdk": ^0.0.8-next.10+84cdd0e "@solana/web3.js": ^1.78.4 peerDependencies: react: ^16.8 || ^17 || ^18 react-dom: ^16.8 || ^17 || ^18 - checksum: ccc3f637e11c0bbf3313010525cbb78d9842cdb2c710152dde28144f646282a78bf2966e5f52f85e4ae02a9d5470fa47cf3602ecd834317334123db96d08bb92 + checksum: 75f8535ba89abdcd125366ff9021a4e1e2ae83cbdc7eb23f221f11d1982a5352aa737e01e8fac9bf208efa72abbab0d75e8c30eac310a7564d7371a5b9b7644a languageName: node linkType: hard -"@helium/modular-governance-idls@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/modular-governance-idls@npm:0.0.8-next.5" +"@helium/modular-governance-idls@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/modular-governance-idls@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@solana/web3.js": ^1.78.4 - checksum: 08d1baf216709a6a4e6f88c64f12d73a192b56d1bf4bb3714ef6f4442f3c9aea8d9d4cd56f1782e2100e635852f3913b33718a903de8628e3f12a47b8917610c + checksum: 77bb16aabe81be74bfa6a00ceccc99b6e833980aae21ddae7dad9ee0c9706d43531ed795e6302506e65d9fca63a0b70740cc8cb698ba375054e773504afb145b languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.5+4c12e2f": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -1626,19 +1626,19 @@ __metadata: languageName: unknown linkType: soft -"@helium/nft-delegation-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.5" +"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e "@solana/spl-token": ^0.3.8 - checksum: 49ad48485da17e7191d0bf2048a60160b2cdbe9865cb33b47c8f4b3a6bcbca7f4d79650ba7a8dc51faa88c60b72e647d92d9e1867e4b8ccb51aceaa614eef5e8 + checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea languageName: node linkType: hard -"@helium/organization-sdk@npm:^0.0.8, @helium/organization-sdk@npm:^0.0.8-next.5+4c12e2f": +"@helium/organization-sdk@npm:^0.0.8, @helium/organization-sdk@npm:^0.0.8-next.10+84cdd0e": version: 0.0.8 resolution: "@helium/organization-sdk@npm:0.0.8" dependencies: @@ -1665,14 +1665,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/proposal-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/proposal-sdk@npm:0.0.8-next.5" +"@helium/proposal-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/proposal-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f - checksum: 6945ef813f98283a40e9d6080343f8d1f215dd38e7d1225d206949b36088de4d35d43452541b2d901be21006d1b764ab63469ef14219788bebd1139f671d2400 + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + checksum: fe220bb0bd5562817342674b7ff1b97eb4a01311f1e8175181c45185fda73171f26b6a4e51d24cc0d6fa76a3e930d87700bac2f550b06e8c3bb0bc16ac49c219 languageName: node linkType: hard @@ -1770,14 +1770,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/state-controller-sdk@npm:0.0.8-next.5+4c12e2f": - version: 0.0.8-next.5 - resolution: "@helium/state-controller-sdk@npm:0.0.8-next.5" +"@helium/state-controller-sdk@npm:0.0.8-next.10+84cdd0e": + version: 0.0.8-next.10 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.10" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.5+4c12e2f - checksum: 67a94a895baa71dd6bbe817fda5bb476b07400e21d0e9e8213e0699dc05dca64684674661cde57f4002db20677d6d34e6e03e8e06a698dc05e085dfdae5deb14 + "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + checksum: 512cba32c6ef43e67e9f3a4c0776757a22a3e9f0924e707c6d5096070fa5eed1b9a993cf50d319f9ecb8fe1e67b9d5891a9a63dcfb178d0cac7fe0aad1ba39c4 languageName: node linkType: hard @@ -1845,8 +1845,8 @@ __metadata: "@helium/account-fetch-cache-hooks": ^0.6.1 "@helium/helium-react-hooks": ^0.6.1 "@helium/helium-sub-daos-sdk": ^0.6.1 - "@helium/modular-governance-hooks": 0.0.8-next.5+4c12e2f - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/modular-governance-hooks": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@helium/spl-utils": ^0.6.1 "@helium/voter-stake-registry-sdk": ^0.6.1 "@metaplex-foundation/js": ^0.19.4 @@ -1871,7 +1871,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.1 "@helium/idls": ^0.6.1 - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -14435,9 +14435,9 @@ __metadata: "@coral-xyz/anchor-cli": ^0.28.0 "@coral-xyz/borsh": ^0.2.6 "@helium/crypto": ^4.10.2 - "@helium/modular-governance-idls": 0.0.8-next.5+4c12e2f - "@helium/nft-delegation-sdk": 0.0.8-next.5+4c12e2f - "@helium/proposal-sdk": 0.0.8-next.5+4c12e2f + "@helium/modular-governance-idls": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/proposal-sdk": 0.0.8-next.10+84cdd0e "@helium/transactions": ^3.38.0 "@metaplex-foundation/mpl-bubblegum": ^0.7.0 "@pythnetwork/client": ^2.8.0 From 39459747302d00309532fe3d27f5e454d8efbef4 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Fri, 17 Nov 2023 16:23:45 -0300 Subject: [PATCH 006/130] Finish set delegation config scripts --- packages/helium-admin-cli/src/create-dao.ts | 195 +++++++++------ .../helium-admin-cli/src/create-subdao.ts | 230 ++++++++++-------- .../src/set-delegation-config.ts | 9 +- 3 files changed, 253 insertions(+), 181 deletions(-) diff --git a/packages/helium-admin-cli/src/create-dao.ts b/packages/helium-admin-cli/src/create-dao.ts index 630a68512..9e46dd279 100644 --- a/packages/helium-admin-cli/src/create-dao.ts +++ b/packages/helium-admin-cli/src/create-dao.ts @@ -1,26 +1,26 @@ -import * as anchor from '@coral-xyz/anchor'; -import { ThresholdType } from '@helium/circuit-breaker-sdk'; +import * as anchor from "@coral-xyz/anchor"; +import { ThresholdType } from "@helium/circuit-breaker-sdk"; import { PROGRAM_ID, accountPayerKey, dataCreditsKey, init as initDc, -} from '@helium/data-credits-sdk'; -import { fanoutKey } from '@helium/fanout-sdk'; +} from "@helium/data-credits-sdk"; +import { fanoutKey } from "@helium/fanout-sdk"; import { dataOnlyConfigKey, init as initHem, -} from '@helium/helium-entity-manager-sdk'; +} from "@helium/helium-entity-manager-sdk"; import { daoKey, init as initDao } from "@helium/helium-sub-daos-sdk"; -import { sendInstructions, toBN } from '@helium/spl-utils'; +import { sendInstructions, toBN } from "@helium/spl-utils"; import { init as initVsr, registrarKey, -} from '@helium/voter-stake-registry-sdk'; +} from "@helium/voter-stake-registry-sdk"; import { SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, getConcurrentMerkleTreeAccountSize, -} from '@solana/spl-account-compression'; +} from "@solana/spl-account-compression"; import { GoverningTokenConfigAccountArgs, GoverningTokenType, @@ -29,11 +29,11 @@ import { getGovernanceProgramVersion, withCreateRealm, withSetRealmAuthority, -} from '@solana/spl-governance'; +} from "@solana/spl-governance"; import { createAssociatedTokenAccountIdempotentInstruction, getAssociatedTokenAddressSync, -} from '@solana/spl-token'; +} from "@solana/spl-token"; import { ComputeBudgetProgram, Connection, @@ -43,19 +43,20 @@ import { SystemProgram, Transaction, TransactionInstruction, -} from '@solana/web3.js'; -import Squads from '@sqds/sdk'; -import { BN } from 'bn.js'; -import fs from 'fs'; -import os from 'os'; -import yargs from 'yargs/yargs'; +} from "@solana/web3.js"; +import Squads from "@sqds/sdk"; +import { BN } from "bn.js"; +import fs from "fs"; +import os from "os"; +import yargs from "yargs/yargs"; import { createAndMint, isLocalhost, loadKeypair, parseEmissionsSchedule, sendInstructionsOrSquads, -} from './utils'; +} from "./utils"; +import { init } from "@helium/nft-delegation-sdk"; const SECS_PER_DAY = 86400; const SECS_PER_YEAR = 365 * SECS_PER_DAY; @@ -73,108 +74,112 @@ async function exists( export async function run(args: any = process.argv) { const yarg = yargs(args).options({ wallet: { - alias: 'k', - describe: 'Anchor wallet keypair', + alias: "k", + describe: "Anchor wallet keypair", default: `${os.homedir()}/.config/solana/id.json`, }, url: { - alias: 'u', - default: 'http://127.0.0.1:8899', - describe: 'The solana url', + alias: "u", + default: "http://127.0.0.1:8899", + describe: "The solana url", }, hntKeypair: { - type: 'string', - describe: 'Keypair of the HNT token', + type: "string", + describe: "Keypair of the HNT token", default: `${__dirname}/../../keypairs/hnt.json`, }, dcKeypair: { - type: 'string', - describe: 'Keypair of the Data Credit token', + type: "string", + describe: "Keypair of the Data Credit token", default: `${__dirname}/../../keypairs/dc.json`, }, numHnt: { - type: 'number', + type: "number", describe: - 'Number of HNT tokens to pre mint before assigning authority to lazy distributor', + "Number of HNT tokens to pre mint before assigning authority to lazy distributor", default: 0, }, numDc: { - type: 'number', + type: "number", describe: - 'Number of DC tokens to pre mint before assigning authority to lazy distributor', + "Number of DC tokens to pre mint before assigning authority to lazy distributor", default: 1000, }, bucket: { - type: 'string', - describe: 'Bucket URL prefix holding all of the metadata jsons', + type: "string", + describe: "Bucket URL prefix holding all of the metadata jsons", default: - 'https://shdw-drive.genesysgo.net/6tcnBSybPG7piEDShBcrVtYJDPSvGrDbVvXmXKpzBvWP', + "https://shdw-drive.genesysgo.net/6tcnBSybPG7piEDShBcrVtYJDPSvGrDbVvXmXKpzBvWP", }, emissionSchedulePath: { required: true, - describe: 'Path to file that contains the hnt emissions schedule', - type: 'string', + describe: "Path to file that contains the hnt emissions schedule", + type: "string", default: `${__dirname}/../../emissions/hnt.json`, }, hstEmissionSchedulePath: { required: true, - describe: 'Path to file that contains the hst emissions schedule', - type: 'string', + describe: "Path to file that contains the hst emissions schedule", + type: "string", default: `${__dirname}/../../emissions/hst.json`, }, govProgramId: { - type: 'string', - describe: 'Pubkey of the GOV program', - default: 'hgovkRU6Ghe1Qoyb54HdSLdqN7VtxaifBzRmh9jtd3S', + type: "string", + describe: "Pubkey of the GOV program", + default: "hgovkRU6Ghe1Qoyb54HdSLdqN7VtxaifBzRmh9jtd3S", }, realmName: { - type: 'string', - describe: 'Name of the realm to be generated', - default: 'Helium', + type: "string", + describe: "Name of the realm to be generated", + default: "Helium", }, councilKeypair: { - type: 'string', - describe: 'Keypair of gov council token', + type: "string", + describe: "Keypair of gov council token", default: `${__dirname}/../../keypairs/council.json`, }, councilWallet: { - type: 'string', - describe: 'Pubkey for holding/distributing council tokens', + type: "string", + describe: "Pubkey for holding/distributing council tokens", default: await loadKeypair( `${os.homedir()}/.config/solana/id.json` ).publicKey.toBase58(), }, numCouncil: { - type: 'number', + type: "number", describe: - 'Number of Gov Council tokens to pre mint before assigning authority to dao', + "Number of Gov Council tokens to pre mint before assigning authority to dao", default: 10, }, multisig: { - type: 'string', + type: "string", describe: - 'Address of the squads multisig to control the dao. If not provided, your wallet will be the authority', + "Address of the squads multisig to control the dao. If not provided, your wallet will be the authority", }, authorityIndex: { - type: 'number', - describe: 'Authority index for squads. Defaults to 1', + type: "number", + describe: "Authority index for squads. Defaults to 1", default: 1, }, hntPriceOracle: { - type: 'string', + type: "string", required: true, }, numHst: { - type: 'number', + type: "number", describe: - 'Number of HST tokens to pre mint before assigning authority to lazy distributor', + "Number of HST tokens to pre mint before assigning authority to lazy distributor", default: 0, }, merklePath: { - type: 'string', - describe: 'Path to the merkle keypair', + type: "string", + describe: "Path to the merkle keypair", default: `${__dirname}/../../keypairs/data-only-merkle.json`, }, + delegationSeasonsFile: { + type: "string", + default: `${__dirname}/../../delegation-seasons.json`, + }, }); const argv = await yarg.argv; @@ -198,18 +203,26 @@ export async function run(args: any = process.argv) { const me = provider.wallet.publicKey; const dao = daoKey(hntKeypair.publicKey)[0]; - console.log('HNT', hntKeypair.publicKey.toBase58()); - console.log('DC', dcKeypair.publicKey.toBase58()); - console.log('GOV PID', govProgramId.toBase58()); - console.log('COUNCIL', councilKeypair.publicKey.toBase58()); - console.log('COUNCIL WALLET', councilWallet.toBase58()); + console.log("HNT", hntKeypair.publicKey.toBase58()); + console.log("DC", dcKeypair.publicKey.toBase58()); + console.log("GOV PID", govProgramId.toBase58()); + console.log("COUNCIL", councilKeypair.publicKey.toBase58()); + console.log("COUNCIL WALLET", councilWallet.toBase58()); + + console.log("DAO", dao.toString()); - console.log('DAO', dao.toString()); + const delegationSeasonsFile = fs.readFileSync( + argv.delegationSeasonsFile, + "utf8" + ); + const seasons = JSON.parse(delegationSeasonsFile).map( + (s) => new anchor.BN(Math.floor(Date.parse(s) / 1000)) + ); const conn = provider.connection; const squads = Squads.endpoint(process.env.ANCHOR_PROVIDER_URL, wallet, { - commitmentOrConfig: 'finalized', + commitmentOrConfig: "finalized", }); let authority = provider.wallet.publicKey; let multisig = argv.multisig ? new PublicKey(argv.multisig) : null; @@ -218,7 +231,7 @@ export async function run(args: any = process.argv) { // Fund authority const authAcc = await provider.connection.getAccountInfo(authority); if (!authAcc || authAcc.lamports < LAMPORTS_PER_SOL) { - console.log('Funding multisig...'); + console.log("Funding multisig..."); await sendInstructions(provider, [ await SystemProgram.transfer({ fromPubkey: me, @@ -260,19 +273,40 @@ export async function run(args: any = process.argv) { const govProgramVersion = await getGovernanceProgramVersion( conn, govProgramId, - isLocalhost(provider) ? 'localnet' : undefined + isLocalhost(provider) ? "localnet" : undefined ); + const delProgram = await init(provider); + const { + pubkeys: { delegationConfig }, + instruction, + } = await delProgram.methods + .initializeDelegationConfigV0({ + // Set max time to 2 years, though seasons should take precedent + maxDelegationTime: new anchor.BN(24 * 60 * 60 * 365 * 2), + seasons, + name: "Helium", + }) + .accounts({ + authority, + }) + .prepare(); + + if (!(await exists(provider.connection, delegationConfig!))) { + console.log("Creating delegation config"); + await sendInstructions(provider, [instruction]); + } + const realmName = argv.realmName; const realm = await PublicKey.findProgramAddressSync( - [Buffer.from('governance', 'utf-8'), Buffer.from(realmName, 'utf-8')], + [Buffer.from("governance", "utf-8"), Buffer.from(realmName, "utf-8")], govProgramId )[0]; - console.log('Realm, ', realm.toBase58()); + console.log("Realm, ", realm.toBase58()); const needRealmCreate = !(await exists(conn, realm)); if (needRealmCreate) { - console.log('Initializing Realm'); + console.log("Initializing Realm"); await withCreateRealm( instructions, govProgramId, @@ -303,7 +337,7 @@ export async function run(args: any = process.argv) { const registrar = (await registrarKey(realm, hntKeypair.publicKey))[0]; if (!(await exists(conn, registrar))) { - console.log('Initializing VSR Registrar'); + console.log("Initializing VSR Registrar"); instructions.push( ComputeBudgetProgram.setComputeUnitLimit({ units: 800000 }) ); @@ -315,6 +349,7 @@ export async function run(args: any = process.argv) { .accounts({ realm, realmGoverningTokenMint: hntKeypair.publicKey, + delegationConfig, }) .instruction() ); @@ -322,7 +357,7 @@ export async function run(args: any = process.argv) { instructions = []; } - console.log('Configuring VSR voting mint at [0]'); + console.log("Configuring VSR voting mint at [0]"); instructions.push( await heliumVsrProgram.methods .configureVotingMintV0({ @@ -332,7 +367,7 @@ export async function run(args: any = process.argv) { maxExtraLockupVoteWeightScaledFactor: new anchor.BN(SCALE * 1e9), genesisVotePowerMultiplier: GENESIS_MULTIPLIER, // April 28th, 23:59:59 UTC - genesisVotePowerMultiplierExpirationTs: new anchor.BN('1682726399'), + genesisVotePowerMultiplierExpirationTs: new anchor.BN("1682726399"), lockupSaturationSecs: new anchor.BN(MAX_LOCKUP), }) .accounts({ @@ -351,7 +386,7 @@ export async function run(args: any = process.argv) { await sendInstructions(provider, instructions, []); instructions = []; - console.log('Creating max voter record'); + console.log("Creating max voter record"); instructions.push( await heliumVsrProgram.methods .updateMaxVoterWeightV0() @@ -380,7 +415,7 @@ export async function run(args: any = process.argv) { instructions = []; const dcKey = (await dataCreditsKey(dcKeypair.publicKey))[0]; - console.log('dcpid', PROGRAM_ID.toBase58()); + console.log("dcpid", PROGRAM_ID.toBase58()); if (!(await exists(conn, dcKey))) { await dataCreditsProgram.methods .initializeDataCreditsV0({ @@ -388,7 +423,7 @@ export async function run(args: any = process.argv) { config: { windowSizeSeconds: new anchor.BN(60 * 60), thresholdType: ThresholdType.Absolute as never, - threshold: new anchor.BN('1000000000000'), + threshold: new anchor.BN("1000000000000"), }, }) .accounts({ @@ -414,14 +449,14 @@ export async function run(args: any = process.argv) { } if (!(await exists(conn, dao))) { - console.log('Initializing DAO'); + console.log("Initializing DAO"); const hstEmission = await parseEmissionsSchedule( argv.hstEmissionSchedulePath ); const hntEmission = await parseEmissionsSchedule(argv.emissionSchedulePath); const currentHstEmission = hstEmission[0]; const currentHntEmission = hntEmission[0]; - const fanout = fanoutKey('HST')[0]; + const fanout = fanoutKey("HST")[0]; const hstPool = getAssociatedTokenAddressSync( hntKeypair.publicKey, fanout, @@ -521,9 +556,9 @@ export async function run(args: any = process.argv) { getConcurrentMerkleTreeAccountSize(size, buffer, canopy) ), newTreeFeeLamports: new BN(cost / 2 ** size), - name: 'DATAONLY', + name: "DATAONLY", metadataUrl: - 'https://shdw-drive.genesysgo.net/H8b1gZmA2aBqDYxicxawGpznCaNbFSEJ3YnJuawGQ2EQ/data-only.json', + "https://shdw-drive.genesysgo.net/H8b1gZmA2aBqDYxicxawGpznCaNbFSEJ3YnJuawGQ2EQ/data-only.json", }) .accounts({ dao, diff --git a/packages/helium-admin-cli/src/create-subdao.ts b/packages/helium-admin-cli/src/create-subdao.ts index 69012927c..989b54735 100644 --- a/packages/helium-admin-cli/src/create-subdao.ts +++ b/packages/helium-admin-cli/src/create-subdao.ts @@ -1,27 +1,28 @@ -import * as anchor from '@coral-xyz/anchor'; -import { ThresholdType } from '@helium/circuit-breaker-sdk'; +import * as anchor from "@coral-xyz/anchor"; +import { ThresholdType } from "@helium/circuit-breaker-sdk"; import { init as initHem, rewardableEntityConfigKey, -} from '@helium/helium-entity-manager-sdk'; +} from "@helium/helium-entity-manager-sdk"; +import fs from "fs"; import { daoKey, init as initDao, subDaoKey, threadKey, delegatorRewardsPercent, -} from '@helium/helium-sub-daos-sdk'; +} from "@helium/helium-sub-daos-sdk"; import { init as initLazy, lazyDistributorKey, -} from '@helium/lazy-distributor-sdk'; -import { oracleSignerKey } from '@helium/rewards-oracle-sdk'; -import { sendInstructions, toBN } from '@helium/spl-utils'; -import { toU128 } from '@helium/treasury-management-sdk'; +} from "@helium/lazy-distributor-sdk"; +import { oracleSignerKey } from "@helium/rewards-oracle-sdk"; +import { sendInstructions, toBN } from "@helium/spl-utils"; +import { toU128 } from "@helium/treasury-management-sdk"; import { init as initVsr, registrarKey, -} from '@helium/voter-stake-registry-sdk'; +} from "@helium/voter-stake-registry-sdk"; import { getGovernanceProgramVersion, GoverningTokenConfigAccountArgs, @@ -30,18 +31,18 @@ import { SetRealmAuthorityAction, withCreateRealm, withSetRealmAuthority, -} from '@solana/spl-governance'; -import { getAssociatedTokenAddress } from '@solana/spl-token'; +} from "@solana/spl-governance"; +import { getAssociatedTokenAddress } from "@solana/spl-token"; import { ComputeBudgetProgram, LAMPORTS_PER_SOL, PublicKey, SystemProgram, TransactionInstruction, -} from '@solana/web3.js'; -import Squads from '@sqds/sdk'; -import os from 'os'; -import yargs from 'yargs/yargs'; +} from "@solana/web3.js"; +import Squads from "@sqds/sdk"; +import os from "os"; +import yargs from "yargs/yargs"; import { createAndMint, exists, @@ -50,7 +51,8 @@ import { loadKeypair, parseEmissionsSchedule, sendInstructionsOrSquads, -} from './utils'; +} from "./utils"; +import { init } from "@helium/nft-delegation-sdk"; const SECS_PER_DAY = 86400; const SECS_PER_YEAR = 365 * SECS_PER_DAY; @@ -61,131 +63,135 @@ const SCALE = 100; export async function run(args: any = process.argv) { const yarg = yargs(args).options({ wallet: { - alias: 'k', - describe: 'Anchor wallet keypair', + alias: "k", + describe: "Anchor wallet keypair", default: `${os.homedir()}/.config/solana/id.json`, }, noHotspots: { - type: 'boolean', + type: "boolean", default: false, }, url: { - alias: 'u', - default: 'http://127.0.0.1:8899', - describe: 'The solana url', + alias: "u", + default: "http://127.0.0.1:8899", + describe: "The solana url", }, hntPubkey: { - type: 'string', - describe: 'Pubkey of the HNT token', + type: "string", + describe: "Pubkey of the HNT token", }, dcPubkey: { - type: 'string', - describe: 'Pubkey of the DC token', + type: "string", + describe: "Pubkey of the DC token", }, name: { - alias: 'n', - describe: 'The name of the subdao', - type: 'string', + alias: "n", + describe: "The name of the subdao", + type: "string", required: true, }, realmName: { - describe: 'The name of the realm', - type: 'string', + describe: "The name of the realm", + type: "string", required: true, }, subdaoKeypair: { - type: 'string', - describe: 'Keypair of the subdao token', + type: "string", + describe: "Keypair of the subdao token", required: true, }, executeTransaction: { - type: 'boolean', + type: "boolean", }, numTokens: { - type: 'number', + type: "number", describe: - 'Number of subdao tokens to pre mint before assigning authority to lazy distributor', + "Number of subdao tokens to pre mint before assigning authority to lazy distributor", default: 0, }, bucket: { - type: 'string', - describe: 'Bucket URL prefix holding all of the metadata jsons', + type: "string", + describe: "Bucket URL prefix holding all of the metadata jsons", default: - 'https://shdw-drive.genesysgo.net/6tcnBSybPG7piEDShBcrVtYJDPSvGrDbVvXmXKpzBvWP', + "https://shdw-drive.genesysgo.net/6tcnBSybPG7piEDShBcrVtYJDPSvGrDbVvXmXKpzBvWP", }, rewardsOracleUrl: { - alias: 'ro', - type: 'string', - describe: 'The rewards oracle URL', - default: 'http://localhost:8080', + alias: "ro", + type: "string", + describe: "The rewards oracle URL", + default: "http://localhost:8080", }, oracleKeypair: { - type: 'string', - describe: 'Keypair of the oracle', + type: "string", + describe: "Keypair of the oracle", default: `${__dirname}/../../keypairs/oracle.json`, }, aggregatorKeypair: { - type: 'string', - describe: 'Keypair of the aggregtor', + type: "string", + describe: "Keypair of the aggregtor", }, dcBurnAuthority: { - type: 'string', - describe: 'The authority to burn DC tokens', + type: "string", + describe: "The authority to burn DC tokens", required: true, }, queue: { - type: 'string', - describe: 'Switchbaord oracle queue', - default: 'uPeRMdfPmrPqgRWSrjAnAkH78RqAhe5kXoW6vBYRqFX', + type: "string", + describe: "Switchbaord oracle queue", + default: "uPeRMdfPmrPqgRWSrjAnAkH78RqAhe5kXoW6vBYRqFX", }, crank: { - type: 'string', - describe: 'Switchboard crank', - default: 'UcrnK4w2HXCEjY8z6TcQ9tysYr3c9VcFLdYAU9YQP5e', + type: "string", + describe: "Switchboard crank", + default: "UcrnK4w2HXCEjY8z6TcQ9tysYr3c9VcFLdYAU9YQP5e", }, switchboardNetwork: { - type: 'string', - describe: 'The switchboard network', - default: 'mainnet-beta', + type: "string", + describe: "The switchboard network", + default: "mainnet-beta", }, decimals: { - type: 'number', + type: "number", default: 6, }, govProgramId: { - type: 'string', - describe: 'Pubkey of the GOV program', - default: 'hgovkRU6Ghe1Qoyb54HdSLdqN7VtxaifBzRmh9jtd3S', + type: "string", + describe: "Pubkey of the GOV program", + default: "hgovkRU6Ghe1Qoyb54HdSLdqN7VtxaifBzRmh9jtd3S", }, councilKeypair: { - type: 'string', - describe: 'Keypair of gov council token', + type: "string", + describe: "Keypair of gov council token", default: `${__dirname}/../../keypairs/council.json`, }, multisig: { - type: 'string', + type: "string", describe: - 'Address of the squads multisig for subdao authority. If not provided, your wallet will be the authority', + "Address of the squads multisig for subdao authority. If not provided, your wallet will be the authority", }, authorityIndex: { - type: 'number', - describe: 'Authority index for squads. Defaults to 1', + type: "number", + describe: "Authority index for squads. Defaults to 1", default: 1, }, delegatorRewardsPercent: { - type: 'number', + type: "number", required: true, describe: - 'Percentage of rewards allocated to delegators. Must be between 0-100 and can have 8 decimal places.', + "Percentage of rewards allocated to delegators. Must be between 0-100 and can have 8 decimal places.", }, emissionSchedulePath: { required: true, - describe: 'Path to file that contains the dnt emissions schedule', - type: 'string', + describe: "Path to file that contains the dnt emissions schedule", + type: "string", }, activeDeviceAuthority: { - type: 'string', - describe: 'The authority that can set hotspot active status', + type: "string", + describe: "The authority that can set hotspot active status", + }, + delegationSeasonsFile: { + type: "string", + default: `${__dirname}/../../delegation-seasons.json`, }, }); const argv = await yarg.argv; @@ -216,26 +222,34 @@ export async function run(args: any = process.argv) { const councilKeypair = await loadKeypair(argv.councilKeypair); const me = provider.wallet.publicKey; - console.log('Subdao mint', subdaoKeypair.publicKey.toBase58()); - console.log('GOV PID', govProgramId.toBase58()); - console.log('COUNCIL', councilKeypair.publicKey.toBase58()); + console.log("Subdao mint", subdaoKeypair.publicKey.toBase58()); + console.log("GOV PID", govProgramId.toBase58()); + console.log("COUNCIL", councilKeypair.publicKey.toBase58()); const conn = provider.connection; const dao = (await daoKey(new PublicKey(argv.hntPubkey!)))[0]; const subdao = (await subDaoKey(subdaoKeypair.publicKey))[0]; - console.log('DAO', dao.toString()); - console.log('SUBDAO', subdao.toString()); + console.log("DAO", dao.toString()); + console.log("SUBDAO", subdao.toString()); const daoAcc = await heliumSubDaosProgram.account.daoV0.fetch(dao); - const calculateThread = threadKey(subdao, 'calculate')[0]; - const issueThread = threadKey(subdao, 'issue')[0]; + const delegationSeasonsFile = fs.readFileSync( + argv.delegationSeasonsFile, + "utf8" + ); + const seasons = JSON.parse(delegationSeasonsFile).map( + (s) => new anchor.BN(Math.floor(Date.parse(s) / 1000)) + ); + + const calculateThread = threadKey(subdao, "calculate")[0]; + const issueThread = threadKey(subdao, "issue")[0]; const emissionSchedule = await parseEmissionsSchedule( argv.emissionSchedulePath ); const squads = Squads.endpoint(process.env.ANCHOR_PROVIDER_URL, wallet, { - commitmentOrConfig: 'finalized', + commitmentOrConfig: "finalized", }); let authority = provider.wallet.publicKey; const multisig = argv.multisig ? new PublicKey(argv.multisig) : null; @@ -243,11 +257,9 @@ export async function run(args: any = process.argv) { authority = squads.getAuthorityPDA(multisig, argv.authorityIndex); } if (await exists(conn, subdao)) { - console.log( - `Subdao exists. Key: ${subdao.toBase58()}.` - ); - console.log('Calculate thread', calculateThread.toString()); - console.log('Issue thread', issueThread.toString()); + console.log(`Subdao exists. Key: ${subdao.toBase58()}.`); + console.log("Calculate thread", calculateThread.toString()); + console.log("Issue thread", issueThread.toString()); return; } const [lazyDist] = await lazyDistributorKey(subdaoKeypair.publicKey); @@ -261,7 +273,7 @@ export async function run(args: any = process.argv) { const auth = await provider.connection.getAccountInfo(daoAcc.authority); if (auth!.owner.equals(govProgramId)) { const daoPayer = PublicKey.findProgramAddressSync( - [Buffer.from('native-treasury', 'utf-8'), daoAcc.authority.toBuffer()], + [Buffer.from("native-treasury", "utf-8"), daoAcc.authority.toBuffer()], govProgramId )[0]; payer = daoPayer; @@ -282,18 +294,39 @@ export async function run(args: any = process.argv) { const govProgramVersion = await getGovernanceProgramVersion( conn, govProgramId, - isLocalhost(provider) ? 'localnet' : undefined + isLocalhost(provider) ? "localnet" : undefined ); + const delProgram = await init(provider); + const { + pubkeys: { delegationConfig }, + instruction, + } = await delProgram.methods + .initializeDelegationConfigV0({ + // Set max time to 2 years, though seasons should take precedent + maxDelegationTime: new anchor.BN(24 * 60 * 60 * 365 * 2), + seasons, + name: "Helium", + }) + .accounts({ + authority, + }) + .prepare(); + + if (!(await exists(provider.connection, delegationConfig!))) { + console.log("Creating delegation config"); + await sendInstructions(provider, [instruction]); + } + const realmName = argv.realmName; const realm = await PublicKey.findProgramAddressSync( - [Buffer.from('governance', 'utf-8'), Buffer.from(realmName, 'utf-8')], + [Buffer.from("governance", "utf-8"), Buffer.from(realmName, "utf-8")], govProgramId )[0]; - console.log('Realm, ', realm.toBase58()); + console.log("Realm, ", realm.toBase58()); const isFreshRealm = !(await exists(conn, realm)); if (isFreshRealm) { - console.log('Initializing Realm'); + console.log("Initializing Realm"); await withCreateRealm( instructions, govProgramId, @@ -324,7 +357,7 @@ export async function run(args: any = process.argv) { const registrar = (await registrarKey(realm, subdaoKeypair.publicKey))[0]; if (!(await exists(conn, registrar))) { - console.log('Initializing VSR Registrar'); + console.log("Initializing VSR Registrar"); instructions.push( await heliumVsrProgram.methods .initializeRegistrarV0({ @@ -336,10 +369,11 @@ export async function run(args: any = process.argv) { .accounts({ realm, realmGoverningTokenMint: subdaoKeypair.publicKey, + delegationConfig, }) .instruction() ); - console.log('Configuring VSR voting mint at [0]'); + console.log("Configuring VSR voting mint at [0]"); instructions.push( await heliumVsrProgram.methods .configureVotingMintV0({ @@ -370,7 +404,7 @@ export async function run(args: any = process.argv) { await sendInstructions(provider, instructions, []); instructions = []; - console.log('Creating max voter record'); + console.log("Creating max voter record"); instructions.push( await heliumVsrProgram.methods .updateMaxVoterWeightV0() @@ -446,9 +480,9 @@ export async function run(args: any = process.argv) { } as any, // $40 for iot, $0 for mobile onboardingDcFee: - name.toUpperCase() == 'IOT' ? toBN(4000000, 0) : toBN(0, 0), + name.toUpperCase() == "IOT" ? toBN(4000000, 0) : toBN(0, 0), onboardingDataOnlyDcFee: - name.toUpperCase() == 'IOT' ? toBN(1000000, 0) : toBN(0, 0), + name.toUpperCase() == "IOT" ? toBN(1000000, 0) : toBN(0, 0), delegatorRewardsPercent: delegatorRewardsPercent( argv.delegatorRewardsPercent ), @@ -528,7 +562,7 @@ export async function run(args: any = process.argv) { const instructions: TransactionInstruction[] = []; console.log(`Initalizing ${name} RewardableEntityConfig`); let settings; - if (name.toUpperCase() == 'IOT') { + if (name.toUpperCase() == "IOT") { settings = { iotConfig: { minGain: 10, diff --git a/packages/helium-admin-cli/src/set-delegation-config.ts b/packages/helium-admin-cli/src/set-delegation-config.ts index 300099cb0..02ffd34d9 100644 --- a/packages/helium-admin-cli/src/set-delegation-config.ts +++ b/packages/helium-admin-cli/src/set-delegation-config.ts @@ -37,7 +37,7 @@ export async function run(args: any = process.argv) { }, delegationSeasonsFile: { type: "string", - default: __dirname + "../delegation-seasons.json", + default: `${__dirname}/../../delegation-seasons.json`, }, }); @@ -65,7 +65,9 @@ export async function run(args: any = process.argv) { argv.delegationSeasonsFile, "utf8" ); - const seasons = JSON.parse(delegationSeasonsFile); + const seasons = JSON.parse(delegationSeasonsFile).map( + (s) => new anchor.BN(Math.floor(Date.parse(s) / 1000)) + ); const { pubkeys: { delegationConfig }, @@ -87,7 +89,7 @@ export async function run(args: any = process.argv) { await sendInstructions(provider, [instruction]); } - console.log("Updating registrar to delegation config") + console.log("Updating registrar to delegation config"); await sendInstructionsOrSquads({ provider, instructions: [ @@ -96,6 +98,7 @@ export async function run(args: any = process.argv) { .accounts({ delegationConfig, registrar, + realmAuthority: authority, }) .instruction(), ], From b20a67f49c0b871901a32841016a4307f053c897 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Fri, 17 Nov 2023 16:38:25 -0300 Subject: [PATCH 007/130] Fix bugs in test --- tests/utils/vsr.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/utils/vsr.ts b/tests/utils/vsr.ts index 98e8e17b7..8ac60defb 100644 --- a/tests/utils/vsr.ts +++ b/tests/utils/vsr.ts @@ -62,6 +62,7 @@ export async function initVsr( .accounts({ realm: realmPk, realmGoverningTokenMint: hntMint, + delegationConfig: null }); instructions.push(await createRegistrar.instruction()); const registrar = (await createRegistrar.pubkeys()).registrar as PublicKey; From 554d23cb9e7987e0951f0f08a616b76817ff8acd Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Mon, 20 Nov 2023 19:07:20 -0300 Subject: [PATCH 008/130] Bugfixes --- .../src/contexts/heliumVsrContext.tsx | 79 +++++++++++++------ .../src/hooks/useRelinquishVote.ts | 17 +++- .../src/hooks/useVote.ts | 19 ++++- .../src/hooks/useVotingDelegatePositions.ts | 5 +- .../voter-stake-registry-hooks/src/index.ts | 1 + .../src/utils/getPositionKeys.ts | 6 +- 6 files changed, 94 insertions(+), 33 deletions(-) diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index 9a4ae67a2..6be47995b 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -1,9 +1,13 @@ -import { AnchorProvider, BN, Program, Wallet } from "@coral-xyz/anchor"; +import { AnchorProvider, BN, IdlAccounts, Wallet } from "@coral-xyz/anchor"; import { useSolanaUnixNow } from "@helium/helium-react-hooks"; import { EPOCH_LENGTH, delegatedPositionKey, } from "@helium/helium-sub-daos-sdk"; +import { VoterStakeRegistry } from "@helium/idls/lib/types/voter_stake_registry"; +import { delegationKey } from "@helium/nft-delegation-sdk"; +import { truthy } from "@helium/spl-utils"; +import { Connection, PublicKey } from "@solana/web3.js"; import React, { createContext, useCallback, @@ -13,6 +17,7 @@ import React, { } from "react"; import { useAsync } from "react-async-hook"; import { useDelegatedPositions } from "../hooks/useDelegatedPositions"; +import { useDelegations } from "../hooks/useDelegations"; import { usePositions } from "../hooks/usePositions"; import { useRegistrar } from "../hooks/useRegistrar"; import { PositionWithMeta } from "../sdk/types"; @@ -22,21 +27,18 @@ import { getPositionKeys, getRegistrarKey, } from "../utils/getPositionKeys"; -import { truthy } from "@helium/spl-utils"; -import { Connection, PublicKey } from "@solana/web3.js"; -import { delegationKey, init } from "@helium/nft-delegation-sdk"; -import { useDelegations } from "../hooks/useDelegations"; -import { NftDelegation } from "@helium/modular-governance-idls/lib/types/nft_delegation"; -import { positionKey } from "@helium/voter-stake-registry-sdk"; + +type Registrar = IdlAccounts["registrar"]; export interface HeliumVsrState { amountLocked?: BN; + amountVotingDelegationLocked?: BN; loading: boolean; mint?: PublicKey; positions?: PositionWithMeta[]; provider?: AnchorProvider; votingPower?: BN; - + registrar?: Registrar & { pubkey?: PublicKey }; refetch: () => void; } @@ -117,13 +119,20 @@ export const HeliumVsrStateProvider: React.FC<{ const delegationKeys = useMemo(() => { return ( - me && registrar && - result?.nfts.map( - (nft) => delegationKey(registrar.delegationConfig, nft.address!, me)[0] - ) + result && [ + ...result.nfts.map((nft) => { + return delegationKey( + registrar.delegationConfig, + // @ts-ignore + nft.mintAddress!, + PublicKey.default + )[0]; + }), + ...result.delegationKeys, + ] ); - }, [result?.nfts, me?.toBase58()]); + }, [result?.nfts, result?.delegationKeys]); const { accounts: delegationAccounts, loading: loadingDelegations } = useDelegations(delegationKeys); @@ -139,9 +148,15 @@ export const HeliumVsrStateProvider: React.FC<{ usePositions(allPositions); const now = useSolanaUnixNow(60 * 5 * 1000); - const { amountLocked, votingPower, positionsWithMeta } = useMemo(() => { + const { + amountLocked, + votingPower, + positionsWithMeta, + amountVotingDelegationLocked, + } = useMemo(() => { if (positions && registrar && delegatedAccounts && now) { let amountLocked = new BN(0); + let amountVotingDelegationLocked = new BN(0); let votingPower = new BN(0); const mintCfgs = registrar?.votingMints; const positionsWithMeta = positions @@ -164,9 +179,17 @@ export const HeliumVsrStateProvider: React.FC<{ unixNow: new BN(now), }); - amountLocked = amountLocked.add( - position.info.amountDepositedNative - ); + const isVotingDelegatedToMe = idx >= (myOwnedPositionsEndIdx || 0); + if (isVotingDelegatedToMe) { + amountVotingDelegationLocked = amountVotingDelegationLocked.add( + position.info.amountDepositedNative + ); + } else { + amountLocked = amountLocked.add( + position.info.amountDepositedNative + ); + } + votingPower = votingPower.add(posVotingPower); return { @@ -178,11 +201,13 @@ export const HeliumVsrStateProvider: React.FC<{ hasGenesisMultiplier: position.info.genesisEnd.gt(new BN(now)), votingPower: posVotingPower, votingMint: mintCfgs[position.info.votingMintConfigIdx], - isVotingDelegatedToMe: idx >= (myOwnedPositionsEndIdx || 0), - votingDelegation: { - ...delegation, - address: delegationAccounts?.[idx]?.publicKey, - }, + isVotingDelegatedToMe, + votingDelegation: delegation + ? { + ...delegation, + address: delegationAccounts?.[idx]?.publicKey, + } + : undefined, } as PositionWithMeta; } }) @@ -192,6 +217,7 @@ export const HeliumVsrStateProvider: React.FC<{ positionsWithMeta, amountLocked, votingPower, + amountVotingDelegationLocked, }; } @@ -208,11 +234,18 @@ export const HeliumVsrStateProvider: React.FC<{ loading: loading || loadingPositions || loadingDel, error, amountLocked, + amountVotingDelegationLocked, mint, positions: positionsWithMeta, provider, refetch, votingPower, + registrar: registrar + ? { + ...registrar, + pubkey: registrarKey, + } + : undefined, }), [ loadingPositions, @@ -220,11 +253,13 @@ export const HeliumVsrStateProvider: React.FC<{ loading, error, amountLocked, + amountVotingDelegationLocked, mint, positionsWithMeta, provider, refetch, votingPower, + registrar, ] ); return ( diff --git a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts index 729c62459..382f38985 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts @@ -19,7 +19,15 @@ export const useRelinquishVote = (proposal: PublicKey) => { (choice: number) => { if (!markers) return false; - return markers.some((m) => m.info?.choices.includes(choice)); + return markers.some((m, index) => { + const position = positions?.[index]; + const earlierDelegateVoted = + position && + position.votingDelegation && + m.info && + position.votingDelegation.index > m.info.delegationIndex; + return !earlierDelegateVoted && m.info?.choices.includes(choice); + }); }, [markers] ); @@ -42,9 +50,12 @@ export const useRelinquishVote = (proposal: PublicKey) => { if (marker && alreadyVotedThisChoice) { if (position.isVotingDelegatedToMe) { - if (marker.delegationIndex < (position.votingDelegation?.index || 0)) { + if ( + marker.delegationIndex < + (position.votingDelegation?.index || 0) + ) { // Do not vote with a position that has been delegated to us, but voting overidden - return + return; } return await vsrProgram.methods diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts index 19e34edcb..b92dea0c8 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts @@ -8,10 +8,11 @@ import { useCallback, useMemo } from "react"; import { useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { useVoteMarkers } from "./useVoteMarkers"; +import { getRegistrarKey } from "../utils/getPositionKeys"; export const useVote = (proposalKey: PublicKey) => { const { info: proposal } = useProposal(proposalKey); - const { positions, provider } = useHeliumVsrState(); + const { positions, provider, registrar } = useHeliumVsrState(); const voteMarkerKeys = useMemo(() => { return positions ? positions.map((p) => voteMarkerKey(p.mint, proposalKey)[0]) @@ -34,13 +35,22 @@ export const useVote = (proposalKey: PublicKey) => { (choice: number) => { if (!markers) return false; - return markers.some((m) => { + return markers.some((m, index) => { + const position = positions?.[index]; + const earlierDelegateVoted = + position && + position.votingDelegation && + m.info && + position.votingDelegation.index > m.info.delegationIndex; const noMarker = !m?.info; const maxChoicesReached = (m?.info?.choices.length || 0) >= (proposal?.maxChoicesPerVoter || 0); const alreadyVotedThisChoice = m.info?.choices.includes(choice); const canVote = - noMarker || (!maxChoicesReached && !alreadyVotedThisChoice); + noMarker || + (!maxChoicesReached && + !alreadyVotedThisChoice && + !earlierDelegateVoted); return canVote; }); }, @@ -67,7 +77,7 @@ export const useVote = (proposalKey: PublicKey) => { if (!marker || (!alreadyVotedThisChoice && !maxChoicesReached)) { if (position.isVotingDelegatedToMe) { if ( - marker?.delegationIndex && + marker && marker.delegationIndex < (position.votingDelegation?.index || 0) ) { @@ -83,6 +93,7 @@ export const useVote = (proposalKey: PublicKey) => { proposal: proposalKey, owner: provider.wallet.publicKey, position: position.pubkey, + registrar: registrar?.pubkey, }) .instruction(); } diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts index 38020d765..4a2e60712 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts @@ -8,7 +8,7 @@ import { PositionWithMeta } from "../sdk/types"; import BN from "bn.js" export const useVotingDelegatePositions = () => { - const { provider } = useHeliumVsrState(); + const { provider, registrar } = useHeliumVsrState(); const { error, loading, execute } = useAsyncCallback( async ({ positions, @@ -28,7 +28,7 @@ export const useVotingDelegatePositions = () => { if (loading) return; - if (isInvalid || !nftDelegationProgram) { + if (isInvalid || !nftDelegationProgram || !registrar) { throw new Error("Unable to voting delegate, Invalid params"); } else { const instructions: TransactionInstruction[] = []; @@ -41,6 +41,7 @@ export const useVotingDelegatePositions = () => { .accounts({ asset: position.mint, recipient, + delegationConfig: registrar.delegationConfig, }) .instruction() ); diff --git a/packages/voter-stake-registry-hooks/src/index.ts b/packages/voter-stake-registry-hooks/src/index.ts index ecc1437bc..95bf64826 100644 --- a/packages/voter-stake-registry-hooks/src/index.ts +++ b/packages/voter-stake-registry-hooks/src/index.ts @@ -25,3 +25,4 @@ export { getRegistrarKey, getPositionKeys } from "./utils/getPositionKeys"; export { useVoteMarkers } from "./hooks/useVoteMarkers"; export { useVote } from "./hooks/useVote"; export { useRelinquishVote } from "./hooks/useRelinquishVote"; +export { useVotingDelegatePositions } from "./hooks/useVotingDelegatePositions"; \ No newline at end of file diff --git a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts index f50b35a3d..ac415bb99 100644 --- a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts +++ b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts @@ -9,7 +9,7 @@ import { init } from "@helium/nft-delegation-sdk"; import { Metadata, Metaplex, Nft, Sft } from "@metaplex-foundation/js"; import { getMint, Mint } from "@solana/spl-token"; import { PublicKey } from "@solana/web3.js"; -import { Registrar } from "../sdk/types"; +import { DelegationV0, Registrar } from "../sdk/types"; export interface GetPositionsArgs { wallet: PublicKey; @@ -41,6 +41,7 @@ export const getPositionKeys = async ( votingDelegatedPositionKeys: PublicKey[]; positionKeys: PublicKey[]; nfts: (Metadata | Nft | Sft)[]; + delegationKeys: PublicKey[]; }> => { const { mint, wallet, provider } = args; const connection = provider.connection; @@ -50,7 +51,7 @@ export const getPositionKeys = async ( const myDelegations = await delegationProgram.account.delegationV0.all([ { memcmp: { - offset: 0, + offset: 8, bytes: me.toBase58(), }, }, @@ -83,6 +84,7 @@ export const getPositionKeys = async ( return { positionKeys, votingDelegatedPositionKeys: delegationPositions, + delegationKeys: myDelegations.map((d) => d.publicKey), nfts, }; }; From 7a9e4652636cc08321bf8aba638c7859042226ca Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Tue, 21 Nov 2023 15:22:47 -0300 Subject: [PATCH 009/130] Bugfixes --- package.json | 6 +- packages/crons/package.json | 2 +- packages/crons/yarn.deploy.lock | 26 ++-- packages/data-credits-sdk/yarn.deploy.lock | 14 +- packages/distributor-oracle/yarn.deploy.lock | 14 +- packages/entity-invalidator/yarn.deploy.lock | 14 +- packages/helium-admin-cli/package.json | 2 +- packages/helium-admin-cli/yarn.deploy.lock | 16 +- .../yarn.deploy.lock | 14 +- packages/helium-sub-daos-sdk/yarn.deploy.lock | 14 +- packages/hotspot-utils/yarn.deploy.lock | 14 +- packages/metadata-service/yarn.deploy.lock | 14 +- packages/migration-service/yarn.deploy.lock | 14 +- .../yarn.deploy.lock | 14 +- packages/monitor-service/yarn.deploy.lock | 14 +- packages/spl-utils/src/transaction.ts | 141 ++++++++++++++++-- .../voter-stake-registry-hooks/package.json | 5 +- .../src/contexts/heliumVsrContext.tsx | 25 +++- .../src/hooks/useRelinquishVote.ts | 20 +-- .../src/hooks/useVote.ts | 24 ++- .../src/hooks/useVotingDelegatePositions.ts | 38 +++-- .../src/hooks/useVotingUndelegatePositions.ts | 89 +++++++++++ .../voter-stake-registry-hooks/src/index.ts | 3 +- .../src/sdk/types.ts | 2 +- .../src/utils/getPositionKeys.ts | 22 ++- .../yarn.deploy.lock | 43 ++++-- .../voter-stake-registry-sdk/package.json | 2 +- .../voter-stake-registry-sdk/yarn.deploy.lock | 14 +- .../vsr-metadata-service/yarn.deploy.lock | 14 +- packages/xnft-hotspot/yarn.deploy.lock | 14 +- yarn.lock | 71 ++++----- 31 files changed, 477 insertions(+), 242 deletions(-) create mode 100644 packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts diff --git a/package.json b/package.json index e9810835d..c2edf5a6e 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,9 @@ "@coral-xyz/anchor-cli": "^0.28.0", "@coral-xyz/borsh": "^0.2.6", "@helium/crypto": "^4.10.2", - "@helium/modular-governance-idls": "0.0.8-next.10+84cdd0e", - "@helium/nft-delegation-sdk": "0.0.8-next.10+84cdd0e", - "@helium/proposal-sdk": "0.0.8-next.10+84cdd0e", + "@helium/modular-governance-idls": "0.0.8-next.12+f1b0c8c", + "@helium/nft-delegation-sdk": "0.0.8-next.12+f1b0c8c", + "@helium/proposal-sdk": "0.0.8-next.12+f1b0c8c", "@helium/transactions": "^3.38.0", "@metaplex-foundation/mpl-bubblegum": "^0.7.0", "@pythnetwork/client": "^2.8.0", diff --git a/packages/crons/package.json b/packages/crons/package.json index bc39a4041..411e8dc20 100644 --- a/packages/crons/package.json +++ b/packages/crons/package.json @@ -46,7 +46,7 @@ "@helium/rewards-burn-sdk": "^0.6.2", "@helium/rewards-oracle-sdk": "^0.6.2", "@helium/spl-utils": "^0.6.2", - "@helium/state-controller-sdk": "0.0.8-next.10+84cdd0e", + "@helium/state-controller-sdk": "0.0.8-next.12+f1b0c8c", "@helium/treasury-management-sdk": "^0.6.2", "@helium/voter-stake-registry-sdk": "^0.6.2", "@solana/spl-token": "^0.3.8", diff --git a/packages/crons/yarn.deploy.lock b/packages/crons/yarn.deploy.lock index b203bad3d..654dc316a 100644 --- a/packages/crons/yarn.deploy.lock +++ b/packages/crons/yarn.deploy.lock @@ -197,7 +197,7 @@ __metadata: "@helium/rewards-burn-sdk": ^0.6.2 "@helium/rewards-oracle-sdk": ^0.6.2 "@helium/spl-utils": ^0.6.2 - "@helium/state-controller-sdk": 0.0.8-next.10+84cdd0e + "@helium/state-controller-sdk": 0.0.8-next.12+f1b0c8c "@helium/treasury-management-sdk": ^0.6.2 "@helium/voter-stake-registry-sdk": ^0.6.2 "@solana/spl-token": ^0.3.8 @@ -375,7 +375,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -385,15 +385,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -489,14 +489,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/state-controller-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/state-controller-sdk@npm:0.0.8-next.10" +"@helium/state-controller-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e - checksum: 512cba32c6ef43e67e9f3a4c0776757a22a3e9f0924e707c6d5096070fa5eed1b9a993cf50d319f9ecb8fe1e67b9d5891a9a63dcfb178d0cac7fe0aad1ba39c4 + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + checksum: 45edd457c3b57b8c3faa3074a986f2ff6cb433ef9a8c72ac76034f394715f08b7f8bf6d8f4990344a7a0b7825192850a4cf80896b996d06dd4bc9aa32a26b241 languageName: node linkType: hard @@ -524,7 +524,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/data-credits-sdk/yarn.deploy.lock b/packages/data-credits-sdk/yarn.deploy.lock index e187a5c22..b1588675d 100644 --- a/packages/data-credits-sdk/yarn.deploy.lock +++ b/packages/data-credits-sdk/yarn.deploy.lock @@ -152,7 +152,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -162,15 +162,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -198,7 +198,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/distributor-oracle/yarn.deploy.lock b/packages/distributor-oracle/yarn.deploy.lock index a6915317f..f1b33edfc 100644 --- a/packages/distributor-oracle/yarn.deploy.lock +++ b/packages/distributor-oracle/yarn.deploy.lock @@ -302,7 +302,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -312,15 +312,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -402,7 +402,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/entity-invalidator/yarn.deploy.lock b/packages/entity-invalidator/yarn.deploy.lock index aaa76a37f..30d5cea77 100644 --- a/packages/entity-invalidator/yarn.deploy.lock +++ b/packages/entity-invalidator/yarn.deploy.lock @@ -233,7 +233,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -243,15 +243,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -317,7 +317,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index ce052817b..14525d3b7 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -49,7 +49,7 @@ "@helium/helium-sub-daos-sdk": "^0.6.2", "@helium/lazy-distributor-sdk": "^0.6.2", "@helium/mobile-entity-manager-sdk": "^0.6.2", - "@helium/nft-delegation-sdk": "0.0.8-next.10+84cdd0e", + "@helium/nft-delegation-sdk": "0.0.8-next.12+f1b0c8c", "@helium/price-oracle-sdk": "^0.6.2", "@helium/spl-utils": "^0.6.2", "@helium/treasury-management-sdk": "^0.6.2", diff --git a/packages/helium-admin-cli/yarn.deploy.lock b/packages/helium-admin-cli/yarn.deploy.lock index 5b7e4e60d..50c895cfd 100644 --- a/packages/helium-admin-cli/yarn.deploy.lock +++ b/packages/helium-admin-cli/yarn.deploy.lock @@ -315,7 +315,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.6.2 "@helium/lazy-distributor-sdk": ^0.6.2 "@helium/mobile-entity-manager-sdk": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@helium/price-oracle-sdk": ^0.6.2 "@helium/spl-utils": ^0.6.2 "@helium/treasury-management-sdk": ^0.6.2 @@ -440,7 +440,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -450,15 +450,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -555,7 +555,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-entity-manager-sdk/yarn.deploy.lock b/packages/helium-entity-manager-sdk/yarn.deploy.lock index 200462799..1074273fa 100644 --- a/packages/helium-entity-manager-sdk/yarn.deploy.lock +++ b/packages/helium-entity-manager-sdk/yarn.deploy.lock @@ -202,7 +202,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -212,15 +212,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -286,7 +286,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-sub-daos-sdk/yarn.deploy.lock b/packages/helium-sub-daos-sdk/yarn.deploy.lock index 0a1cc7090..6f5e0531b 100644 --- a/packages/helium-sub-daos-sdk/yarn.deploy.lock +++ b/packages/helium-sub-daos-sdk/yarn.deploy.lock @@ -132,7 +132,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -142,15 +142,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -178,7 +178,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/hotspot-utils/yarn.deploy.lock b/packages/hotspot-utils/yarn.deploy.lock index f731a9bf7..cceaff9bc 100644 --- a/packages/hotspot-utils/yarn.deploy.lock +++ b/packages/hotspot-utils/yarn.deploy.lock @@ -216,7 +216,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -226,15 +226,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -300,7 +300,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/metadata-service/yarn.deploy.lock b/packages/metadata-service/yarn.deploy.lock index 7dfd791ac..4e1f131b9 100644 --- a/packages/metadata-service/yarn.deploy.lock +++ b/packages/metadata-service/yarn.deploy.lock @@ -281,7 +281,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -291,15 +291,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -365,7 +365,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/migration-service/yarn.deploy.lock b/packages/migration-service/yarn.deploy.lock index 9756fef03..5f4d6a8b8 100644 --- a/packages/migration-service/yarn.deploy.lock +++ b/packages/migration-service/yarn.deploy.lock @@ -444,7 +444,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -454,15 +454,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -544,7 +544,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/mobile-entity-manager-sdk/yarn.deploy.lock b/packages/mobile-entity-manager-sdk/yarn.deploy.lock index 195478c08..2459903cb 100644 --- a/packages/mobile-entity-manager-sdk/yarn.deploy.lock +++ b/packages/mobile-entity-manager-sdk/yarn.deploy.lock @@ -220,7 +220,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -230,15 +230,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -304,7 +304,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/monitor-service/yarn.deploy.lock b/packages/monitor-service/yarn.deploy.lock index 246d64981..832a6dcb3 100644 --- a/packages/monitor-service/yarn.deploy.lock +++ b/packages/monitor-service/yarn.deploy.lock @@ -274,7 +274,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -317,15 +317,15 @@ __metadata: languageName: unknown linkType: soft -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -391,7 +391,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/spl-utils/src/transaction.ts b/packages/spl-utils/src/transaction.ts index 93e1d2458..ba7e3a2ac 100644 --- a/packages/spl-utils/src/transaction.ts +++ b/packages/spl-utils/src/transaction.ts @@ -255,14 +255,14 @@ export const awaitTransactionSignatureConfirmation = async ( status = await new Promise(async (resolve, reject) => { let t: NodeJS.Timeout; function setDone() { - done = true - clearTimeout(t) + done = true; + clearTimeout(t); } t = setTimeout(() => { if (done) { return; } - setDone() + setDone(); console.log("Rejecting for timeout..."); reject({ timeout: true }); }, timeout); @@ -275,7 +275,7 @@ export const awaitTransactionSignatureConfirmation = async ( slot: context.slot, confirmations: 0, }; - setDone() + setDone(); if (result.err) { console.log("Rejected via websocket", result.err); reject(status); @@ -288,7 +288,7 @@ export const awaitTransactionSignatureConfirmation = async ( } catch (e) { console.error("WS error in setup", txid, e); if (!queryStatus) { - reject(e) + reject(e); } } while (!done && queryStatus) { @@ -303,7 +303,7 @@ export const awaitTransactionSignatureConfirmation = async ( if (!status) { } else if (status.err) { console.log("REST error for", txid, status); - setDone() + setDone(); reject(status.err); } else if (!status.confirmations && !status.confirmationStatus) { console.log("REST no confirmations for", txid, status); @@ -313,7 +313,7 @@ export const awaitTransactionSignatureConfirmation = async ( !status.confirmationStatus || status.confirmationStatus == commitment ) { - setDone() + setDone(); resolve(status); } } @@ -336,7 +336,7 @@ export const awaitTransactionSignatureConfirmation = async ( ) { connection.removeSignatureListener(subId); } - done = true + done = true; return status; }; @@ -386,7 +386,7 @@ export async function sendAndConfirmWithRetry( let done = false; let slot = 0; const txid = await connection.sendRawTransaction(txn, sendOptions); - console.log("txid", txid) + console.log("txid", txid); const startTime = getUnixTime(); (async () => { while (!done && getUnixTime() - startTime < timeout) { @@ -462,7 +462,7 @@ async function withRetries( console.log(`Retrying ${i}...`, e); } } - throw new Error("Failed after retries") + throw new Error("Failed after retries"); } type Status = { @@ -493,9 +493,9 @@ export async function bulkSendTransactions( return tx; }) ); - const signedTxs = await (provider as AnchorProvider).wallet.signAllTransactions( - blockhashedTxs - ); + const signedTxs = await ( + provider as AnchorProvider + ).wallet.signAllTransactions(blockhashedTxs); const txsWithSigs = signedTxs.map((tx, index) => { return { @@ -508,7 +508,10 @@ export async function bulkSendTransactions( signedTxs.map((s) => s.serialize()), ({ totalProgress, ...rest }) => onProgress && - onProgress({ ...rest, totalProgress: totalProgress + ret.length + thisRet.length}), + onProgress({ + ...rest, + totalProgress: totalProgress + ret.length + thisRet.length, + }), recentBlockhash.lastValidBlockHeight, // Hail mary, try with preflight enabled. Sometimes this causes // errors that wouldn't otherwise happen @@ -528,7 +531,9 @@ export async function bulkSendTransactions( triesRemaining--; if (triesRemaining <= 0) { throw new Error( - `Failed to submit all txs after blockhashes expired, ${signedTxs.length - confirmedTxs.length} remain` + `Failed to submit all txs after blockhashes expired, ${ + signedTxs.length - confirmedTxs.length + } remain` ); } } @@ -606,7 +611,7 @@ export async function bulkSendRawTransactions( } ret.push( ...txids - .map((txid, idx) => statuses[idx] == null ? null : txid) + .map((txid, idx) => (statuses[idx] == null ? null : txid)) .filter(truthy) ); chunk = chunk.filter((_, index) => statuses[index] === null); @@ -635,3 +640,107 @@ async function getAllTxns( ) ).flat(); } + +// Batch instructions linearly into as many txs as it takes +export async function batchLinearInstructions( + provider: AnchorProvider, + instructions: TransactionInstruction[] +): Promise { + let currentTxInstructions: TransactionInstruction[] = []; + const blockhash = (await provider.connection.getLatestBlockhash()).blockhash; + + for (const instruction of instructions) { + currentTxInstructions.push(instruction); + const tx = new Transaction({ + feePayer: provider.wallet.publicKey, + recentBlockhash: blockhash, + }); + tx.add(...currentTxInstructions); + try { + if ( + tx.serialize({ + requireAllSignatures: false, + verifySignatures: false, + }).length >= + 1232 - (64 + 32) * tx.signatures.length + ) { + // yes it's ugly to throw and catch, but .serialize can _also_ throw this error + throw new Error("Transaction too large"); + } + } catch (e: any) { + if (e.toString().includes("Transaction too large")) { + currentTxInstructions.pop(); + await sendInstructions(provider, currentTxInstructions); + currentTxInstructions = [instruction]; + } else { + throw e; + } + } + } + + if (currentTxInstructions.length > 0) { + await sendInstructions(provider, currentTxInstructions); + } +} + +// Batch instructions parallel into as many txs as it takes +export async function batchParallelInstructions( + provider: AnchorProvider, + instructions: TransactionInstruction[], + onProgress?: (status: Status) => void, + triesRemaining: number = 10 // Number of blockhashes to try resending txs with before giving up +): Promise { + let currentTxInstructions: TransactionInstruction[] = []; + const blockhash = (await provider.connection.getLatestBlockhash()).blockhash; + const transactions: Transaction[] = []; + + for (const instruction of instructions) { + currentTxInstructions.push(instruction); + const tx = new Transaction({ + feePayer: provider.wallet.publicKey, + recentBlockhash: blockhash, + }); + tx.add(...currentTxInstructions); + try { + if ( + tx.serialize({ + requireAllSignatures: false, + verifySignatures: false, + }).length >= + 1232 - (64 + 32) * tx.signatures.length + ) { + // yes it's ugly to throw and catch, but .serialize can _also_ throw this error + throw new Error("Transaction too large"); + } + } catch (e: any) { + if (e.toString().includes("Transaction too large")) { + currentTxInstructions.pop(); + const tx = new Transaction({ + feePayer: provider.wallet.publicKey, + recentBlockhash: blockhash, + }); + tx.add(...currentTxInstructions); + transactions.push(tx); + currentTxInstructions = [instruction]; + } else { + throw e; + } + } + } + + if (currentTxInstructions.length > 0) { + const tx = new Transaction({ + feePayer: provider.wallet.publicKey, + recentBlockhash: blockhash, + }); + tx.add(...currentTxInstructions); + transactions.push(tx); + } + + await bulkSendTransactions( + provider, + transactions, + onProgress, + triesRemaining + ); +} diff --git a/packages/voter-stake-registry-hooks/package.json b/packages/voter-stake-registry-hooks/package.json index be5782aa0..fe3df1488 100644 --- a/packages/voter-stake-registry-hooks/package.json +++ b/packages/voter-stake-registry-hooks/package.json @@ -36,8 +36,9 @@ "@helium/account-fetch-cache-hooks": "^0.6.2", "@helium/helium-react-hooks": "^0.6.2", "@helium/helium-sub-daos-sdk": "^0.6.2", - "@helium/modular-governance-hooks": "0.0.8-next.10+84cdd0e", - "@helium/nft-delegation-sdk": "0.0.8-next.10+84cdd0e", + "@helium/modular-governance-hooks": "0.0.8-next.12+f1b0c8c", + "@helium/modular-governance-idls": "0.0.8-next.12+f1b0c8c", + "@helium/nft-delegation-sdk": "0.0.8-next.12+f1b0c8c", "@helium/spl-utils": "^0.6.2", "@helium/voter-stake-registry-sdk": "^0.6.2", "@metaplex-foundation/js": "^0.19.4", diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index 6be47995b..86881a823 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -20,7 +20,7 @@ import { useDelegatedPositions } from "../hooks/useDelegatedPositions"; import { useDelegations } from "../hooks/useDelegations"; import { usePositions } from "../hooks/usePositions"; import { useRegistrar } from "../hooks/useRegistrar"; -import { PositionWithMeta } from "../sdk/types"; +import { DelegationV0, PositionWithMeta } from "../sdk/types"; import { calcPositionVotingPower } from "../utils/calcPositionVotingPower"; import { GetPositionsArgs as GetPosArgs, @@ -203,10 +203,10 @@ export const HeliumVsrStateProvider: React.FC<{ votingMint: mintCfgs[position.info.votingMintConfigIdx], isVotingDelegatedToMe, votingDelegation: delegation - ? { + ? ({ ...delegation, address: delegationAccounts?.[idx]?.publicKey, - } + } as DelegationV0 & { address: PublicKey }) : undefined, } as PositionWithMeta; } @@ -229,6 +229,21 @@ export const HeliumVsrStateProvider: React.FC<{ delegatedAccounts, delegationAccounts, ]); + + const sortedPositions = useMemo( + () => + positionsWithMeta?.sort((a, b) => { + if (a.hasGenesisMultiplier || b.hasGenesisMultiplier) { + if (b.hasGenesisMultiplier) { + return a.amountDepositedNative.gt(b.amountDepositedNative) ? 0 : -1; + } + return -1; + } + + return a.amountDepositedNative.gt(b.amountDepositedNative) ? -1 : 0; + }), + [positionsWithMeta] + ); const ret = useMemo( () => ({ loading: loading || loadingPositions || loadingDel, @@ -236,7 +251,7 @@ export const HeliumVsrStateProvider: React.FC<{ amountLocked, amountVotingDelegationLocked, mint, - positions: positionsWithMeta, + positions: sortedPositions, provider, refetch, votingPower, @@ -255,7 +270,7 @@ export const HeliumVsrStateProvider: React.FC<{ amountLocked, amountVotingDelegationLocked, mint, - positionsWithMeta, + sortedPositions, provider, refetch, votingPower, diff --git a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts index 382f38985..5ad421de5 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts @@ -1,4 +1,9 @@ -import { bulkSendTransactions, chunks, truthy } from "@helium/spl-utils"; +import { + batchParallelInstructions, + bulkSendTransactions, + chunks, + truthy, +} from "@helium/spl-utils"; import { init, voteMarkerKey } from "@helium/voter-stake-registry-sdk"; import { PublicKey } from "@metaplex-foundation/js"; import { Transaction } from "@solana/web3.js"; @@ -52,7 +57,7 @@ export const useRelinquishVote = (proposal: PublicKey) => { if (position.isVotingDelegatedToMe) { if ( marker.delegationIndex < - (position.votingDelegation?.index || 0) + (position.votingDelegation?.index || 0) ) { // Do not vote with a position that has been delegated to us, but voting overidden return; @@ -84,16 +89,7 @@ export const useRelinquishVote = (proposal: PublicKey) => { ) ).filter(truthy); - const txs = chunks(instructions, 4).map((ixs) => { - const tx = new Transaction({ - feePayer: provider.wallet.publicKey, - }); - tx.add(...ixs); - - return tx; - }); - - await bulkSendTransactions(provider, txs); + await batchParallelInstructions(provider, instructions); } } ); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts index b92dea0c8..ca6462644 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts @@ -1,5 +1,10 @@ import { useProposal } from "@helium/modular-governance-hooks"; -import { bulkSendTransactions, chunks, truthy } from "@helium/spl-utils"; +import { + batchParallelInstructions, + bulkSendTransactions, + chunks, + truthy, +} from "@helium/spl-utils"; import { init, voteMarkerKey } from "@helium/voter-stake-registry-sdk"; import { PublicKey } from "@metaplex-foundation/js"; import { Transaction } from "@solana/web3.js"; @@ -78,10 +83,12 @@ export const useVote = (proposalKey: PublicKey) => { if (position.isVotingDelegatedToMe) { if ( marker && - marker.delegationIndex < - (position.votingDelegation?.index || 0) + (marker.delegationIndex < + (position.votingDelegation?.index || 0) || + marker.choices.includes(choice)) ) { // Do not vote with a position that has been delegated to us, but voting overidden + // Also ignore voting for the same choice twice return; } @@ -112,16 +119,7 @@ export const useVote = (proposalKey: PublicKey) => { ) ).filter(truthy); - const txs = chunks(instructions, 4).map((ixs) => { - const tx = new Transaction({ - feePayer: provider.wallet.publicKey, - }); - tx.add(...ixs); - - return tx; - }); - - await bulkSendTransactions(provider, txs); + await batchParallelInstructions(provider, instructions); } } ); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts index 4a2e60712..9b6dcf15e 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts @@ -1,11 +1,11 @@ import { Program } from "@coral-xyz/anchor"; import { PROGRAM_ID, init } from "@helium/nft-delegation-sdk"; -import { sendInstructions } from "@helium/spl-utils"; +import { batchParallelInstructions, sendInstructions } from "@helium/spl-utils"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { PositionWithMeta } from "../sdk/types"; -import BN from "bn.js" +import BN from "bn.js"; export const useVotingDelegatePositions = () => { const { provider, registrar } = useHeliumVsrState(); @@ -33,20 +33,28 @@ export const useVotingDelegatePositions = () => { } else { const instructions: TransactionInstruction[] = []; for (const position of positions) { - instructions.push( - await nftDelegationProgram.methods - .delegateV0({ - expirationTime, - }) - .accounts({ - asset: position.mint, - recipient, - delegationConfig: registrar.delegationConfig, - }) - .instruction() - ); + const { + instruction, + pubkeys: { nextDelegation }, + } = await nftDelegationProgram.methods + .delegateV0({ + expirationTime, + }) + .accounts({ + asset: position.mint, + recipient, + delegationConfig: registrar.delegationConfig, + }) + .prepare(); + // Don't delegate where there's already a delegation. + if ((await provider.connection.getAccountInfo(nextDelegation!))) { + throw new Error("Recipient wallet is already a proxy to this position") + } else { + instructions.push(instruction); + } } - await sendInstructions(provider, instructions); + + await batchParallelInstructions(provider, instructions); } } ); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts new file mode 100644 index 000000000..78fa1c00a --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts @@ -0,0 +1,89 @@ +import { Program } from "@coral-xyz/anchor"; +import { PROGRAM_ID, init } from "@helium/nft-delegation-sdk"; +import { batchLinearInstructions, sendInstructions, truthy } from "@helium/spl-utils"; +import { PublicKey, TransactionInstruction } from "@solana/web3.js"; +import { useAsyncCallback } from "react-async-hook"; +import { useHeliumVsrState } from "../contexts/heliumVsrContext"; +import { PositionWithMeta } from "../sdk/types"; + +export const useVotingUndelegatePositions = () => { + const { provider, registrar } = useHeliumVsrState(); + const { error, loading, execute } = useAsyncCallback( + async ({ + positions, + programId = PROGRAM_ID, + }: { + positions: PositionWithMeta[]; + programId?: PublicKey; + }) => { + const isInvalid = !provider; + + const idl = await Program.fetchIdl(programId, provider); + const nftDelegationProgram = await init(provider as any, programId, idl); + + if (loading) return; + + if (isInvalid || !nftDelegationProgram || !registrar) { + throw new Error("Unable to voting delegate, Invalid params"); + } else { + const instructions: TransactionInstruction[] = []; + for (const position of positions) { + const toUndelegate = ( + await nftDelegationProgram.account.delegationV0.all([ + { + memcmp: { + offset: 8 + 32, + bytes: registrar.delegationConfig.toBase58(), + }, + }, + { + memcmp: { + offset: 8 + 32 + 32, + bytes: position.mint.toBase58(), + }, + }, + ]) + ).sort((a, b) => b.account.index - a.account.index); + let currentDelegation = toUndelegate.find((d) => + d.account.owner.equals(provider.wallet.publicKey) + )?.publicKey; + if (!currentDelegation) { + // If no delegation found with me as the owner, must be the primary delegation + currentDelegation = toUndelegate[toUndelegate.length - 1].publicKey + } + + instructions.push( + ...( + await Promise.all( + toUndelegate.map((delegation, index) => { + // Can't undelegate the 1st one (Pubkey.default) + if (index == toUndelegate.length - 1) { + return Promise.resolve(undefined); + } + + const prevDelegation = toUndelegate[index + 1].publicKey; + return nftDelegationProgram.methods + .undelegateV0() + .accounts({ + asset: position.mint, + prevDelegation, + currentDelegation, + delegation: delegation.publicKey, + }) + .instruction(); + }) + ) + ).filter(truthy) + ); + } + await batchLinearInstructions(provider, instructions) + } + } + ); + + return { + error, + loading, + votingUndelegatePositions: execute, + }; +}; diff --git a/packages/voter-stake-registry-hooks/src/index.ts b/packages/voter-stake-registry-hooks/src/index.ts index 95bf64826..c83f6574c 100644 --- a/packages/voter-stake-registry-hooks/src/index.ts +++ b/packages/voter-stake-registry-hooks/src/index.ts @@ -25,4 +25,5 @@ export { getRegistrarKey, getPositionKeys } from "./utils/getPositionKeys"; export { useVoteMarkers } from "./hooks/useVoteMarkers"; export { useVote } from "./hooks/useVote"; export { useRelinquishVote } from "./hooks/useRelinquishVote"; -export { useVotingDelegatePositions } from "./hooks/useVotingDelegatePositions"; \ No newline at end of file +export { useVotingDelegatePositions } from "./hooks/useVotingDelegatePositions"; +export { useVotingUndelegatePositions } from "./hooks/useVotingUndelegatePositions"; \ No newline at end of file diff --git a/packages/voter-stake-registry-hooks/src/sdk/types.ts b/packages/voter-stake-registry-hooks/src/sdk/types.ts index 0b86e668d..e37fafbcf 100644 --- a/packages/voter-stake-registry-hooks/src/sdk/types.ts +++ b/packages/voter-stake-registry-hooks/src/sdk/types.ts @@ -28,7 +28,7 @@ export interface PositionWithMeta extends Position { hasGenesisMultiplier: boolean votingPower: BN votingMint: VotingMintConfig - votingDelegation: DelegationV0 & { address: PublicKey } | null + votingDelegation: (DelegationV0 & { address: PublicKey }) | null } export type LockupKind = IdlTypes['LockupKind'] /* export type InitializePositionV0Args = IdlTypes['InitializePositionArgsV0'] diff --git a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts index ac415bb99..748aa6e16 100644 --- a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts +++ b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts @@ -48,24 +48,30 @@ export const getPositionKeys = async ( const me = wallet; const delegationProgram = await init(provider); - const myDelegations = await delegationProgram.account.delegationV0.all([ + + const metaplex = new Metaplex(connection); + const registrarPk = getRegistrarKey(mint); + const program = await initVsr(provider as any); + const registrar = (await program.account.registrar.fetch( + registrarPk + )) as Registrar; + const myDelegations = await delegationProgram.account.delegationV0.all([ { memcmp: { offset: 8, bytes: me.toBase58(), }, }, + { + memcmp: { + offset: 8 + 32, + bytes: registrar.delegationConfig.toBase58() + } + } ]); const delegationPositions = myDelegations.map( (del) => positionKey(del.account.asset)[0] ); - - const metaplex = new Metaplex(connection); - const registrarPk = getRegistrarKey(mint); - const program = await initVsr(provider as any); - const registrar = (await program.account.registrar.fetch( - registrarPk - )) as Registrar; const mintCfgs = registrar.votingMints; const mints: Record = {}; for (const mcfg of mintCfgs) { diff --git a/packages/voter-stake-registry-hooks/yarn.deploy.lock b/packages/voter-stake-registry-hooks/yarn.deploy.lock index d3c5aaf71..775121b4b 100644 --- a/packages/voter-stake-registry-hooks/yarn.deploy.lock +++ b/packages/voter-stake-registry-hooks/yarn.deploy.lock @@ -699,25 +699,35 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-hooks@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/modular-governance-hooks@npm:0.0.8-next.10" +"@helium/modular-governance-hooks@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/modular-governance-hooks@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/account-fetch-cache": ^0.5.0 "@helium/account-fetch-cache-hooks": ^0.5.0 "@helium/helium-react-hooks": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e - "@helium/organization-sdk": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/organization-sdk": ^0.0.8-next.12+f1b0c8c "@solana/web3.js": ^1.78.4 peerDependencies: react: ^16.8 || ^17 || ^18 react-dom: ^16.8 || ^17 || ^18 - checksum: 75f8535ba89abdcd125366ff9021a4e1e2ae83cbdc7eb23f221f11d1982a5352aa737e01e8fac9bf208efa72abbab0d75e8c30eac310a7564d7371a5b9b7644a + checksum: 7ac0d051c77304a4437eaeacf64efe8947c11033a2f1debf7887e11ddb729149b644e9775475cf660fa8d8f904b4a20870614dead4292bec34857f86ce96dce8 languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/modular-governance-idls@npm:0.0.8-next.12" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 2b8fdb881af6fba5284357e08912f7a6df4c945a99efd89e2f80c792c1bc3fbf23ba61b5d091e0288b2c545d90de9ee51e27ac406b915b033dc1bb5e6ad51084 + languageName: node + linkType: hard + +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -727,19 +737,19 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard -"@helium/organization-sdk@npm:^0.0.8-next.10+84cdd0e": +"@helium/organization-sdk@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/organization-sdk@npm:0.0.8" dependencies: @@ -810,8 +820,9 @@ __metadata: "@helium/account-fetch-cache-hooks": ^0.6.2 "@helium/helium-react-hooks": ^0.6.2 "@helium/helium-sub-daos-sdk": ^0.6.2 - "@helium/modular-governance-hooks": 0.0.8-next.10+84cdd0e - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/modular-governance-hooks": 0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": 0.0.8-next.12+f1b0c8c + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@helium/spl-utils": ^0.6.2 "@helium/voter-stake-registry-sdk": ^0.6.2 "@metaplex-foundation/js": ^0.19.4 @@ -836,7 +847,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/voter-stake-registry-sdk/package.json b/packages/voter-stake-registry-sdk/package.json index f2c6e634a..0e2517413 100644 --- a/packages/voter-stake-registry-sdk/package.json +++ b/packages/voter-stake-registry-sdk/package.json @@ -34,7 +34,7 @@ "@coral-xyz/anchor": "^0.28.0", "@helium/anchor-resolvers": "^0.6.2", "@helium/idls": "^0.6.2", - "@helium/nft-delegation-sdk": "0.0.8-next.10+84cdd0e", + "@helium/nft-delegation-sdk": "0.0.8-next.12+f1b0c8c", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", "bn.js": "^5.2.0", diff --git a/packages/voter-stake-registry-sdk/yarn.deploy.lock b/packages/voter-stake-registry-sdk/yarn.deploy.lock index ef1ebe682..89ff56ecd 100644 --- a/packages/voter-stake-registry-sdk/yarn.deploy.lock +++ b/packages/voter-stake-registry-sdk/yarn.deploy.lock @@ -98,7 +98,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -108,15 +108,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -127,7 +127,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/vsr-metadata-service/yarn.deploy.lock b/packages/vsr-metadata-service/yarn.deploy.lock index 257519723..65aac7350 100644 --- a/packages/vsr-metadata-service/yarn.deploy.lock +++ b/packages/vsr-metadata-service/yarn.deploy.lock @@ -164,7 +164,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -174,15 +174,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -215,7 +215,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/xnft-hotspot/yarn.deploy.lock b/packages/xnft-hotspot/yarn.deploy.lock index bf841a03e..452eccaf6 100644 --- a/packages/xnft-hotspot/yarn.deploy.lock +++ b/packages/xnft-hotspot/yarn.deploy.lock @@ -535,7 +535,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -545,15 +545,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard @@ -635,7 +635,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/yarn.lock b/yarn.lock index be38bd0b5..52a2c3309 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1044,7 +1044,7 @@ __metadata: "@helium/rewards-burn-sdk": ^0.6.2 "@helium/rewards-oracle-sdk": ^0.6.2 "@helium/spl-utils": ^0.6.2 - "@helium/state-controller-sdk": 0.0.8-next.10+84cdd0e + "@helium/state-controller-sdk": 0.0.8-next.12+f1b0c8c "@helium/treasury-management-sdk": ^0.6.2 "@helium/voter-stake-registry-sdk": ^0.6.2 "@solana/spl-token": ^0.3.8 @@ -1272,7 +1272,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.6.2 "@helium/lazy-distributor-sdk": ^0.6.2 "@helium/mobile-entity-manager-sdk": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@helium/price-oracle-sdk": ^0.6.2 "@helium/spl-utils": ^0.6.2 "@helium/treasury-management-sdk": ^0.6.2 @@ -1555,35 +1555,35 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-hooks@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/modular-governance-hooks@npm:0.0.8-next.10" +"@helium/modular-governance-hooks@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/modular-governance-hooks@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/account-fetch-cache": ^0.5.0 "@helium/account-fetch-cache-hooks": ^0.5.0 "@helium/helium-react-hooks": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e - "@helium/organization-sdk": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/organization-sdk": ^0.0.8-next.12+f1b0c8c "@solana/web3.js": ^1.78.4 peerDependencies: react: ^16.8 || ^17 || ^18 react-dom: ^16.8 || ^17 || ^18 - checksum: 75f8535ba89abdcd125366ff9021a4e1e2ae83cbdc7eb23f221f11d1982a5352aa737e01e8fac9bf208efa72abbab0d75e8c30eac310a7564d7371a5b9b7644a + checksum: 7ac0d051c77304a4437eaeacf64efe8947c11033a2f1debf7887e11ddb729149b644e9775475cf660fa8d8f904b4a20870614dead4292bec34857f86ce96dce8 languageName: node linkType: hard -"@helium/modular-governance-idls@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/modular-governance-idls@npm:0.0.8-next.10" +"@helium/modular-governance-idls@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/modular-governance-idls@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@solana/web3.js": ^1.78.4 - checksum: 77bb16aabe81be74bfa6a00ceccc99b6e833980aae21ddae7dad9ee0c9706d43531ed795e6302506e65d9fca63a0b70740cc8cb698ba375054e773504afb145b + checksum: 2b8fdb881af6fba5284357e08912f7a6df4c945a99efd89e2f80c792c1bc3fbf23ba61b5d091e0288b2c545d90de9ee51e27ac406b915b033dc1bb5e6ad51084 languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.10+84cdd0e": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -1626,19 +1626,19 @@ __metadata: languageName: unknown linkType: soft -"@helium/nft-delegation-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.10" +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c "@solana/spl-token": ^0.3.8 - checksum: 98d3ac4622bd05d69216f70357adc66dba605058e469ae904130a51c9da5f7c2a896ff2d8ae5063734bdf3bfdc3fea2620facdd2e4ad962b7b0fdc090da794ea + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b languageName: node linkType: hard -"@helium/organization-sdk@npm:^0.0.8, @helium/organization-sdk@npm:^0.0.8-next.10+84cdd0e": +"@helium/organization-sdk@npm:^0.0.8, @helium/organization-sdk@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/organization-sdk@npm:0.0.8" dependencies: @@ -1665,14 +1665,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/proposal-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/proposal-sdk@npm:0.0.8-next.10" +"@helium/proposal-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/proposal-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e - checksum: fe220bb0bd5562817342674b7ff1b97eb4a01311f1e8175181c45185fda73171f26b6a4e51d24cc0d6fa76a3e930d87700bac2f550b06e8c3bb0bc16ac49c219 + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + checksum: f79e0273a3f5c758de3ccacf8b56e55a3a821285aafb70bfad1692d07bf8a610353db297e6c96483dfb12b383e498697d633ca58dd879de23afc799a94e465c1 languageName: node linkType: hard @@ -1770,14 +1770,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/state-controller-sdk@npm:0.0.8-next.10+84cdd0e": - version: 0.0.8-next.10 - resolution: "@helium/state-controller-sdk@npm:0.0.8-next.10" +"@helium/state-controller-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.12" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.10+84cdd0e - checksum: 512cba32c6ef43e67e9f3a4c0776757a22a3e9f0924e707c6d5096070fa5eed1b9a993cf50d319f9ecb8fe1e67b9d5891a9a63dcfb178d0cac7fe0aad1ba39c4 + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + checksum: 45edd457c3b57b8c3faa3074a986f2ff6cb433ef9a8c72ac76034f394715f08b7f8bf6d8f4990344a7a0b7825192850a4cf80896b996d06dd4bc9aa32a26b241 languageName: node linkType: hard @@ -1845,8 +1845,9 @@ __metadata: "@helium/account-fetch-cache-hooks": ^0.6.2 "@helium/helium-react-hooks": ^0.6.2 "@helium/helium-sub-daos-sdk": ^0.6.2 - "@helium/modular-governance-hooks": 0.0.8-next.10+84cdd0e - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/modular-governance-hooks": 0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": 0.0.8-next.12+f1b0c8c + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@helium/spl-utils": ^0.6.2 "@helium/voter-stake-registry-sdk": ^0.6.2 "@metaplex-foundation/js": ^0.19.4 @@ -1871,7 +1872,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.6.2 "@helium/idls": ^0.6.2 - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -14435,9 +14436,9 @@ __metadata: "@coral-xyz/anchor-cli": ^0.28.0 "@coral-xyz/borsh": ^0.2.6 "@helium/crypto": ^4.10.2 - "@helium/modular-governance-idls": 0.0.8-next.10+84cdd0e - "@helium/nft-delegation-sdk": 0.0.8-next.10+84cdd0e - "@helium/proposal-sdk": 0.0.8-next.10+84cdd0e + "@helium/modular-governance-idls": 0.0.8-next.12+f1b0c8c + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/proposal-sdk": 0.0.8-next.12+f1b0c8c "@helium/transactions": ^3.38.0 "@metaplex-foundation/mpl-bubblegum": ^0.7.0 "@pythnetwork/client": ^2.8.0 From 46e5129f52d5ab7372a5ac4a8fde6922159e8632 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 22 Nov 2023 17:37:55 -0300 Subject: [PATCH 010/130] Add helium vote service and update hooks to use the service --- .gitignore | 1 + .../vote_service_example.json | 19 + packages/helium-vote-service/.env | 3 + packages/helium-vote-service/.gitignore | 5 + packages/helium-vote-service/Dockerfile | 30 + packages/helium-vote-service/package.json | 54 + .../positions_with_vetokens.sql | 89 + packages/helium-vote-service/src/env.ts | 10 + packages/helium-vote-service/src/index.ts | 186 + packages/helium-vote-service/src/model.ts | 262 ++ packages/helium-vote-service/src/repo.ts | 66 + .../helium-vote-service/tsconfig.build.json | 27 + .../helium-vote-service/tsconfig.cjs.json | 7 + .../helium-vote-service/tsconfig.esm.json | 8 + packages/helium-vote-service/tsconfig.json | 17 + packages/helium-vote-service/yarn.deploy.lock | 3426 +++++++++++++++++ .../src/contexts/heliumVsrContext.tsx | 45 +- .../src/hooks/useCreatePosition.ts | 3 +- .../src/hooks/useVote.ts | 6 +- .../src/hooks/useVotingUndelegatePositions.ts | 50 +- .../voter-stake-registry-hooks/src/index.ts | 1 - .../src/utils/getPositionKeys.ts | 50 +- .../voter-stake-registry-sdk/src/index.ts | 23 +- .../src/voteService.ts | 159 + .../src/instructions/relinquish_vote_v1.rs | 9 - yarn.lock | 95 +- 26 files changed, 4557 insertions(+), 94 deletions(-) create mode 100644 packages/account-postgres-sink-service/vote_service_example.json create mode 100644 packages/helium-vote-service/.env create mode 100644 packages/helium-vote-service/.gitignore create mode 100644 packages/helium-vote-service/Dockerfile create mode 100644 packages/helium-vote-service/package.json create mode 100644 packages/helium-vote-service/positions_with_vetokens.sql create mode 100644 packages/helium-vote-service/src/env.ts create mode 100644 packages/helium-vote-service/src/index.ts create mode 100644 packages/helium-vote-service/src/model.ts create mode 100644 packages/helium-vote-service/src/repo.ts create mode 100644 packages/helium-vote-service/tsconfig.build.json create mode 100644 packages/helium-vote-service/tsconfig.cjs.json create mode 100644 packages/helium-vote-service/tsconfig.esm.json create mode 100644 packages/helium-vote-service/tsconfig.json create mode 100644 packages/helium-vote-service/yarn.deploy.lock create mode 100644 packages/voter-stake-registry-sdk/src/voteService.ts diff --git a/.gitignore b/.gitignore index ff3d68e24..2ccc2215a 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ accounts !.yarn/plugins !.yarn/sdks !.yarn/versions +packages/helium-vote-service/helium-vote-proxies/ diff --git a/packages/account-postgres-sink-service/vote_service_example.json b/packages/account-postgres-sink-service/vote_service_example.json new file mode 100644 index 000000000..b810394f1 --- /dev/null +++ b/packages/account-postgres-sink-service/vote_service_example.json @@ -0,0 +1,19 @@ +{ + "configs": [ + { + "programId": "hvsrNC3NKbcryqDs2DocYHZ9yPKEVzdSjQG6RVtK1s8", + "accounts": [ + { "type": "PositionV0", "table": "positions", "schema": "public" }, + { "type": "Registrar", "table": "registrars", "schema": "public" }, + { "type": "VoteMarkerV0", "table": "vote_markers", "schema": "public" } + ] + }, + { + "programId": "nde169MVKXLYbtDbrTF8wiJc8KYJRvLXKAzHApZ5vvD", + "accounts": [ + { "type": "DelegationV0", "table": "delegations", "schema": "public" } + ] + } + ], + "indexConfigs": [] +} diff --git a/packages/helium-vote-service/.env b/packages/helium-vote-service/.env new file mode 100644 index 000000000..c94d670fd --- /dev/null +++ b/packages/helium-vote-service/.env @@ -0,0 +1,3 @@ +PGDATABASE=solana +PGUSER=postgres +PGPASSWORD=postgres diff --git a/packages/helium-vote-service/.gitignore b/packages/helium-vote-service/.gitignore new file mode 100644 index 000000000..3943cabab --- /dev/null +++ b/packages/helium-vote-service/.gitignore @@ -0,0 +1,5 @@ +npm-debug.log +dist/ +tmp/ +./node_modules +./helium-vote-proxies diff --git a/packages/helium-vote-service/Dockerfile b/packages/helium-vote-service/Dockerfile new file mode 100644 index 000000000..36b0852ad --- /dev/null +++ b/packages/helium-vote-service/Dockerfile @@ -0,0 +1,30 @@ +FROM node:18-alpine AS BUILD_IMAGE + +WORKDIR /usr/src/app + +COPY package.json ./ +COPY yarn.deploy.lock ./ +ENV YARN_LOCKFILE_FILENAME=yarn.deploy.lock + +RUN yarn set version 3.6.4 +RUN yarn install + +COPY src src +COPY tsconfig.build.json tsconfig.json + +RUN yarn run build +RUN npm prune --production + +FROM node:18-alpine + +WORKDIR /usr/src/app + +COPY --from=BUILD_IMAGE /usr/src/app/lib ./lib +COPY --from=BUILD_IMAGE /usr/src/app/node_modules ./node_modules + +# This isn't actually used, service is read only. But anchor wants a wallet. +RUN echo "[124,96,181,146,132,165,175,182,60,194,167,230,29,91,110,109,226,38,41,155,207,186,24,33,205,120,108,98,218,67,77,95,13,60,79,204,253,10,183,101,60,94,220,177,117,97,16,29,31,124,35,65,121,147,161,114,159,23,207,202,122,164,170,201]" > id.json + +env ANCHOR_WALLET=/usr/src/app/id.json + +CMD ["node", "lib/src/index.js"] diff --git a/packages/helium-vote-service/package.json b/packages/helium-vote-service/package.json new file mode 100644 index 000000000..efd5232ec --- /dev/null +++ b/packages/helium-vote-service/package.json @@ -0,0 +1,54 @@ +{ + "name": "@helium/helium-vote-service", + "private": true, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, + "license": "Apache-2.0", + "version": "0.6.2", + "description": "API for helium vote", + "repository": { + "type": "git", + "url": "https://github.com/helium/helium-program-libary" + }, + "main": "./lib/cjs/index.js", + "module": "./lib/esm/src/index.js", + "types": "./lib/types/src/index.d.ts", + "sideEffects": false, + "files": [ + "lib" + ], + "exports": { + "import": "./lib/esm/src/index.js", + "require": "./lib/cjs/index.js", + "types": "./lib/types/src/index.d.ts" + }, + "scripts": { + "format": "prettier --write \"src/**/*.{ts,tsx}\"", + "precommit": "npx git-format-staged -f 'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"' .", + "build": "tsc -p tsconfig.json", + "start": "node lib/esm/index.js", + "dev": "ts-node-dev --respawn --project tsconfig.cjs.json src/index.ts" + }, + "dependencies": { + "@fastify/cors": "^8.1.1", + "@fastify/static": "^6", + "@helium/spl-utils": "^0.6.2", + "@helium/voter-stake-registry-sdk": "^0.6.2", + "dotenv": "^16.0.3", + "fastify": "^4.13.0", + "sequelize": "^6.28.0", + "simple-git": "^3.21.0" + }, + "devDependencies": { + "@types/bn.js": "^5.1.1", + "git-format-staged": "^2.1.3", + "ts-loader": "^9.2.3", + "ts-node": "^10.9.1", + "ts-node-dev": "^2.0.0", + "typescript": "^5.2.2" + }, + "keywords": [], + "author": "" +} diff --git a/packages/helium-vote-service/positions_with_vetokens.sql b/packages/helium-vote-service/positions_with_vetokens.sql new file mode 100644 index 000000000..e2a2d0889 --- /dev/null +++ b/packages/helium-vote-service/positions_with_vetokens.sql @@ -0,0 +1,89 @@ +CREATE OR REPLACE VIEW positions_with_vetokens AS ( + WITH + readable_positions AS ( + SELECT p.*, + r.realm_governing_token_mint, + cast(r.voting_mints[p.voting_mint_config_idx + 1]->>'lockupSaturationSecs' as numeric) as lockup_saturation_seconds, + cast(r.voting_mints[p.voting_mint_config_idx + 1]->>'maxExtraLockupVoteWeightScaledFactor' as numeric) / 1000000000 as max_extra_lockup_vote_weight_scaled_factor, + CASE WHEN p.genesis_end > current_ts THEN cast(r.voting_mints[p.voting_mint_config_idx + 1]->>'genesisVotePowerMultiplier' as numeric) ELSE 1 END as genesis_multiplier, + GREATEST( + cast( + p.end_ts - + CASE WHEN lockup_kind = 'constant' THEN start_ts ELSE current_ts END + as numeric + ), + 0 + ) + as seconds_remaining + FROM ( + SELECT *, + lockup->>'kind' as lockup_kind, + cast(lockup->>'endTs' as numeric) as end_ts, + cast(lockup->>'startTs' as numeric) as start_ts, + -- 1683727980 as current_ts + FLOOR(EXTRACT(EPOCH FROM CURRENT_TIMESTAMP)) as current_ts + FROM positions + ) p + JOIN registrars r on p.registrar = r.address + ), + positions_with_vehnt AS ( + SELECT realm_governing_token_mint as mint, + address, + mint as asset, + genesis_end, + num_active_votes, + lockup_kind, + registrar, + refreshed_at, + created_at, + amount_deposited_native, + ve_tokens, + initial_ve_tokens, + CASE WHEN lockup_kind = 'constant' THEN + 0 + ELSE + CASE WHEN current_ts < genesis_end THEN + -- genesis + (ve_tokens - ( + amount_deposited_native * ( + LEAST( + (end_ts - genesis_end) / lockup_saturation_seconds, + 1 + ) * ( + max_extra_lockup_vote_weight_scaled_factor + ) * genesis_multiplier + ) + ) + ) / (genesis_end - current_ts) + ELSE + -- normal + ve_tokens / (end_ts - current_ts) + END + END as fall_rate, + start_ts, + end_ts, + current_ts, + seconds_remaining + FROM ( + SELECT *, + amount_deposited_native * ( + ( + max_extra_lockup_vote_weight_scaled_factor + ) * genesis_multiplier * LEAST( + seconds_remaining / lockup_saturation_seconds, + 1 + ) + ) as ve_tokens, + amount_deposited_native * ( + ( + max_extra_lockup_vote_weight_scaled_factor + ) * genesis_multiplier * LEAST( + (end_ts - start_ts) / lockup_saturation_seconds, + 1 + ) + ) as initial_ve_tokens + FROM readable_positions + ) a + ) + SELECT * FROM positions_with_vehnt +) diff --git a/packages/helium-vote-service/src/env.ts b/packages/helium-vote-service/src/env.ts new file mode 100644 index 000000000..d22684271 --- /dev/null +++ b/packages/helium-vote-service/src/env.ts @@ -0,0 +1,10 @@ +import dotenv from "dotenv"; + +dotenv.config(); + + +export const HELIUM_VOTE_PROXY_REPO = + process.env.HELIUM_VOTE_PROXY_REPO || + "https://github.com/helium/helium-vote-proxies.git"; + + diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts new file mode 100644 index 000000000..fab1d5a19 --- /dev/null +++ b/packages/helium-vote-service/src/index.ts @@ -0,0 +1,186 @@ +import cors from "@fastify/cors"; +import Fastify, { FastifyInstance } from "fastify"; +import fs from "fs"; +import path from "path"; +import { Op } from "sequelize"; +import { + Delegation, + Position, + Proxy, + ProxyRegistrar, + sequelize, +} from "./model"; +import { cloneRepo, readProxiesAndUpsert } from "./repo"; +import fastifyStatic from "@fastify/static"; + +const server: FastifyInstance = Fastify({ + logger: true, +}); +server.register(cors, { + origin: "*", +}); + +server.register(fastifyStatic, { + root: path.join(__dirname, "../helium-vote-proxies"), + prefix: "/helium-vote-proxies/", +}); + +server.get("/health", async () => { + return { ok: true }; +}); +server.get("/sync", async () => { + await cloneRepo(); + await readProxiesAndUpsert(); +}); + +server.get<{ + Params: { position: string }; + Querystring: { + page: number; + limit: number; + owner: string; + nextOwner: string; + position: string; + }; +}>("/delegations", async (request, reply) => { + const { position, owner, nextOwner, page = 1, limit = 1000 } = request.query; + const where: any = {}; + if (owner) where.owner = owner; + if (nextOwner) where.nextOwner = nextOwner; + + const offset = (page - 1) * limit; + + return Delegation.findAll({ + where, + offset, + limit, + include: position + ? [ + { + model: Position, + where: { + address: request.params.position, + }, + attributes: [], + required: true, + }, + ] + : undefined, + }); +}); + +server.get<{ + Params: { registrar: string }; + Querystring: { registrar: string; page: number; limit: number }; +}>("/registrars/:registrar/proxies", async (request, reply) => { + const limit = Number(request.query.limit || 1000); // default limit + const offset = Number((request.query.page || 1) - 1) * limit; + const registrar = request.params.registrar; + const escapedRegistrar = sequelize.escape(registrar); + + const proxies = await sequelize.query(` +WITH + positions_with_delegations AS ( + SELECT + * + FROM + positions_with_vetokens p + JOIN delegations d on d.asset = p.asset + AND d.next_owner = '11111111111111111111111111111111' + WHERE registrar = ${escapedRegistrar} + ), + total_vetokens as ( + SELECT + SUM(ve_tokens) total_vetokens + FROM + positions_with_vetokens + WHERE + registrar = ${escapedRegistrar} + ), + proxies_with_delegations AS ( + SELECT + name, + image, + proxies.wallet as wallet, + description, + detail, + count(p.owner) as "numDelegations", + sum(p.ve_tokens) as "delegatedVeTokens", + 100 * sum(p.ve_tokens) / (select total_vetokens from total_vetokens) as "percent" + FROM + proxies + JOIN proxy_registrars pr ON pr.wallet = proxies.wallet + JOIN positions_with_delegations p ON p.owner = proxies.wallet + WHERE pr.registrar = ${escapedRegistrar} + GROUP BY + name, + image, + proxies.wallet, + description, + detail + ) +SELECT + * +FROM proxies_with_delegations +ORDER BY "delegatedVeTokens" DESC +OFFSET ${offset} +LIMIT ${limit}; + `); + return proxies[0]; +}); + +server.get<{ Params: { registrar: string }; Querystring: { query: string } }>( + "/registrars/:registrar/proxies/search", + async (request, reply) => { + const query = request.query.query; + const registrar = request.params.registrar; + const proxies = await Proxy.findAll({ + attributes: ["name", "description", "image", "wallet", "detail"], + where: { + [Op.or]: [{ name: { [Op.iLike]: `%${query}%` } }], + }, + include: [ + { + model: ProxyRegistrar, + where: { + registrar, + }, + required: true, + attributes: [], + }, + ], + limit: 10, + }); + return proxies; + } +); + +const start = async () => { + try { + const port = process.env.PORT ? Number(process.env.PORT) : 8081; + await server.listen({ + port, + host: "0.0.0.0", + }); + + server.server.address(); + console.log(`Started server on 0.0.0.0:${port}`); + + await Proxy.sync({ alter: true }); + await ProxyRegistrar.sync({ alter: true }); + // Read SQL file + const sqlFilePath = path.join( + __dirname, + "..", + "positions_with_vetokens.sql" + ); + const sqlQuery = fs.readFileSync(sqlFilePath, "utf8"); + + // Execute SQL query + await sequelize.query(sqlQuery); + } catch (err) { + server.log.error(err); + process.exit(1); + } +}; +start(); diff --git a/packages/helium-vote-service/src/model.ts b/packages/helium-vote-service/src/model.ts new file mode 100644 index 000000000..97e1c7b8e --- /dev/null +++ b/packages/helium-vote-service/src/model.ts @@ -0,0 +1,262 @@ +import AWS from "aws-sdk"; +import * as pg from "pg"; +import { DataTypes, Model, Sequelize } from "sequelize"; + +const host = process.env.PGHOST || "localhost"; +const port = Number(process.env.PGPORT) || 5432; +export const sequelize = new Sequelize({ + host: host, + dialect: "postgres", + port: port, + logging: false, + dialectModule: pg, + username: process.env.PGUSER, + database: process.env.PGDATABASE, + pool: { + max: 5, + min: 0, + acquire: 30000, + idle: 10000, + }, + hooks: { + beforeConnect: async (config: any) => { + const isRds = host.includes("rds.amazonaws.com"); + + let password = process.env.PGPASSWORD; + if (isRds && !password) { + const signer = new AWS.RDS.Signer({ + region: process.env.AWS_REGION, + hostname: process.env.PGHOST, + port, + username: process.env.PGUSER, + }); + password = await new Promise((resolve, reject) => + signer.getAuthToken({}, (err, token) => { + if (err) { + return reject(err); + } + resolve(token); + }) + ); + config.dialectOptions = { + ssl: { + require: false, + rejectUnauthorized: false, + }, + }; + } + config.password = password; + }, + }, +}); + +export class VoteMarker extends Model { + declare address: string; + declare voter: string; + declare registrar: string; + declare proposal: string; + declare mint: string; + declare choices: number[]; + declare weight: string; + declare delegationIndex: number; + + declare created_at: Date; +} +VoteMarker.init( + { + address: { + type: DataTypes.STRING, + primaryKey: true, + }, + voter: DataTypes.STRING, + registrar: DataTypes.STRING, + proposal: DataTypes.STRING, + mint: DataTypes.STRING, + choices: DataTypes.JSONB, + weight: DataTypes.DECIMAL(38, 0).UNSIGNED, + delegationIndex: DataTypes.INTEGER, + }, + { + sequelize, + modelName: "vote_marker", + tableName: "vote_markers", + underscored: true, + timestamps: false, + } +); + +export class Registrar extends Model { + declare address: string; + declare governance_program_id: string; + declare realm: string; + declare realm_governing_token_mint: string; + declare realm_authority: string; + declare voting_mints: { + mint: string; + baselineVoteWeightScaledFactor: string; + maxExtraLockupVoteWeightScaledFactor: string; + genesisVotePowerMultiplier: number; + genesisVotePowerMultiplierExpiration: bigint; + lockupSaturationSecs: string; + digitShift: number; + }[]; +} +Registrar.init( + { + address: { + type: DataTypes.STRING, + primaryKey: true, + }, + governance_program_id: DataTypes.STRING, + realm: DataTypes.STRING, + realm_governing_token_mint: DataTypes.STRING, + realm_authority: DataTypes.STRING, + voting_mints: DataTypes.JSONB, + }, + { + sequelize, + modelName: "registrar", + tableName: "registrars", + underscored: true, + timestamps: false, + } +); + +export class Position extends Model { + declare address: string; + declare registrar: string; + declare mint: string; + declare lockup: { + startTs: string; + endTs: string; + kind: "none" | "cliff" | "constant"; + }; + declare amountDepositedNative: string; + declare votingMintConfigIdx: number; + declare numActiveVotes: number; + declare genesisEnd: bigint; + declare voteController: string; +} +Position.init( + { + address: { + type: DataTypes.STRING, + primaryKey: true, + }, + registrar: DataTypes.STRING, + mint: DataTypes.STRING, + lockup: DataTypes.JSONB, + amountDepositedNative: DataTypes.DECIMAL.UNSIGNED, + votingMintConfigIdx: DataTypes.INTEGER, + numActiveVotes: DataTypes.INTEGER, + genesisEnd: DataTypes.BIGINT, + voteController: DataTypes.STRING, + veTokens: DataTypes.BIGINT.UNSIGNED, + }, + { + sequelize, + modelName: "position", + tableName: "positions_with_vetokens", + underscored: true, + timestamps: false, + } +); + +export class Proxy extends Model { + declare name: string; + declare image: string; + declare wallet: string; + declare description: string; + declare detail: string; +} +Proxy.init( + { + name: { + type: DataTypes.STRING, + unique: true + }, + image: DataTypes.STRING, + wallet: { + type: DataTypes.STRING, + primaryKey: true, + }, + description: DataTypes.STRING, + detail: DataTypes.STRING, + }, + { + sequelize, + modelName: "proxy", + tableName: "proxies", + underscored: true, + timestamps: true, + } +); + +export class ProxyRegistrar extends Model { + declare registrar: string; + declare wallet: string; +} +ProxyRegistrar.init( + { + registrar: { + type: DataTypes.STRING, + allowNull: false, + }, + wallet: { + type: DataTypes.STRING, + allowNull: false, + }, + }, + { + sequelize, + modelName: "proxy_registrar", + tableName: "proxy_registrars", + underscored: true, + timestamps: true, + indexes: [ + { + unique: true, + fields: ["registrar", "wallet"], // Add composite index for registrar and wallet + }, + { + fields: ["registrar"], + }, + { + fields: ["wallet"], + }, + ], + } +); + +export class Delegation extends Model { + declare address: string; + declare owner: string; + declare nextOwner: string; + declare index: number; + declare asset: string; +} +Delegation.init( + { + address: { + type: DataTypes.STRING, + primaryKey: true + }, + owner: DataTypes.STRING, + nextOwner: DataTypes.STRING, + index: DataTypes.INTEGER, + asset: DataTypes.STRING, + }, + { + sequelize, + modelName: "delegation", + tableName: "delegations", + underscored: true, + timestamps: false, + } +); + +Delegation.belongsTo(Position, { foreignKey: "asset", targetKey: "mint" }); +Position.hasMany(Delegation, { foreignKey: "asset", sourceKey: "mint" }); +Proxy.hasMany(Delegation, { foreignKey: "owner", sourceKey: "wallet" }); +ProxyRegistrar.hasMany(Proxy, { foreignKey: "wallet", sourceKey: "wallet" }) +Proxy.hasMany(ProxyRegistrar, { foreignKey: "wallet", sourceKey: "wallet" }); diff --git a/packages/helium-vote-service/src/repo.ts b/packages/helium-vote-service/src/repo.ts new file mode 100644 index 000000000..b4b8b4897 --- /dev/null +++ b/packages/helium-vote-service/src/repo.ts @@ -0,0 +1,66 @@ +import simpleGit, { SimpleGit } from "simple-git"; +import { HELIUM_VOTE_PROXY_REPO } from "./env"; +import { Proxy, ProxyRegistrar } from "./model"; +import fs from "fs"; +import { Op } from "sequelize"; +import { HNT_MINT, IOT_MINT, MOBILE_MINT } from "@helium/spl-utils"; +import { getRegistrarKey } from "@helium/voter-stake-registry-sdk"; + +const git: SimpleGit = simpleGit(); + +const networksToRegistrars = { + HNT: getRegistrarKey(HNT_MINT).toBase58(), + MOBILE: getRegistrarKey(MOBILE_MINT).toBase58(), + IOT: getRegistrarKey(IOT_MINT).toBase58(), +}; + +export const cloneRepo = async () => { + if (!fs.existsSync("./helium-vote-proxies")) { + await git.clone(HELIUM_VOTE_PROXY_REPO, "./helium-vote-proxies"); + } else { + await git.cwd("./helium-vote-proxies").pull(); + } +}; + +export const readProxiesAndUpsert = async () => { + const proxiesJson = fs.readFileSync( + "./helium-vote-proxies/proxies.json", + "utf-8" + ); + const proxies = JSON.parse(proxiesJson); + for (const proxy of proxies) { + for (const network of proxy.networks) { + const registrar = networksToRegistrars[network]; + if (registrar) { + const proxyRegistrar = { + registrar, + wallet: proxy.wallet, + }; + const existing = await ProxyRegistrar.findOne({ + where: proxyRegistrar, + }); + if (!existing) { + await ProxyRegistrar.create(proxyRegistrar) + } + } + } + delete proxy.networks + const existingProxy = await Proxy.findOne({ + where: { + [Op.or]: [{ name: proxy.name }, { wallet: proxy.wallet }], + }, + }); + if (existingProxy) { + if (existingProxy.wallet !== proxy.wallet) { + await existingProxy.destroy(); + await Proxy.create(proxy); + } else { + await existingProxy.update(proxy); + } + } else { + await Proxy.create(proxy); + } + } +}; + +cloneRepo().then(readProxiesAndUpsert); diff --git a/packages/helium-vote-service/tsconfig.build.json b/packages/helium-vote-service/tsconfig.build.json new file mode 100644 index 000000000..2c3b5b795 --- /dev/null +++ b/packages/helium-vote-service/tsconfig.build.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "ES2016", + "module": "CommonJS", + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "composite": true, + "forceConsistentCasingInFileNames": true, + "isolatedModules": false, + "moduleResolution": "Node", + "skipLibCheck": true, + "baseUrl": ".", + "typeRoots": ["node_modules/@types"], + "strict": true, + "paths": { + "@/*": ["*"] + }, + "outDir": "lib", + }, + "include": ["src"], +} diff --git a/packages/helium-vote-service/tsconfig.cjs.json b/packages/helium-vote-service/tsconfig.cjs.json new file mode 100644 index 000000000..5445b9909 --- /dev/null +++ b/packages/helium-vote-service/tsconfig.cjs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.cjs.json", + "include": ["src"], + "compilerOptions": { + "outDir": "lib/cjs" + } +} diff --git a/packages/helium-vote-service/tsconfig.esm.json b/packages/helium-vote-service/tsconfig.esm.json new file mode 100644 index 000000000..f2835b2e5 --- /dev/null +++ b/packages/helium-vote-service/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.esm.json", + "include": ["src"], + "compilerOptions": { + "outDir": "lib/esm", + "declarationDir": "lib/types" + } +} \ No newline at end of file diff --git a/packages/helium-vote-service/tsconfig.json b/packages/helium-vote-service/tsconfig.json new file mode 100644 index 000000000..d278f3ec6 --- /dev/null +++ b/packages/helium-vote-service/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.root.json", + "references": [ + { + "path": "../voter-stake-registry-sdk" + }, + { + "path": "../spl-utils" + }, + { + "path": "./tsconfig.cjs.json" + }, + { + "path": "./tsconfig.esm.json" + } + ] +} diff --git a/packages/helium-vote-service/yarn.deploy.lock b/packages/helium-vote-service/yarn.deploy.lock new file mode 100644 index 000000000..3ed17f18b --- /dev/null +++ b/packages/helium-vote-service/yarn.deploy.lock @@ -0,0 +1,3426 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 6 + cacheKey: 8 + +"@babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.22.6": + version: 7.22.11 + resolution: "@babel/runtime@npm:7.22.11" + dependencies: + regenerator-runtime: "npm:^0.14.0" + checksum: a5cd6683a8fcdb8065cb1677f221e22f6c67ec8f15ad1d273b180b93ab3bd86c66da2c48f500d4e72d8d2cfa85ff4872a3f350e5aa3855630036af5da765c001 + languageName: node + linkType: hard + +"@coral-xyz/anchor@npm:^0.28.0": + version: 0.28.0 + resolution: "@coral-xyz/anchor@npm:0.28.0" + dependencies: + "@coral-xyz/borsh": "npm:^0.28.0" + "@solana/web3.js": "npm:^1.68.0" + base64-js: "npm:^1.5.1" + bn.js: "npm:^5.1.2" + bs58: "npm:^4.0.1" + buffer-layout: "npm:^1.2.2" + camelcase: "npm:^6.3.0" + cross-fetch: "npm:^3.1.5" + crypto-hash: "npm:^1.3.0" + eventemitter3: "npm:^4.0.7" + js-sha256: "npm:^0.9.0" + pako: "npm:^2.0.3" + snake-case: "npm:^3.0.4" + superstruct: "npm:^0.15.4" + toml: "npm:^3.0.0" + checksum: 58b3677b5b2ce2c779045184ce4a0ef696966a6a58f41c1c56f6f178db0491acecb6ec677ce0502f0b382a2c724f9c2860d82cc88601784d556d95fbeda415e5 + languageName: node + linkType: hard + +"@coral-xyz/borsh@npm:^0.28.0": + version: 0.28.0 + resolution: "@coral-xyz/borsh@npm:0.28.0" + dependencies: + bn.js: "npm:^5.1.2" + buffer-layout: "npm:^1.2.0" + peerDependencies: + "@solana/web3.js": ^1.68.0 + checksum: bc2b06b777f9ed43d3b886d2350826bd44d5b932c4fd4471af5956e8755236f5854938c890ee4986d88f61d1439e1d84e715c43dcb6dca4e76198c1ce8dc7a58 + languageName: node + linkType: hard + +"@cspotcode/source-map-support@npm:^0.8.0": + version: 0.8.1 + resolution: "@cspotcode/source-map-support@npm:0.8.1" + dependencies: + "@jridgewell/trace-mapping": "npm:0.3.9" + checksum: 5718f267085ed8edb3e7ef210137241775e607ee18b77d95aa5bd7514f47f5019aa2d82d96b3bf342ef7aa890a346fa1044532ff7cc3009e7d24fce3ce6200fa + languageName: node + linkType: hard + +"@fastify/accept-negotiator@npm:^1.0.0": + version: 1.1.0 + resolution: "@fastify/accept-negotiator@npm:1.1.0" + checksum: 5c8f263680af0aece8c1fdea4d4c094a7f82cc5ed90b709357eb52a01e3388d1ac74a17e5a1d5d53f2d3ca93ae50d283ee451a6435b2cbe1b9847fff4d7d0732 + languageName: node + linkType: hard + +"@fastify/ajv-compiler@npm:^3.5.0": + version: 3.5.0 + resolution: "@fastify/ajv-compiler@npm:3.5.0" + dependencies: + ajv: "npm:^8.11.0" + ajv-formats: "npm:^2.1.1" + fast-uri: "npm:^2.0.0" + checksum: 5e5b16469f8d586473d0b32e3a9cf38c0d86ef2a6fb7ea12ed7f3665642bd8eb2dde9adcc317814369cb5a58210bfdac35996fa87d1cc23e88bbc799f0b128b0 + languageName: node + linkType: hard + +"@fastify/cors@npm:^8.1.1": + version: 8.3.0 + resolution: "@fastify/cors@npm:8.3.0" + dependencies: + fastify-plugin: "npm:^4.0.0" + mnemonist: "npm:0.39.5" + checksum: f487b5a8823264c3db58e99df020e38ada524514d60f2c5c2e01b994519545e2fc9481006d98e485b40e536b9b89f72af9061d9377b8e93f6ce07b14d40164a2 + languageName: node + linkType: hard + +"@fastify/deepmerge@npm:^1.0.0": + version: 1.3.0 + resolution: "@fastify/deepmerge@npm:1.3.0" + checksum: 33ec927905dca320d7ae9535a1521909f7c82339706345324ab6287ad100589a799b8257c15b0e582c7bb74e2aa4883d82ba0228d7b116aa8789ada4f78d6974 + languageName: node + linkType: hard + +"@fastify/error@npm:^3.2.0": + version: 3.3.0 + resolution: "@fastify/error@npm:3.3.0" + checksum: 202507c8c7f49922cac2f5afc82802151b0bd9c583ca1c2850bf43d0f4cd97eedb3a3388b9016da74f8a01b517a5861d1f666c506dd64fd22995e559bc139264 + languageName: node + linkType: hard + +"@fastify/fast-json-stringify-compiler@npm:^4.3.0": + version: 4.3.0 + resolution: "@fastify/fast-json-stringify-compiler@npm:4.3.0" + dependencies: + fast-json-stringify: "npm:^5.7.0" + checksum: 2734afabe2539d3e15d2bd9f8dfee756d9cd969f7303dc085dd91c744ff61742bb0d3ebd3b561cf3c32be54567048a634b4962f943eb6bd9ed3fbd71cbf6a4fa + languageName: node + linkType: hard + +"@fastify/send@npm:^2.0.0": + version: 2.1.0 + resolution: "@fastify/send@npm:2.1.0" + dependencies: + "@lukeed/ms": ^2.0.1 + escape-html: ~1.0.3 + fast-decode-uri-component: ^1.0.1 + http-errors: 2.0.0 + mime: ^3.0.0 + checksum: c0eeddd35c53167e41ee7c25ccbb964e5a1e4a17c827da6486db656581f83f162237d6f8104b698a4a136d8ea054f2d028bfa4c7d1c4126db51584680f43e1f1 + languageName: node + linkType: hard + +"@fastify/static@npm:^6": + version: 6.12.0 + resolution: "@fastify/static@npm:6.12.0" + dependencies: + "@fastify/accept-negotiator": ^1.0.0 + "@fastify/send": ^2.0.0 + content-disposition: ^0.5.3 + fastify-plugin: ^4.0.0 + glob: ^8.0.1 + p-limit: ^3.1.0 + checksum: 1ba2f88665baddc9e67c7ea8aee401b5ec8c207e7fd615b2e68246a7ee2cafcc75e66b66d901abb154566fa7132af2319cd00e15350ed57936b74ee10c8eb9c7 + languageName: node + linkType: hard + +"@helium/account-fetch-cache@^0.6.2": + version: 0.0.0-use.local + resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" + dependencies: + "@solana/web3.js": ^1.78.4 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + +"@helium/address@npm:^4.10.2": + version: 4.10.2 + resolution: "@helium/address@npm:4.10.2" + dependencies: + bs58: "npm:^5.0.0" + js-sha256: "npm:^0.9.0" + multiformats: "npm:^9.6.4" + checksum: 4d83df57c638ed1496a92241a2f45da671e11b6397f02ab65c5281cbd1a435548e7ffd5be969d8d214b5af045e9be4bdd2d89f41744289c17e6410d458b03bcc + languageName: node + linkType: hard + +"@helium/anchor-resolvers@^0.6.2": + version: 0.0.0-use.local + resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" + dependencies: + "@solana/spl-token": ^0.3.8 + "@solana/web3.js": ^1.78.4 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + peerDependencies: + "@coral-xyz/anchor": ^0.28.0 + languageName: unknown + linkType: soft + +"@helium/anchor-resolvers@npm:^0.2.17": + version: 0.2.21 + resolution: "@helium/anchor-resolvers@npm:0.2.21" + dependencies: + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.43.4" + peerDependencies: + "@coral-xyz/anchor": ^0.26.0 + checksum: b8639d000c7a95f47810e62b31e3fd5795ba2152310a0047dc80e09191cd8b56a949eea223f00902c2fcabe47f17090fa2b49b8386d90cd98dded6612992443f + languageName: node + linkType: hard + +"@helium/helium-vote-service@workspace:.": + version: 0.0.0-use.local + resolution: "@helium/helium-vote-service@workspace:." + dependencies: + "@fastify/cors": ^8.1.1 + "@fastify/static": ^6 + "@helium/spl-utils": ^0.6.2 + "@helium/voter-stake-registry-sdk": ^0.6.2 + "@types/bn.js": ^5.1.1 + dotenv: ^16.0.3 + fastify: ^4.13.0 + git-format-staged: ^2.1.3 + sequelize: ^6.28.0 + simple-git: ^3.21.0 + ts-loader: ^9.2.3 + ts-node: ^10.9.1 + ts-node-dev: ^2.0.0 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + +"@helium/idls@^0.6.2": + version: 0.0.0-use.local + resolution: "@helium/idls@workspace:packages/idls" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + bn.js: ^5.2.0 + borsh: ^0.7.0 + bs58: ^4.0.1 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + +"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": + version: 0.0.8-next.12 + resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@solana/spl-token": ^0.3.8 + checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + languageName: node + linkType: hard + +"@helium/spl-utils@^0.6.2": + version: 0.0.0-use.local + resolution: "@helium/spl-utils@workspace:packages/spl-utils" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/account-fetch-cache": ^0.6.2 + "@helium/address": ^4.10.2 + "@helium/anchor-resolvers": ^0.6.2 + "@metaplex-foundation/mpl-token-metadata": ^2.10.0 + "@solana/spl-account-compression": ^0.1.7 + "@solana/spl-token": ^0.3.8 + "@solana/web3.js": ^1.78.4 + axios: ^1.5.0 + bn.js: ^5.2.0 + borsh: ^0.7.0 + bs58: ^4.0.1 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + +"@helium/voter-stake-registry-sdk@^0.6.2": + version: 0.0.0-use.local + resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.6.2 + "@helium/idls": ^0.6.2 + "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@metaplex-foundation/mpl-token-metadata": ^2.10.0 + "@solana/spl-token": ^0.3.8 + bn.js: ^5.2.0 + bs58: ^4.0.1 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + ts-node: ^10.9.1 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 4a473b9b32a7d4d3cfb7a614226e555091ff0c5a29a1734c28c72a182c2f6699b26fc6b5c2131dfd841e86b185aea714c72201d7c98c2fba5f17709333a67aeb + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.0.3": + version: 3.1.1 + resolution: "@jridgewell/resolve-uri@npm:3.1.1" + checksum: f5b441fe7900eab4f9155b3b93f9800a916257f4e8563afbcd3b5a5337b55e52bd8ae6735453b1b745457d9f6cdb16d74cd6220bbdd98cf153239e13f6cbb653 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10": + version: 1.4.15 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" + checksum: b881c7e503db3fc7f3c1f35a1dd2655a188cc51a3612d76efc8a6eb74728bef5606e6758ee77423e564092b4a518aba569bbb21c9bac5ab7a35b0c6ae7e344c8 + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:0.3.9": + version: 0.3.9 + resolution: "@jridgewell/trace-mapping@npm:0.3.9" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.0.3" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + checksum: d89597752fd88d3f3480845691a05a44bd21faac18e2185b6f436c3b0fd0c5a859fbbd9aaa92050c4052caf325ad3e10e2e1d1b64327517471b7d51babc0ddef + languageName: node + linkType: hard + +"@kwsites/file-exists@npm:^1.1.1": + version: 1.1.1 + resolution: "@kwsites/file-exists@npm:1.1.1" + dependencies: + debug: ^4.1.1 + checksum: 4ff945de7293285133aeae759caddc71e73c4a44a12fac710fdd4f574cce2671a3f89d8165fdb03d383cfc97f3f96f677d8de3c95133da3d0e12a123a23109fe + languageName: node + linkType: hard + +"@kwsites/promise-deferred@npm:^1.1.1": + version: 1.1.1 + resolution: "@kwsites/promise-deferred@npm:1.1.1" + checksum: 07455477a0123d9a38afb503739eeff2c5424afa8d3dbdcc7f9502f13604488a4b1d9742fc7288832a52a6422cf1e1c0a1d51f69a39052f14d27c9a0420b6629 + languageName: node + linkType: hard + +"@lukeed/ms@npm:^2.0.1": + version: 2.0.1 + resolution: "@lukeed/ms@npm:2.0.1" + checksum: c7b46933bf7bad3e024dcbbe2ad6201392b4ed2a05a717c0ef7e96a03fb885d44f08b4b749c392cc51c2736a6a45a08c77f1863ace1c072928fbfd9908a13db3 + languageName: node + linkType: hard + +"@metaplex-foundation/beet-solana@npm:^0.4.0": + version: 0.4.0 + resolution: "@metaplex-foundation/beet-solana@npm:0.4.0" + dependencies: + "@metaplex-foundation/beet": "npm:>=0.1.0" + "@solana/web3.js": "npm:^1.56.2" + bs58: "npm:^5.0.0" + debug: "npm:^4.3.4" + checksum: ee746c2d15f985c31d133d4ee29efbda445877473cc32aafa4b684ce3fa9a916ddff30d0e3cfef7654ff5725adff59a62a635c76bc781a6e1362c5b5d3137ed0 + languageName: node + linkType: hard + +"@metaplex-foundation/beet@npm:>=0.1.0, @metaplex-foundation/beet@npm:^0.7.1": + version: 0.7.1 + resolution: "@metaplex-foundation/beet@npm:0.7.1" + dependencies: + ansicolors: "npm:^0.3.2" + bn.js: "npm:^5.2.0" + debug: "npm:^4.3.3" + checksum: f8a330073ab1a0976478e9847c0e63e32f7bee67ea6306e1f89784e8275e30daaecba7cbc5f3424e5d96c411aa3bfbc2b638c105a90067a985acdfbd33a1a287 + languageName: node + linkType: hard + +"@metaplex-foundation/cusper@npm:^0.0.2": + version: 0.0.2 + resolution: "@metaplex-foundation/cusper@npm:0.0.2" + checksum: d157953baf42a2a012cdeb809c1785f29a44d80a3b5a3841c930baeb12ac6ddcf37f1a15eded4dce20d66f7bc8f23bedb87e905758df721e274bfcd816e70ba1 + languageName: node + linkType: hard + +"@metaplex-foundation/mpl-token-metadata@npm:^2.10.0": + version: 2.13.0 + resolution: "@metaplex-foundation/mpl-token-metadata@npm:2.13.0" + dependencies: + "@metaplex-foundation/beet": "npm:^0.7.1" + "@metaplex-foundation/beet-solana": "npm:^0.4.0" + "@metaplex-foundation/cusper": "npm:^0.0.2" + "@solana/spl-token": "npm:^0.3.6" + "@solana/web3.js": "npm:^1.66.2" + bn.js: "npm:^5.2.0" + debug: "npm:^4.3.4" + checksum: 89f82980f435ac45d961e6ab03859c7e4ab9809ad2d9f84aca91bcf50fdc60e210d0596d8856adf63e474ca69d971c51a4c27d0fe4dab115fcef64d57f3be611 + languageName: node + linkType: hard + +"@noble/curves@npm:^1.0.0": + version: 1.2.0 + resolution: "@noble/curves@npm:1.2.0" + dependencies: + "@noble/hashes": "npm:1.3.2" + checksum: bb798d7a66d8e43789e93bc3c2ddff91a1e19fdb79a99b86cd98f1e5eff0ee2024a2672902c2576ef3577b6f282f3b5c778bebd55761ddbb30e36bf275e83dd0 + languageName: node + linkType: hard + +"@noble/hashes@npm:1.3.2, @noble/hashes@npm:^1.3.1": + version: 1.3.2 + resolution: "@noble/hashes@npm:1.3.2" + checksum: fe23536b436539d13f90e4b9be843cc63b1b17666a07634a2b1259dded6f490be3d050249e6af98076ea8f2ea0d56f578773c2197f2aa0eeaa5fba5bc18ba474 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^3.1.0": + version: 3.1.0 + resolution: "@npmcli/fs@npm:3.1.0" + dependencies: + semver: "npm:^7.3.5" + checksum: a50a6818de5fc557d0b0e6f50ec780a7a02ab8ad07e5ac8b16bf519e0ad60a144ac64f97d05c443c3367235d337182e1d012bbac0eb8dbae8dc7b40b193efd0e + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 6ad6a00fc4f2f2cfc6bff76fb1d88b8ee20bc0601e18ebb01b6d4be583733a860239a521a7fbca73b612e66705078809483549d2b18f370eb346c5155c8e4a0f + languageName: node + linkType: hard + +"@solana/buffer-layout-utils@npm:^0.2.0": + version: 0.2.0 + resolution: "@solana/buffer-layout-utils@npm:0.2.0" + dependencies: + "@solana/buffer-layout": "npm:^4.0.0" + "@solana/web3.js": "npm:^1.32.0" + bigint-buffer: "npm:^1.1.5" + bignumber.js: "npm:^9.0.1" + checksum: 9284242245b18b49577195ba7548263850be865a4a2d183944fa01bb76382039db589aab8473698e9bb734b515ada9b4d70db0a72e341c5d567c59b83d6d0840 + languageName: node + linkType: hard + +"@solana/buffer-layout@npm:^4.0.0": + version: 4.0.1 + resolution: "@solana/buffer-layout@npm:4.0.1" + dependencies: + buffer: "npm:~6.0.3" + checksum: bf846888e813187243d4008a7a9f58b49d16cbd995b9d7f1b72898aa510ed77b1ce5e8468e7b2fd26dd81e557a4e74a666e21fccb95f123c1f740d41138bbacd + languageName: node + linkType: hard + +"@solana/spl-account-compression@npm:^0.1.7": + version: 0.1.10 + resolution: "@solana/spl-account-compression@npm:0.1.10" + dependencies: + "@metaplex-foundation/beet": "npm:^0.7.1" + "@metaplex-foundation/beet-solana": "npm:^0.4.0" + bn.js: "npm:^5.2.1" + borsh: "npm:^0.7.0" + js-sha3: "npm:^0.8.0" + typescript-collections: "npm:^1.3.3" + peerDependencies: + "@solana/web3.js": ^1.50.1 + checksum: 99bd851933c46a068dbd13484770edd7ae12488b1474ee2e9d7dfd114087f3f9f813745795f91278142fbeb09aec1024f74ef2d2c8be2b47f1df319d37f0af11 + languageName: node + linkType: hard + +"@solana/spl-token@npm:^0.3.6, @solana/spl-token@npm:^0.3.8": + version: 0.3.8 + resolution: "@solana/spl-token@npm:0.3.8" + dependencies: + "@solana/buffer-layout": "npm:^4.0.0" + "@solana/buffer-layout-utils": "npm:^0.2.0" + buffer: "npm:^6.0.3" + peerDependencies: + "@solana/web3.js": ^1.47.4 + checksum: 01f4f87112b0ad277701a3bcb8e03069b69449b92724b17959107686731082bfd3475b5f105e1e8f04badd2e810a43d5ef811744ced5178eea1232de8fd75147 + languageName: node + linkType: hard + +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": + version: 1.78.4 + resolution: "@solana/web3.js@npm:1.78.4" + dependencies: + "@babel/runtime": "npm:^7.22.6" + "@noble/curves": "npm:^1.0.0" + "@noble/hashes": "npm:^1.3.1" + "@solana/buffer-layout": "npm:^4.0.0" + agentkeepalive: "npm:^4.3.0" + bigint-buffer: "npm:^1.1.5" + bn.js: "npm:^5.2.1" + borsh: "npm:^0.7.0" + bs58: "npm:^4.0.1" + buffer: "npm:6.0.3" + fast-stable-stringify: "npm:^1.0.0" + jayson: "npm:^4.1.0" + node-fetch: "npm:^2.6.12" + rpc-websockets: "npm:^7.5.1" + superstruct: "npm:^0.14.2" + checksum: e1c44c6cbec87cdfd4d6d23b4241b746e14ed3a9ca73d596693758d91ac825cecf579345da3b0b7bb5e54b6794791bc0eac02cadf11f1ec79e859b6536f26f11 + languageName: node + linkType: hard + +"@tootallnate/once@npm:2": + version: 2.0.0 + resolution: "@tootallnate/once@npm:2.0.0" + checksum: ad87447820dd3f24825d2d947ebc03072b20a42bfc96cbafec16bff8bbda6c1a81fcb0be56d5b21968560c5359a0af4038a68ba150c3e1694fe4c109a063bed8 + languageName: node + linkType: hard + +"@tsconfig/node10@npm:^1.0.7": + version: 1.0.9 + resolution: "@tsconfig/node10@npm:1.0.9" + checksum: a33ae4dc2a621c0678ac8ac4bceb8e512ae75dac65417a2ad9b022d9b5411e863c4c198b6ba9ef659e14b9fb609bbec680841a2e84c1172df7a5ffcf076539df + languageName: node + linkType: hard + +"@tsconfig/node12@npm:^1.0.7": + version: 1.0.11 + resolution: "@tsconfig/node12@npm:1.0.11" + checksum: 5ce29a41b13e7897a58b8e2df11269c5395999e588b9a467386f99d1d26f6c77d1af2719e407621412520ea30517d718d5192a32403b8dfcc163bf33e40a338a + languageName: node + linkType: hard + +"@tsconfig/node14@npm:^1.0.0": + version: 1.0.3 + resolution: "@tsconfig/node14@npm:1.0.3" + checksum: 19275fe80c4c8d0ad0abed6a96dbf00642e88b220b090418609c4376e1cef81bf16237bf170ad1b341452feddb8115d8dd2e5acdfdea1b27422071163dc9ba9d + languageName: node + linkType: hard + +"@tsconfig/node16@npm:^1.0.2": + version: 1.0.4 + resolution: "@tsconfig/node16@npm:1.0.4" + checksum: 202319785901f942a6e1e476b872d421baec20cf09f4b266a1854060efbf78cde16a4d256e8bc949d31e6cd9a90f1e8ef8fb06af96a65e98338a2b6b0de0a0ff + languageName: node + linkType: hard + +"@types/bn.js@npm:^5.1.1": + version: 5.1.1 + resolution: "@types/bn.js@npm:5.1.1" + dependencies: + "@types/node": "npm:*" + checksum: e50ed2dd3abe997e047caf90e0352c71e54fc388679735217978b4ceb7e336e51477791b715f49fd77195ac26dd296c7bad08a3be9750e235f9b2e1edb1b51c2 + languageName: node + linkType: hard + +"@types/connect@npm:^3.4.33": + version: 3.4.35 + resolution: "@types/connect@npm:3.4.35" + dependencies: + "@types/node": "npm:*" + checksum: fe81351470f2d3165e8b12ce33542eef89ea893e36dd62e8f7d72566dfb7e448376ae962f9f3ea888547ce8b55a40020ca0e01d637fab5d99567673084542641 + languageName: node + linkType: hard + +"@types/debug@npm:^4.1.8": + version: 4.1.8 + resolution: "@types/debug@npm:4.1.8" + dependencies: + "@types/ms": "npm:*" + checksum: a9a9bb40a199e9724aa944e139a7659173a9b274798ea7efbc277cb084bc37d32fc4c00877c3496fac4fed70a23243d284adb75c00b5fdabb38a22154d18e5df + languageName: node + linkType: hard + +"@types/ms@npm:*": + version: 0.7.31 + resolution: "@types/ms@npm:0.7.31" + checksum: daadd354aedde024cce6f5aa873fefe7b71b22cd0e28632a69e8b677aeb48ae8caa1c60e5919bb781df040d116b01cb4316335167a3fc0ef6a63fa3614c0f6da + languageName: node + linkType: hard + +"@types/node@npm:*": + version: 20.5.7 + resolution: "@types/node@npm:20.5.7" + checksum: fc284c8e16ddc04569730d58e87eae349eb1c3dd9020cb79a1862d9d9add6f04e7367a236f3252db8db2572f90278e250f4cd43d27d264972b54394eaba1ed76 + languageName: node + linkType: hard + +"@types/node@npm:^12.12.54": + version: 12.20.55 + resolution: "@types/node@npm:12.20.55" + checksum: e4f86785f4092706e0d3b0edff8dca5a13b45627e4b36700acd8dfe6ad53db71928c8dee914d4276c7fd3b6ccd829aa919811c9eb708a2c8e4c6eb3701178c37 + languageName: node + linkType: hard + +"@types/strip-bom@npm:^3.0.0": + version: 3.0.0 + resolution: "@types/strip-bom@npm:3.0.0" + checksum: cb165d0c2ce6abbef95506ebee25be02bd453600ef1792dc1754236e5d6f9c830d52bdb85978d0b08ea1f36b96a61235ac5ad99e0f4c2767fb4ea004e141d2df + languageName: node + linkType: hard + +"@types/strip-json-comments@npm:0.0.30": + version: 0.0.30 + resolution: "@types/strip-json-comments@npm:0.0.30" + checksum: 829ddd389645073f347c5b1924a8c34b8813af29756576e511c46f40e218193cf93ccbade62661d47fc70f707e98f410331729b8c20edfcb2e807d51df1ad4b7 + languageName: node + linkType: hard + +"@types/validator@npm:^13.7.17": + version: 13.11.1 + resolution: "@types/validator@npm:13.11.1" + checksum: 49e8b611e0b9a0cd645534fd5eeacc64c14ac2f11d7e91d3d8b891f7cf730bccb8a4b7466ac67f4c11e16531bc211a547b97314ca977dd5e58468a77bd0da735 + languageName: node + linkType: hard + +"@types/ws@npm:^7.4.4": + version: 7.4.7 + resolution: "@types/ws@npm:7.4.7" + dependencies: + "@types/node": "npm:*" + checksum: b4c9b8ad209620c9b21e78314ce4ff07515c0cadab9af101c1651e7bfb992d7fd933bd8b9c99d110738fd6db523ed15f82f29f50b45510288da72e964dedb1a3 + languageName: node + linkType: hard + +"JSONStream@npm:^1.3.5": + version: 1.3.5 + resolution: "JSONStream@npm:1.3.5" + dependencies: + jsonparse: "npm:^1.2.0" + through: "npm:>=2.2.7 <3" + bin: + JSONStream: ./bin.js + checksum: 2605fa124260c61bad38bb65eba30d2f72216a78e94d0ab19b11b4e0327d572b8d530c0c9cc3b0764f727ad26d39e00bf7ebad57781ca6368394d73169c59e46 + languageName: node + linkType: hard + +"abbrev@npm:^1.0.0": + version: 1.1.1 + resolution: "abbrev@npm:1.1.1" + checksum: a4a97ec07d7ea112c517036882b2ac22f3109b7b19077dc656316d07d308438aac28e4d9746dc4d84bf6b1e75b4a7b0a5f3cb30592419f128ca9a8cee3bcfa17 + languageName: node + linkType: hard + +"abort-controller@npm:^3.0.0": + version: 3.0.0 + resolution: "abort-controller@npm:3.0.0" + dependencies: + event-target-shim: "npm:^5.0.0" + checksum: 170bdba9b47b7e65906a28c8ce4f38a7a369d78e2271706f020849c1bfe0ee2067d4261df8bbb66eb84f79208fd5b710df759d64191db58cfba7ce8ef9c54b75 + languageName: node + linkType: hard + +"abstract-logging@npm:^2.0.1": + version: 2.0.1 + resolution: "abstract-logging@npm:2.0.1" + checksum: 6967d15e5abbafd17f56eaf30ba8278c99333586fa4f7935fd80e93cfdc006c37fcc819c5d63ee373a12e6cb2d0417f7c3c6b9e42b957a25af9937d26749415e + languageName: node + linkType: hard + +"acorn-walk@npm:^8.1.1": + version: 8.2.0 + resolution: "acorn-walk@npm:8.2.0" + checksum: 1715e76c01dd7b2d4ca472f9c58968516a4899378a63ad5b6c2d668bba8da21a71976c14ec5f5b75f887b6317c4ae0b897ab141c831d741dc76024d8745f1ad1 + languageName: node + linkType: hard + +"acorn@npm:^8.4.1": + version: 8.10.0 + resolution: "acorn@npm:8.10.0" + bin: + acorn: bin/acorn + checksum: 538ba38af0cc9e5ef983aee196c4b8b4d87c0c94532334fa7e065b2c8a1f85863467bb774231aae91613fcda5e68740c15d97b1967ae3394d20faddddd8af61d + languageName: node + linkType: hard + +"agent-base@npm:6, agent-base@npm:^6.0.2": + version: 6.0.2 + resolution: "agent-base@npm:6.0.2" + dependencies: + debug: "npm:4" + checksum: f52b6872cc96fd5f622071b71ef200e01c7c4c454ee68bc9accca90c98cfb39f2810e3e9aa330435835eedc8c23f4f8a15267f67c6e245d2b33757575bdac49d + languageName: node + linkType: hard + +"agentkeepalive@npm:^4.2.1, agentkeepalive@npm:^4.3.0": + version: 4.5.0 + resolution: "agentkeepalive@npm:4.5.0" + dependencies: + humanize-ms: "npm:^1.2.1" + checksum: 13278cd5b125e51eddd5079f04d6fe0914ac1b8b91c1f3db2c1822f99ac1a7457869068997784342fe455d59daaff22e14fb7b8c3da4e741896e7e31faf92481 + languageName: node + linkType: hard + +"aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: "npm:^2.0.0" + indent-string: "npm:^4.0.0" + checksum: 1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + +"ajv-formats@npm:^2.1.1": + version: 2.1.1 + resolution: "ajv-formats@npm:2.1.1" + dependencies: + ajv: "npm:^8.0.0" + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + checksum: 4a287d937f1ebaad4683249a4c40c0fa3beed30d9ddc0adba04859026a622da0d317851316ea64b3680dc60f5c3c708105ddd5d5db8fe595d9d0207fd19f90b7 + languageName: node + linkType: hard + +"ajv@npm:^8.0.0, ajv@npm:^8.10.0, ajv@npm:^8.11.0": + version: 8.12.0 + resolution: "ajv@npm:8.12.0" + dependencies: + fast-deep-equal: "npm:^3.1.1" + json-schema-traverse: "npm:^1.0.0" + require-from-string: "npm:^2.0.2" + uri-js: "npm:^4.2.2" + checksum: 4dc13714e316e67537c8b31bc063f99a1d9d9a497eb4bbd55191ac0dcd5e4985bbb71570352ad6f1e76684fb6d790928f96ba3b2d4fd6e10024be9612fe3f001 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 513b44c3b2105dd14cc42a19271e80f386466c4be574bccf60b627432f9198571ebf4ab1e4c3ba17347658f4ee1711c163d574248c0c1cdc2d5917a0ad582ec4 + languageName: node + linkType: hard + +"ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: ef940f2f0ced1a6347398da88a91da7930c33ecac3c77b72c5905f8b8fe402c52e6fde304ff5347f616e27a742da3f1dc76de98f6866c69251ad0b07a66776d9 + languageName: node + linkType: hard + +"ansicolors@npm:^0.3.2": + version: 0.3.2 + resolution: "ansicolors@npm:0.3.2" + checksum: e84fae7ebc27ac96d9dbb57f35f078cd6dde1b7046b0f03f73dcefc9fbb1f2e82e3685d083466aded8faf038f9fa9ebb408d215282bcd7aaa301d5ac3c486815 + languageName: node + linkType: hard + +"anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + +"aproba@npm:^1.0.3 || ^2.0.0": + version: 2.0.0 + resolution: "aproba@npm:2.0.0" + checksum: 5615cadcfb45289eea63f8afd064ab656006361020e1735112e346593856f87435e02d8dcc7ff0d11928bc7d425f27bc7c2a84f6c0b35ab0ff659c814c138a24 + languageName: node + linkType: hard + +"archy@npm:^1.0.0": + version: 1.0.0 + resolution: "archy@npm:1.0.0" + checksum: 504ae7af655130bab9f471343cfdb054feaec7d8e300e13348bc9fe9e660f83d422e473069584f73233c701ae37d1c8452ff2522f2a20c38849e0f406f1732ac + languageName: node + linkType: hard + +"are-we-there-yet@npm:^3.0.0": + version: 3.0.1 + resolution: "are-we-there-yet@npm:3.0.1" + dependencies: + delegates: "npm:^1.0.0" + readable-stream: "npm:^3.6.0" + checksum: 52590c24860fa7173bedeb69a4c05fb573473e860197f618b9a28432ee4379049336727ae3a1f9c4cb083114601c1140cee578376164d0e651217a9843f9fe83 + languageName: node + linkType: hard + +"arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 544af8dd3f60546d3e4aff084d451b96961d2267d668670199692f8d054f0415d86fc5497d0e641e91546f0aa920e7c29e5250e99fc89f5552a34b5d93b77f43 + languageName: node + linkType: hard + +"asynckit@npm:^0.4.0": + version: 0.4.0 + resolution: "asynckit@npm:0.4.0" + checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be + languageName: node + linkType: hard + +"atomic-sleep@npm:^1.0.0": + version: 1.0.0 + resolution: "atomic-sleep@npm:1.0.0" + checksum: b95275afb2f80732f22f43a60178430c468906a415a7ff18bcd0feeebc8eec3930b51250aeda91a476062a90e07132b43a1794e8d8ffcf9b650e8139be75fa36 + languageName: node + linkType: hard + +"avvio@npm:^8.2.1": + version: 8.2.1 + resolution: "avvio@npm:8.2.1" + dependencies: + archy: "npm:^1.0.0" + debug: "npm:^4.0.0" + fastq: "npm:^1.6.1" + checksum: 4c96922ea123d13b26cb78a071a8989fde62ee8580352b6d2f05b7976ed3d23efa663c12ee1be35501dfe65e12a769a2ea522bcdb7ca35a5ba4d86766467075a + languageName: node + linkType: hard + +"axios@npm:^1.5.0": + version: 1.5.0 + resolution: "axios@npm:1.5.0" + dependencies: + follow-redirects: "npm:^1.15.0" + form-data: "npm:^4.0.0" + proxy-from-env: "npm:^1.1.0" + checksum: e7405a5dbbea97760d0e6cd58fecba311b0401ddb4a8efbc4108f5537da9b3f278bde566deb777935a960beec4fa18e7b8353881f2f465e4f2c0e949fead35be + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + +"base-x@npm:^3.0.2": + version: 3.0.9 + resolution: "base-x@npm:3.0.9" + dependencies: + safe-buffer: "npm:^5.0.1" + checksum: 957101d6fd09e1903e846fd8f69fd7e5e3e50254383e61ab667c725866bec54e5ece5ba49ce385128ae48f9ec93a26567d1d5ebb91f4d56ef4a9cc0d5a5481e8 + languageName: node + linkType: hard + +"base-x@npm:^4.0.0": + version: 4.0.0 + resolution: "base-x@npm:4.0.0" + checksum: b25db9e07eb1998472a20557c7f00c797dc0595f79df95155ab74274e7fa98b9f2659b3ee547ac8773666b7f69540656793aeb97ad2b1ceccdb6fa5faaf69ac0 + languageName: node + linkType: hard + +"base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": + version: 1.5.1 + resolution: "base64-js@npm:1.5.1" + checksum: 669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005 + languageName: node + linkType: hard + +"bigint-buffer@npm:^1.1.5": + version: 1.1.5 + resolution: "bigint-buffer@npm:1.1.5" + dependencies: + bindings: "npm:^1.3.0" + node-gyp: "npm:latest" + checksum: d010c9f57758bcdaccb435d88b483ffcc95fe8bbc6e7fb3a44fb5221f29c894ffaf4a3c5a4a530e0e7d6608203c2cde9b79ee4f2386cd6d4462d1070bc8c9f4e + languageName: node + linkType: hard + +"bignumber.js@npm:^9.0.1": + version: 9.1.2 + resolution: "bignumber.js@npm:9.1.2" + checksum: 582c03af77ec9cb0ebd682a373ee6c66475db94a4325f92299621d544aa4bd45cb45fd60001610e94aef8ae98a0905fa538241d9638d4422d57abbeeac6fadaf + languageName: node + linkType: hard + +"binary-extensions@npm:^2.0.0": + version: 2.2.0 + resolution: "binary-extensions@npm:2.2.0" + checksum: ccd267956c58d2315f5d3ea6757cf09863c5fc703e50fbeb13a7dc849b812ef76e3cf9ca8f35a0c48498776a7478d7b4a0418e1e2b8cb9cb9731f2922aaad7f8 + languageName: node + linkType: hard + +"bindings@npm:^1.3.0": + version: 1.5.0 + resolution: "bindings@npm:1.5.0" + dependencies: + file-uri-to-path: "npm:1.0.0" + checksum: 65b6b48095717c2e6105a021a7da4ea435aa8d3d3cd085cb9e85bcb6e5773cf318c4745c3f7c504412855940b585bdf9b918236612a1c7a7942491de176f1ae7 + languageName: node + linkType: hard + +"bn.js@npm:^5.1.2, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": + version: 5.2.1 + resolution: "bn.js@npm:5.2.1" + checksum: 3dd8c8d38055fedfa95c1d5fc3c99f8dd547b36287b37768db0abab3c239711f88ff58d18d155dd8ad902b0b0cee973747b7ae20ea12a09473272b0201c9edd3 + languageName: node + linkType: hard + +"borsh@npm:^0.7.0": + version: 0.7.0 + resolution: "borsh@npm:0.7.0" + dependencies: + bn.js: "npm:^5.2.0" + bs58: "npm:^4.0.0" + text-encoding-utf-8: "npm:^1.0.2" + checksum: e98bfb5f7cfb820819c2870b884dac58dd4b4ce6a86c286c8fbf5c9ca582e73a8c6094df67e81a28c418ff07a309c6b118b2e27fdfea83fd92b8100c741da0b5 + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + +"braces@npm:^3.0.2, braces@npm:~3.0.2": + version: 3.0.2 + resolution: "braces@npm:3.0.2" + dependencies: + fill-range: "npm:^7.0.1" + checksum: e2a8e769a863f3d4ee887b5fe21f63193a891c68b612ddb4b68d82d1b5f3ff9073af066c343e9867a393fe4c2555dcb33e89b937195feb9c1613d259edfcd459 + languageName: node + linkType: hard + +"bs58@npm:^4.0.0, bs58@npm:^4.0.1": + version: 4.0.1 + resolution: "bs58@npm:4.0.1" + dependencies: + base-x: "npm:^3.0.2" + checksum: b3c5365bb9e0c561e1a82f1a2d809a1a692059fae016be233a6127ad2f50a6b986467c3a50669ce4c18929dcccb297c5909314dd347a25a68c21b68eb3e95ac2 + languageName: node + linkType: hard + +"bs58@npm:^5.0.0": + version: 5.0.0 + resolution: "bs58@npm:5.0.0" + dependencies: + base-x: "npm:^4.0.0" + checksum: 2475cb0684e07077521aac718e604a13e0f891d58cff923d437a2f7e9e28703ab39fce9f84c7c703ab369815a675f11e3bd394d38643bfe8969fbe42e6833d45 + languageName: node + linkType: hard + +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + +"buffer-layout@npm:^1.2.0, buffer-layout@npm:^1.2.2": + version: 1.2.2 + resolution: "buffer-layout@npm:1.2.2" + checksum: e5809ba275530bf4e52fd09558b7c2111fbda5b405124f581acf364261d9c154e271800271898cd40473f9bcbb42c31584efb04219bde549d3460ca4bafeaa07 + languageName: node + linkType: hard + +"buffer@npm:6.0.3, buffer@npm:^6.0.3, buffer@npm:~6.0.3": + version: 6.0.3 + resolution: "buffer@npm:6.0.3" + dependencies: + base64-js: "npm:^1.3.1" + ieee754: "npm:^1.2.1" + checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 + languageName: node + linkType: hard + +"bufferutil@npm:^4.0.1": + version: 4.0.7 + resolution: "bufferutil@npm:4.0.7" + dependencies: + node-gyp: "npm:latest" + node-gyp-build: "npm:^4.3.0" + checksum: f75aa87e3d1b99b87a95f60a855e63f70af07b57fb8443e75a2ddfef2e47788d130fdd46e3a78fd7e0c10176082b26dfbed970c5b8632e1cc299cafa0e93ce45 + languageName: node + linkType: hard + +"cacache@npm:^17.0.0": + version: 17.1.4 + resolution: "cacache@npm:17.1.4" + dependencies: + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^7.7.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^1.0.2" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: b7751df756656954a51201335addced8f63fc53266fa56392c9f5ae83c8d27debffb4458ac2d168a744a4517ec3f2163af05c20097f93d17bdc2dc8a385e14a6 + languageName: node + linkType: hard + +"camelcase@npm:^6.3.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + +"chalk@npm:^4.1.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: fe75c9d5c76a7a98d45495b91b2172fa3b7a09e0cc9370e5c8feb1c567b85c4288e2b3fded7cfdd7359ac28d6b3844feb8b82b8686842e93d23c827c417e83fc + languageName: node + linkType: hard + +"chokidar@npm:^3.5.1": + version: 3.5.3 + resolution: "chokidar@npm:3.5.3" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: b49fcde40176ba007ff361b198a2d35df60d9bb2a5aab228279eb810feae9294a6b4649ab15981304447afe1e6ffbf4788ad5db77235dc770ab777c6e771980c + languageName: node + linkType: hard + +"chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f + languageName: node + linkType: hard + +"clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 79e6bdb9fd479a205c71d89574fccfb22bd9053bd98c6c4d870d65c132e5e904e6034978e55b43d69fcaa7433af2016ee203ce76eeba9cfa554b373e7f7db336 + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"color-support@npm:^1.1.3": + version: 1.1.3 + resolution: "color-support@npm:1.1.3" + bin: + color-support: bin.js + checksum: 9b7356817670b9a13a26ca5af1c21615463b500783b739b7634a0c2047c16cef4b2865d7576875c31c3cddf9dd621fa19285e628f20198b233a5cfdda6d0793b + languageName: node + linkType: hard + +"combined-stream@npm:^1.0.8": + version: 1.0.8 + resolution: "combined-stream@npm:1.0.8" + dependencies: + delayed-stream: "npm:~1.0.0" + checksum: 49fa4aeb4916567e33ea81d088f6584749fc90c7abec76fd516bf1c5aa5c79f3584b5ba3de6b86d26ddd64bae5329c4c7479343250cfe71c75bb366eae53bb7c + languageName: node + linkType: hard + +"commander@npm:^2.20.3": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 902a9f5d8967a3e2faf138d5cb784b9979bad2e6db5357c5b21c568df4ebe62bcb15108af1b2253744844eb964fc023fbd9afbbbb6ddd0bcc204c6fb5b7bf3af + languageName: node + linkType: hard + +"console-control-strings@npm:^1.1.0": + version: 1.1.0 + resolution: "console-control-strings@npm:1.1.0" + checksum: 8755d76787f94e6cf79ce4666f0c5519906d7f5b02d4b884cf41e11dcd759ed69c57da0670afd9236d229a46e0f9cf519db0cd829c6dca820bb5a5c3def584ed + languageName: node + linkType: hard + +"content-disposition@npm:^0.5.3": + version: 0.5.4 + resolution: "content-disposition@npm:0.5.4" + dependencies: + safe-buffer: "npm:5.2.1" + checksum: afb9d545e296a5171d7574fcad634b2fdf698875f4006a9dd04a3e1333880c5c0c98d47b560d01216fb6505a54a2ba6a843ee3a02ec86d7e911e8315255f56c3 + languageName: node + linkType: hard + +"cookie@npm:^0.5.0": + version: 0.5.0 + resolution: "cookie@npm:0.5.0" + checksum: 1f4bd2ca5765f8c9689a7e8954183f5332139eb72b6ff783d8947032ec1fdf43109852c178e21a953a30c0dd42257828185be01b49d1eb1a67fd054ca588a180 + languageName: node + linkType: hard + +"create-require@npm:^1.1.0": + version: 1.1.1 + resolution: "create-require@npm:1.1.1" + checksum: a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff + languageName: node + linkType: hard + +"cross-fetch@npm:^3.1.5": + version: 3.1.8 + resolution: "cross-fetch@npm:3.1.8" + dependencies: + node-fetch: "npm:^2.6.12" + checksum: 78f993fa099eaaa041122ab037fe9503ecbbcb9daef234d1d2e0b9230a983f64d645d088c464e21a247b825a08dc444a6e7064adfa93536d3a9454b4745b3632 + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.0": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 671cc7c7288c3a8406f3c69a3ae2fc85555c04169e9d611def9a675635472614f1c0ed0ef80955d5b6d4e724f6ced67f0ad1bb006c2ea643488fcfef994d7f52 + languageName: node + linkType: hard + +"crypto-hash@npm:^1.3.0": + version: 1.3.0 + resolution: "crypto-hash@npm:1.3.0" + checksum: a3a507e0d2b18fbd2da8088a1c62d0c53c009a99bbfa6d851cac069734ffa546922fa51bdd776d006459701cdda873463e5059ece3431aca048fd99e7573d138 + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.1, debug@npm:^4.3.3, debug@npm:^4.3.4": + version: 4.3.4 + resolution: "debug@npm:4.3.4" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 3dbad3f94ea64f34431a9cbf0bafb61853eda57bff2880036153438f50fb5a84f27683ba0d8e5426bf41a8c6ff03879488120cf5b3a761e77953169c0600a708 + languageName: node + linkType: hard + +"delay@npm:^5.0.0": + version: 5.0.0 + resolution: "delay@npm:5.0.0" + checksum: 62f151151ecfde0d9afbb8a6be37a6d103c4cb24f35a20ef3fe56f920b0d0d0bb02bc9c0a3084d0179ef669ca332b91155f2ee4d9854622cd2cdba5fc95285f9 + languageName: node + linkType: hard + +"delayed-stream@npm:~1.0.0": + version: 1.0.0 + resolution: "delayed-stream@npm:1.0.0" + checksum: 46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020 + languageName: node + linkType: hard + +"delegates@npm:^1.0.0": + version: 1.0.0 + resolution: "delegates@npm:1.0.0" + checksum: a51744d9b53c164ba9c0492471a1a2ffa0b6727451bdc89e31627fdf4adda9d51277cfcbfb20f0a6f08ccb3c436f341df3e92631a3440226d93a8971724771fd + languageName: node + linkType: hard + +"depd@npm:2.0.0": + version: 2.0.0 + resolution: "depd@npm:2.0.0" + checksum: abbe19c768c97ee2eed6282d8ce3031126662252c58d711f646921c9623f9052e3e1906443066beec1095832f534e57c523b7333f8e7e0d93051ab6baef5ab3a + languageName: node + linkType: hard + +"diff@npm:^4.0.1": + version: 4.0.2 + resolution: "diff@npm:4.0.2" + checksum: f2c09b0ce4e6b301c221addd83bf3f454c0bc00caa3dd837cf6c127d6edf7223aa2bbe3b688feea110b7f262adbfc845b757c44c8a9f8c0c5b15d8fa9ce9d20d + languageName: node + linkType: hard + +"dot-case@npm:^3.0.4": + version: 3.0.4 + resolution: "dot-case@npm:3.0.4" + dependencies: + no-case: "npm:^3.0.4" + tslib: "npm:^2.0.3" + checksum: a65e3519414856df0228b9f645332f974f2bf5433370f544a681122eab59e66038fc3349b4be1cdc47152779dac71a5864f1ccda2f745e767c46e9c6543b1169 + languageName: node + linkType: hard + +"dotenv@npm:^16.0.3": + version: 16.3.1 + resolution: "dotenv@npm:16.3.1" + checksum: 15d75e7279018f4bafd0ee9706593dd14455ddb71b3bcba9c52574460b7ccaf67d5cf8b2c08a5af1a9da6db36c956a04a1192b101ee102a3e0cf8817bbcf3dfd + languageName: node + linkType: hard + +"dottie@npm:^2.0.4": + version: 2.0.6 + resolution: "dottie@npm:2.0.6" + checksum: 4c778df9dc631a1108a32ef390916836814999a7411d10883f4151bd49c9c6934dc329b3f50fc7692849aa75ba87dba880fd54be501a3b39a6b9c23d6f772a09 + languageName: node + linkType: hard + +"dynamic-dedupe@npm:^0.3.0": + version: 0.3.0 + resolution: "dynamic-dedupe@npm:0.3.0" + dependencies: + xtend: "npm:^4.0.0" + checksum: 5178b99ad30a59234c63b38b453183cfd0a6cb7acbe7b94b7aea9bf0f75376fdaab6e2ea7922931cfc0152390ccb20bd024d8d80b4fc8c3c3255a2fcadf2cafb + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 7d00d7cd8e49b9afa762a813faac332dee781932d6f2c848dc348939c4253f1d4564341b7af1d041853bc3f32c2ef141b58e0a4d9862c17a7f08f68df1e0f1ed + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: d4c5c39d5a9868b5fa152f00cada8a936868fd3367f33f71be515ecee4c803132d11b31a6222b2571b1e5f7e13890156a94880345594d0ce7e3c9895f560f192 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 8487182da74aabd810ac6d6f1994111dfc0e331b01271ae01ec1eb0ad7b5ecc2bbbbd2f053c05cb55a1ac30449527d819bbfbf0e3de1023db308cbcb47f86601 + languageName: node + linkType: hard + +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: "npm:^0.6.2" + checksum: bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + +"enhanced-resolve@npm:^5.0.0": + version: 5.15.0 + resolution: "enhanced-resolve@npm:5.15.0" + dependencies: + graceful-fs: "npm:^4.2.4" + tapable: "npm:^2.2.0" + checksum: fbd8cdc9263be71cc737aa8a7d6c57b43d6aa38f6cc75dde6fcd3598a130cc465f979d2f4d01bb3bf475acb43817749c79f8eef9be048683602ca91ab52e4f11 + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 8b7b1be20d2de12d2255c0bc2ca638b7af5171142693299416e6a9339bd7d88fc8d7707d913d78e0993176005405a236b066b45666b27b797252c771156ace54 + languageName: node + linkType: hard + +"es6-promise@npm:^4.0.3": + version: 4.2.8 + resolution: "es6-promise@npm:4.2.8" + checksum: 95614a88873611cb9165a85d36afa7268af5c03a378b35ca7bda9508e1d4f1f6f19a788d4bc755b3fd37c8ebba40782018e02034564ff24c9d6fa37e959ad57d + languageName: node + linkType: hard + +"es6-promisify@npm:^5.0.0": + version: 5.0.0 + resolution: "es6-promisify@npm:5.0.0" + dependencies: + es6-promise: "npm:^4.0.3" + checksum: fbed9d791598831413be84a5374eca8c24800ec71a16c1c528c43a98e2dadfb99331483d83ae6094ddb9b87e6f799a15d1553cebf756047e0865c753bc346b92 + languageName: node + linkType: hard + +"escape-html@npm:~1.0.3": + version: 1.0.3 + resolution: "escape-html@npm:1.0.3" + checksum: 6213ca9ae00d0ab8bccb6d8d4e0a98e76237b2410302cf7df70aaa6591d509a2a37ce8998008cbecae8fc8ffaadf3fb0229535e6a145f3ce0b211d060decbb24 + languageName: node + linkType: hard + +"event-target-shim@npm:^5.0.0": + version: 5.0.1 + resolution: "event-target-shim@npm:5.0.1" + checksum: 1ffe3bb22a6d51bdeb6bf6f7cf97d2ff4a74b017ad12284cc9e6a279e727dc30a5de6bb613e5596ff4dc3e517841339ad09a7eec44266eccb1aa201a30448166 + languageName: node + linkType: hard + +"eventemitter3@npm:^4.0.7": + version: 4.0.7 + resolution: "eventemitter3@npm:4.0.7" + checksum: 1875311c42fcfe9c707b2712c32664a245629b42bb0a5a84439762dd0fd637fc54d078155ea83c2af9e0323c9ac13687e03cfba79b03af9f40c89b4960099374 + languageName: node + linkType: hard + +"events@npm:^3.3.0": + version: 3.3.0 + resolution: "events@npm:3.3.0" + checksum: f6f487ad2198aa41d878fa31452f1a3c00958f46e9019286ff4787c84aac329332ab45c9cdc8c445928fc6d7ded294b9e005a7fce9426488518017831b272780 + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 3d21519a4f8207c99f7457287291316306255a328770d320b401114ec8481986e4e467e854cb9914dd965e0a1ca810a23ccb559c642c88f4c7f55c55778a9b48 + languageName: node + linkType: hard + +"eyes@npm:^0.1.8": + version: 0.1.8 + resolution: "eyes@npm:0.1.8" + checksum: c31703a92bf36ba75ee8d379ee7985c24ee6149f3a6175f44cec7a05b178c38bce9836d3ca48c9acb0329a960ac2c4b2ead4e60cdd4fe6e8c92cad7cd6913687 + languageName: node + linkType: hard + +"fast-content-type-parse@npm:^1.0.0": + version: 1.0.0 + resolution: "fast-content-type-parse@npm:1.0.0" + checksum: 9e9187be17bea18a2ee715c5737b983181cbe84f286a291db0595e421e04b578da10ca10845639be08664a4db6a793f7709822935cf38cfdf9ecba38d84ead9e + languageName: node + linkType: hard + +"fast-decode-uri-component@npm:^1.0.1": + version: 1.0.1 + resolution: "fast-decode-uri-component@npm:1.0.1" + checksum: 427a48fe0907e76f0e9a2c228e253b4d8a8ab21d130ee9e4bb8339c5ba4086235cf9576831f7b20955a752eae4b525a177ff9d5825dd8d416e7726939194fbee + languageName: node + linkType: hard + +"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + +"fast-json-stringify@npm:^5.7.0": + version: 5.8.0 + resolution: "fast-json-stringify@npm:5.8.0" + dependencies: + "@fastify/deepmerge": "npm:^1.0.0" + ajv: "npm:^8.10.0" + ajv-formats: "npm:^2.1.1" + fast-deep-equal: "npm:^3.1.3" + fast-uri: "npm:^2.1.0" + rfdc: "npm:^1.2.0" + checksum: 04232ace5a5758e6a92b9a4518234a1c05e55ef9b788c80bf741ec6a64cf7273a9ef07938ca4b82a96ea470295b4c3e84a657a9bbaacee4bd97daa16595b1a9a + languageName: node + linkType: hard + +"fast-querystring@npm:^1.0.0": + version: 1.1.2 + resolution: "fast-querystring@npm:1.1.2" + dependencies: + fast-decode-uri-component: "npm:^1.0.1" + checksum: 7149f82ee9ac39a9c08c7ffe435b9f6deade76ae5e3675fe1835720513e8c4bc541e666b4b7b1c0c07e08f369dcf4828d00f2bee39889a90a168e1439cf27b0b + languageName: node + linkType: hard + +"fast-redact@npm:^3.1.1": + version: 3.3.0 + resolution: "fast-redact@npm:3.3.0" + checksum: 3f7becc70a5a2662a9cbfdc52a4291594f62ae998806ee00315af307f32d9559dbf512146259a22739ee34401950ef47598c1f4777d33b0ed5027203d67f549c + languageName: node + linkType: hard + +"fast-stable-stringify@npm:^1.0.0": + version: 1.0.0 + resolution: "fast-stable-stringify@npm:1.0.0" + checksum: ef1203d246a7e8ac15e2bfbda0a89fa375947bccf9f7910be0ea759856dbe8ea5024a0d8cc2cceabe18a9cb67e95927b78bb6173a3ae37ec55a518cf36e5244b + languageName: node + linkType: hard + +"fast-uri@npm:^2.0.0, fast-uri@npm:^2.1.0": + version: 2.2.0 + resolution: "fast-uri@npm:2.2.0" + checksum: edac64d50628f21d562cdc19ea86f5af00902dbb09d2f96fff5974e5317157825e9aa163af9defd11a0818aac6ea2e9958597bed98dd041200a08a976809d08b + languageName: node + linkType: hard + +"fastify-plugin@npm:^4.0.0": + version: 4.5.1 + resolution: "fastify-plugin@npm:4.5.1" + checksum: ddd1b2d470c3acd9397c2617b5842dcf71a6f9a32f05d02be1c12e8d37b8fc03af656900cec38e2afef5e9a3dfe5f994317810f4c5e9960b127b1ca179b56f73 + languageName: node + linkType: hard + +"fastify@npm:^4.13.0": + version: 4.22.0 + resolution: "fastify@npm:4.22.0" + dependencies: + "@fastify/ajv-compiler": "npm:^3.5.0" + "@fastify/error": "npm:^3.2.0" + "@fastify/fast-json-stringify-compiler": "npm:^4.3.0" + abstract-logging: "npm:^2.0.1" + avvio: "npm:^8.2.1" + fast-content-type-parse: "npm:^1.0.0" + fast-json-stringify: "npm:^5.7.0" + find-my-way: "npm:^7.6.0" + light-my-request: "npm:^5.9.1" + pino: "npm:^8.12.0" + process-warning: "npm:^2.2.0" + proxy-addr: "npm:^2.0.7" + rfdc: "npm:^1.3.0" + secure-json-parse: "npm:^2.5.0" + semver: "npm:^7.5.0" + tiny-lru: "npm:^11.0.1" + checksum: 0a0bbdd0b46246486f20c2b6b00dc37e35a5ce535cd1576e3de773960d7830fc3a31eac96094ae39b06c8683e4c8fb60e418ae8d6c3cb44dee70df0759de2ec1 + languageName: node + linkType: hard + +"fastq@npm:^1.6.1": + version: 1.15.0 + resolution: "fastq@npm:1.15.0" + dependencies: + reusify: "npm:^1.0.4" + checksum: 0170e6bfcd5d57a70412440b8ef600da6de3b2a6c5966aeaf0a852d542daff506a0ee92d6de7679d1de82e644bce69d7a574a6c93f0b03964b5337eed75ada1a + languageName: node + linkType: hard + +"file-uri-to-path@npm:1.0.0": + version: 1.0.0 + resolution: "file-uri-to-path@npm:1.0.0" + checksum: b648580bdd893a008c92c7ecc96c3ee57a5e7b6c4c18a9a09b44fb5d36d79146f8e442578bc0e173dc027adf3987e254ba1dfd6e3ec998b7c282873010502144 + languageName: node + linkType: hard + +"fill-range@npm:^7.0.1": + version: 7.0.1 + resolution: "fill-range@npm:7.0.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: cc283f4e65b504259e64fd969bcf4def4eb08d85565e906b7d36516e87819db52029a76b6363d0f02d0d532f0033c9603b9e2d943d56ee3b0d4f7ad3328ff917 + languageName: node + linkType: hard + +"find-my-way@npm:^7.6.0": + version: 7.6.2 + resolution: "find-my-way@npm:7.6.2" + dependencies: + fast-deep-equal: "npm:^3.1.3" + fast-querystring: "npm:^1.0.0" + safe-regex2: "npm:^2.0.0" + checksum: 56c02350aba2cc4cff82b3e00171cf4db72756b8ca5f0e41562d21f89cf29512b9e83b6e29ab352303ca9d0dcbfcd8c93f50d52dc92f1eeecc4bc991404ef533 + languageName: node + linkType: hard + +"follow-redirects@npm:^1.15.0": + version: 1.15.2 + resolution: "follow-redirects@npm:1.15.2" + peerDependenciesMeta: + debug: + optional: true + checksum: faa66059b66358ba65c234c2f2a37fcec029dc22775f35d9ad6abac56003268baf41e55f9ee645957b32c7d9f62baf1f0b906e68267276f54ec4b4c597c2b190 + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.1.1 + resolution: "foreground-child@npm:3.1.1" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^4.0.1" + checksum: 139d270bc82dc9e6f8bc045fe2aae4001dc2472157044fdfad376d0a3457f77857fa883c1c8b21b491c6caade9a926a4bed3d3d2e8d3c9202b151a4cbbd0bcd5 + languageName: node + linkType: hard + +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" + dependencies: + asynckit: "npm:^0.4.0" + combined-stream: "npm:^1.0.8" + mime-types: "npm:^2.1.12" + checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c + languageName: node + linkType: hard + +"forwarded@npm:0.2.0": + version: 0.2.0 + resolution: "forwarded@npm:0.2.0" + checksum: fd27e2394d8887ebd16a66ffc889dc983fbbd797d5d3f01087c020283c0f019a7d05ee85669383d8e0d216b116d720fc0cef2f6e9b7eb9f4c90c6e0bc7fd28e6 + languageName: node + linkType: hard + +"fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: "npm:^3.0.0" + checksum: 1b8d128dae2ac6cc94230cc5ead341ba3e0efaef82dab46a33d171c044caaa6ca001364178d42069b2809c35a1c3c35079a32107c770e9ffab3901b59af8c8b1 + languageName: node + linkType: hard + +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: "npm:^7.0.3" + checksum: 8722a41109130851d979222d3ec88aabaceeaaf8f57b2a8f744ef8bd2d1ce95453b04a61daa0078822bc5cd21e008814f06fe6586f56fef511e71b8d2394d802 + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 99ddea01a7e75aa276c250a04eedeffe5662bce66c65c07164ad6264f9de18fb21be9433ead460e54cff20e31721c811f4fb5d70591799df5f85dce6d6746fd0 + languageName: node + linkType: hard + +"fsevents@npm:~2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 11e6ea6fea15e42461fc55b4b0e4a0a3c654faa567f1877dbd353f39156f69def97a69936d1746619d656c4b93de2238bf731f6085a03a50cabf287c9d024317 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@npm%3A~2.3.2#~builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + +"function-bind@npm:^1.1.1": + version: 1.1.1 + resolution: "function-bind@npm:1.1.1" + checksum: b32fbaebb3f8ec4969f033073b43f5c8befbb58f1a79e12f1d7490358150359ebd92f49e72ff0144f65f2c48ea2a605bff2d07965f548f6474fd8efd95bf361a + languageName: node + linkType: hard + +"gauge@npm:^4.0.3": + version: 4.0.4 + resolution: "gauge@npm:4.0.4" + dependencies: + aproba: "npm:^1.0.3 || ^2.0.0" + color-support: "npm:^1.1.3" + console-control-strings: "npm:^1.1.0" + has-unicode: "npm:^2.0.1" + signal-exit: "npm:^3.0.7" + string-width: "npm:^4.2.3" + strip-ansi: "npm:^6.0.1" + wide-align: "npm:^1.1.5" + checksum: 788b6bfe52f1dd8e263cda800c26ac0ca2ff6de0b6eee2fe0d9e3abf15e149b651bd27bf5226be10e6e3edb5c4e5d5985a5a1a98137e7a892f75eff76467ad2d + languageName: node + linkType: hard + +"git-format-staged@npm:^2.1.3": + version: 2.1.3 + resolution: "git-format-staged@npm:2.1.3" + bin: + git-format-staged: git-format-staged + checksum: 749da68f0d9bf24db53b87a5f1613fc1a8790801d7c3ccb31d02b94d99f4cf2450126ef565f16adcc0649fbbf90dc44b4f009d4f99ff8a26921ba754bdb09b31 + languageName: node + linkType: hard + +"glob-parent@npm:~5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: f4f2bfe2425296e8a47e36864e4f42be38a996db40420fe434565e4480e3322f18eb37589617a98640c5dc8fdec1a387007ee18dbb1f3f5553409c34d17f425e + languageName: node + linkType: hard + +"glob@npm:^10.2.2": + version: 10.3.3 + resolution: "glob@npm:10.3.3" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^2.0.3" + minimatch: "npm:^9.0.1" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + path-scurry: "npm:^1.10.1" + bin: + glob: dist/cjs/src/bin.js + checksum: 29190d3291f422da0cb40b77a72fc8d2c51a36524e99b8bf412548b7676a6627489528b57250429612b6eec2e6fe7826d328451d3e694a9d15e575389308ec53 + languageName: node + linkType: hard + +"glob@npm:^7.1.3, glob@npm:^7.1.4": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 29452e97b38fa704dabb1d1045350fb2467cf0277e155aa9ff7077e90ad81d1ea9d53d3ee63bd37c05b09a065e90f16aec4a65f5b8de401d1dac40bc5605d133 + languageName: node + linkType: hard + +"glob@npm:^8.0.1": + version: 8.1.0 + resolution: "glob@npm:8.1.0" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^5.0.1" + once: "npm:^1.3.0" + checksum: 92fbea3221a7d12075f26f0227abac435de868dd0736a17170663783296d0dd8d3d532a5672b4488a439bf5d7fb85cdd07c11185d6cd39184f0385cbdfb86a47 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"has-unicode@npm:^2.0.1": + version: 2.0.1 + resolution: "has-unicode@npm:2.0.1" + checksum: 1eab07a7436512db0be40a710b29b5dc21fa04880b7f63c9980b706683127e3c1b57cb80ea96d47991bdae2dfe479604f6a1ba410106ee1046a41d1bd0814400 + languageName: node + linkType: hard + +"has@npm:^1.0.3": + version: 1.0.3 + resolution: "has@npm:1.0.3" + dependencies: + function-bind: "npm:^1.1.1" + checksum: b9ad53d53be4af90ce5d1c38331e712522417d017d5ef1ebd0507e07c2fbad8686fffb8e12ddecd4c39ca9b9b47431afbb975b8abf7f3c3b82c98e9aad052792 + languageName: node + linkType: hard + +"http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 83ac0bc60b17a3a36f9953e7be55e5c8f41acc61b22583060e8dedc9dd5e3607c823a88d0926f9150e571f90946835c7fe150732801010845c72cd8bbff1a236 + languageName: node + linkType: hard + +"http-errors@npm:2.0.0": + version: 2.0.0 + resolution: "http-errors@npm:2.0.0" + dependencies: + depd: "npm:2.0.0" + inherits: "npm:2.0.4" + setprototypeof: "npm:1.2.0" + statuses: "npm:2.0.1" + toidentifier: "npm:1.0.1" + checksum: 9b0a3782665c52ce9dc658a0d1560bcb0214ba5699e4ea15aefb2a496e2ca83db03ebc42e1cce4ac1f413e4e0d2d736a3fd755772c556a9a06853ba2a0b7d920 + languageName: node + linkType: hard + +"http-proxy-agent@npm:^5.0.0": + version: 5.0.0 + resolution: "http-proxy-agent@npm:5.0.0" + dependencies: + "@tootallnate/once": "npm:2" + agent-base: "npm:6" + debug: "npm:4" + checksum: e2ee1ff1656a131953839b2a19cd1f3a52d97c25ba87bd2559af6ae87114abf60971e498021f9b73f9fd78aea8876d1fb0d4656aac8a03c6caa9fc175f22b786 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^5.0.0": + version: 5.0.1 + resolution: "https-proxy-agent@npm:5.0.1" + dependencies: + agent-base: "npm:6" + debug: "npm:4" + checksum: 571fccdf38184f05943e12d37d6ce38197becdd69e58d03f43637f7fa1269cf303a7d228aa27e5b27bbd3af8f09fd938e1c91dcfefff2df7ba77c20ed8dfc765 + languageName: node + linkType: hard + +"humanize-ms@npm:^1.2.1": + version: 1.2.1 + resolution: "humanize-ms@npm:1.2.1" + dependencies: + ms: "npm:^2.0.0" + checksum: 9c7a74a2827f9294c009266c82031030eae811ca87b0da3dceb8d6071b9bde22c9f3daef0469c3c533cc67a97d8a167cd9fc0389350e5f415f61a79b171ded16 + languageName: node + linkType: hard + +"iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 3f60d47a5c8fc3313317edfd29a00a692cc87a19cac0159e2ce711d0ebc9019064108323b5e493625e25594f11c6236647d8e256fbe7a58f4a3b33b89e6d30bf + languageName: node + linkType: hard + +"ieee754@npm:^1.2.1": + version: 1.2.1 + resolution: "ieee754@npm:1.2.1" + checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 7cae75c8cd9a50f57dadd77482359f659eaebac0319dd9368bcd1714f55e65badd6929ca58569da2b6494ef13fdd5598cd700b1eba23f8b79c5f19d195a3ecf7 + languageName: node + linkType: hard + +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 824cfb9929d031dabf059bebfe08cf3137365e112019086ed3dcff6a0a7b698cb80cf67ccccde0e25b9e2d7527aa6cc1fed1ac490c752162496caba3e6699612 + languageName: node + linkType: hard + +"inflection@npm:^1.13.4": + version: 1.13.4 + resolution: "inflection@npm:1.13.4" + checksum: 6744feede9998ad8abd2b1db4af79f494a166e656a0aa949d90c8f4a945c1d07038a3756bf7af78c8f6fce368ba213a7ebf35da3edeffd39f1da0ff465eed6eb + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: f4f76aa072ce19fae87ce1ef7d221e709afb59d445e05d47fba710e85470923a75de35bfae47da6de1b18afc3ce83d70facf44cfb0aff89f0a3f45c0a0244dfd + languageName: node + linkType: hard + +"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.3": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 + languageName: node + linkType: hard + +"ip@npm:^2.0.0": + version: 2.0.0 + resolution: "ip@npm:2.0.0" + checksum: cfcfac6b873b701996d71ec82a7dd27ba92450afdb421e356f44044ed688df04567344c36cbacea7d01b1c39a4c732dc012570ebe9bebfb06f27314bca625349 + languageName: node + linkType: hard + +"ipaddr.js@npm:1.9.1": + version: 1.9.1 + resolution: "ipaddr.js@npm:1.9.1" + checksum: f88d3825981486f5a1942414c8d77dd6674dd71c065adcfa46f578d677edcb99fda25af42675cb59db492fdf427b34a5abfcde3982da11a8fd83a500b41cfe77 + languageName: node + linkType: hard + +"is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 84192eb88cff70d320426f35ecd63c3d6d495da9d805b19bc65b518984b7c0760280e57dbf119b7e9be6b161784a5a673ab2c6abe83abb5198a432232ad5b35c + languageName: node + linkType: hard + +"is-core-module@npm:^2.13.0": + version: 2.13.0 + resolution: "is-core-module@npm:2.13.0" + dependencies: + has: "npm:^1.0.3" + checksum: 053ab101fb390bfeb2333360fd131387bed54e476b26860dc7f5a700bbf34a0ec4454f7c8c4d43e8a0030957e4b3db6e16d35e1890ea6fb654c833095e040355 + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: d381c1319fcb69d341cc6e6c7cd588e17cd94722d9a32dbd60660b993c4fb7d0f19438674e68dfec686d09b7c73139c9166b47597f846af387450224a8101ab4 + languageName: node + linkType: hard + +"is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 456ac6f8e0f3111ed34668a624e45315201dff921e5ac181f8ec24923b99e9f32ca1a194912dc79d539c97d33dba17dc635202ff0b2cf98326f608323276d27a + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 26bf6c5480dda5161c820c5b5c751ae1e766c587b1f951ea3fcfc973bafb7831ae5b54a31a69bd670220e42e99ec154475025a468eae58ea262f813fdc8d1c62 + languageName: node + linkType: hard + +"isomorphic-ws@npm:^4.0.1": + version: 4.0.1 + resolution: "isomorphic-ws@npm:4.0.1" + peerDependencies: + ws: "*" + checksum: d7190eadefdc28bdb93d67b5f0c603385aaf87724fa2974abb382ac1ec9756ed2cfb27065cbe76122879c2d452e2982bc4314317f3d6c737ddda6c047328771a + languageName: node + linkType: hard + +"jackspeak@npm:^2.0.3": + version: 2.3.1 + resolution: "jackspeak@npm:2.3.1" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 34ea4d618d8d36ac104fe1053c85dfb6a63306cfe87e157ef42f18a7aa30027887370a4e163dd4993e45c6bf8a8ae003bf8476fdb8538e8ee5cd1938c27b15d0 + languageName: node + linkType: hard + +"jayson@npm:^4.1.0": + version: 4.1.0 + resolution: "jayson@npm:4.1.0" + dependencies: + "@types/connect": "npm:^3.4.33" + "@types/node": "npm:^12.12.54" + "@types/ws": "npm:^7.4.4" + JSONStream: "npm:^1.3.5" + commander: "npm:^2.20.3" + delay: "npm:^5.0.0" + es6-promisify: "npm:^5.0.0" + eyes: "npm:^0.1.8" + isomorphic-ws: "npm:^4.0.1" + json-stringify-safe: "npm:^5.0.1" + uuid: "npm:^8.3.2" + ws: "npm:^7.4.5" + bin: + jayson: bin/jayson.js + checksum: 86464322fbdc6db65d2bb4fc278cb6c86fad5c2a506065490d39459f09ba0d30f2b4fb740b33828a1424791419b6c8bd295dc54d361a4ad959bf70cc62b1ca7e + languageName: node + linkType: hard + +"js-sha256@npm:^0.9.0": + version: 0.9.0 + resolution: "js-sha256@npm:0.9.0" + checksum: ffad54b3373f81581e245866abfda50a62c483803a28176dd5c28fd2d313e0bdf830e77dac7ff8afd193c53031618920f3d98daf21cbbe80082753ab639c0365 + languageName: node + linkType: hard + +"js-sha3@npm:^0.8.0": + version: 0.8.0 + resolution: "js-sha3@npm:0.8.0" + checksum: 75df77c1fc266973f06cce8309ce010e9e9f07ec35ab12022ed29b7f0d9c8757f5a73e1b35aa24840dced0dea7059085aa143d817aea9e188e2a80d569d9adce + languageName: node + linkType: hard + +"json-schema-traverse@npm:^1.0.0": + version: 1.0.0 + resolution: "json-schema-traverse@npm:1.0.0" + checksum: 02f2f466cdb0362558b2f1fd5e15cce82ef55d60cd7f8fa828cf35ba74330f8d767fcae5c5c2adb7851fa811766c694b9405810879bc4e1ddd78a7c0e03658ad + languageName: node + linkType: hard + +"json-stringify-safe@npm:^5.0.1": + version: 5.0.1 + resolution: "json-stringify-safe@npm:5.0.1" + checksum: 48ec0adad5280b8a96bb93f4563aa1667fd7a36334f79149abd42446d0989f2ddc58274b479f4819f1f00617957e6344c886c55d05a4e15ebb4ab931e4a6a8ee + languageName: node + linkType: hard + +"jsonparse@npm:^1.2.0": + version: 1.3.1 + resolution: "jsonparse@npm:1.3.1" + checksum: 6514a7be4674ebf407afca0eda3ba284b69b07f9958a8d3113ef1005f7ec610860c312be067e450c569aab8b89635e332cee3696789c750692bb60daba627f4d + languageName: node + linkType: hard + +"light-my-request@npm:^5.9.1": + version: 5.10.0 + resolution: "light-my-request@npm:5.10.0" + dependencies: + cookie: "npm:^0.5.0" + process-warning: "npm:^2.0.0" + set-cookie-parser: "npm:^2.4.1" + checksum: 50450afd155c8a8800435d568b118ea24b0367d36defaf0467fc49f5e7591c3f8c90b97641f67792d3f25190d53c988c6bc03dd389dfec9dcdfd1907f01ff36f + languageName: node + linkType: hard + +"lodash@npm:^4.17.21": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 + languageName: node + linkType: hard + +"lower-case@npm:^2.0.2": + version: 2.0.2 + resolution: "lower-case@npm:2.0.2" + dependencies: + tslib: "npm:^2.0.3" + checksum: 83a0a5f159ad7614bee8bf976b96275f3954335a84fad2696927f609ddae902802c4f3312d86668722e668bef41400254807e1d3a7f2e8c3eede79691aa1f010 + languageName: node + linkType: hard + +"lru-cache@npm:^6.0.0": + version: 6.0.0 + resolution: "lru-cache@npm:6.0.0" + dependencies: + yallist: "npm:^4.0.0" + checksum: f97f499f898f23e4585742138a22f22526254fdba6d75d41a1c2526b3b6cc5747ef59c5612ba7375f42aca4f8461950e925ba08c991ead0651b4918b7c978297 + languageName: node + linkType: hard + +"lru-cache@npm:^7.7.1": + version: 7.18.3 + resolution: "lru-cache@npm:7.18.3" + checksum: e550d772384709deea3f141af34b6d4fa392e2e418c1498c078de0ee63670f1f46f5eee746e8ef7e69e1c895af0d4224e62ee33e66a543a14763b0f2e74c1356 + languageName: node + linkType: hard + +"lru-cache@npm:^9.1.1 || ^10.0.0": + version: 10.0.1 + resolution: "lru-cache@npm:10.0.1" + checksum: 06f8d0e1ceabd76bb6f644a26dbb0b4c471b79c7b514c13c6856113879b3bf369eb7b497dad4ff2b7e2636db202412394865b33c332100876d838ad1372f0181 + languageName: node + linkType: hard + +"make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + languageName: node + linkType: hard + +"make-fetch-happen@npm:^11.0.3": + version: 11.1.1 + resolution: "make-fetch-happen@npm:11.1.1" + dependencies: + agentkeepalive: "npm:^4.2.1" + cacache: "npm:^17.0.0" + http-cache-semantics: "npm:^4.1.1" + http-proxy-agent: "npm:^5.0.0" + https-proxy-agent: "npm:^5.0.0" + is-lambda: "npm:^1.0.1" + lru-cache: "npm:^7.7.1" + minipass: "npm:^5.0.0" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + promise-retry: "npm:^2.0.1" + socks-proxy-agent: "npm:^7.0.0" + ssri: "npm:^10.0.0" + checksum: 7268bf274a0f6dcf0343829489a4506603ff34bd0649c12058753900b0eb29191dce5dba12680719a5d0a983d3e57810f594a12f3c18494e93a1fbc6348a4540 + languageName: node + linkType: hard + +"micromatch@npm:^4.0.0": + version: 4.0.5 + resolution: "micromatch@npm:4.0.5" + dependencies: + braces: "npm:^3.0.2" + picomatch: "npm:^2.3.1" + checksum: 02a17b671c06e8fefeeb6ef996119c1e597c942e632a21ef589154f23898c9c6a9858526246abb14f8bca6e77734aa9dcf65476fca47cedfb80d9577d52843fc + languageName: node + linkType: hard + +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f + languageName: node + linkType: hard + +"mime-types@npm:^2.1.12": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: "npm:1.52.0" + checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836 + languageName: node + linkType: hard + +"mime@npm:^3.0.0": + version: 3.0.0 + resolution: "mime@npm:3.0.0" + bin: + mime: cli.js + checksum: f43f9b7bfa64534e6b05bd6062961681aeb406a5b53673b53b683f27fcc4e739989941836a355eef831f4478923651ecc739f4a5f6e20a76487b432bfd4db928 + languageName: node + linkType: hard + +"minimatch@npm:^3.1.1": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: c154e566406683e7bcb746e000b84d74465b3a832c45d59912b9b55cd50dee66e5c4b1e5566dba26154040e51672f9aa450a9aef0c97cfc7336b78b7afb9540a + languageName: node + linkType: hard + +"minimatch@npm:^5.0.1": + version: 5.1.6 + resolution: "minimatch@npm:5.1.6" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 7564208ef81d7065a370f788d337cd80a689e981042cb9a1d0e6580b6c6a8c9279eba80010516e258835a988363f99f54a6f711a315089b8b42694f5da9d0d77 + languageName: node + linkType: hard + +"minimatch@npm:^9.0.1": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 + languageName: node + linkType: hard + +"minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 75a6d645fb122dad29c06a7597bddea977258957ed88d7a6df59b5cd3fe4a527e253e9bbf2e783e4b73657f9098b96a5fe96ab8a113655d4109108577ecf85b0 + languageName: node + linkType: hard + +"minipass-collect@npm:^1.0.2": + version: 1.0.2 + resolution: "minipass-collect@npm:1.0.2" + dependencies: + minipass: "npm:^3.0.0" + checksum: 14df761028f3e47293aee72888f2657695ec66bd7d09cae7ad558da30415fdc4752bbfee66287dcc6fd5e6a2fa3466d6c484dc1cbd986525d9393b9523d97f10 + languageName: node + linkType: hard + +"minipass-fetch@npm:^3.0.0": + version: 3.0.4 + resolution: "minipass-fetch@npm:3.0.4" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^7.0.3" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^2.1.2" + dependenciesMeta: + encoding: + optional: true + checksum: af7aad15d5c128ab1ebe52e043bdf7d62c3c6f0cecb9285b40d7b395e1375b45dcdfd40e63e93d26a0e8249c9efd5c325c65575aceee192883970ff8cb11364a + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: "npm:^3.0.0" + checksum: 56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: "npm:^3.0.0" + checksum: 79076749fcacf21b5d16dd596d32c3b6bf4d6e62abb43868fac21674078505c8b15eaca4e47ed844985a4514854f917d78f588fcd029693709417d8f98b2bd60 + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: a30d083c8054cee83cdcdc97f97e4641a3f58ae743970457b1489ce38ee1167b3aaf7d815cd39ec7a99b9c40397fd4f686e83750e73e652b21cb516f6d845e48 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 425dab288738853fded43da3314a0b5c035844d6f3097a8e3b5b29b328da8f3c1af6fc70618b32c29ff906284cf6406b6841376f21caaadd0793c1d5a6a620ea + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.3": + version: 7.0.3 + resolution: "minipass@npm:7.0.3" + checksum: 6f1614f5b5b55568a46bca5fec0e7c46dac027691db27d0e1923a8192866903144cd962ac772c0e9f89b608ea818b702709c042bce98e190d258847d85461531 + languageName: node + linkType: hard + +"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: "npm:^3.0.0" + yallist: "npm:^4.0.0" + checksum: f1fdeac0b07cf8f30fcf12f4b586795b97be856edea22b5e9072707be51fc95d41487faec3f265b42973a304fe3a64acd91a44a3826a963e37b37bafde0212c3 + languageName: node + linkType: hard + +"mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: a96865108c6c3b1b8e1d5e9f11843de1e077e57737602de1b82030815f311be11f96f09cce59bd5b903d0b29834733e5313f9301e3ed6d6f6fba2eae0df4298f + languageName: node + linkType: hard + +"mnemonist@npm:0.39.5": + version: 0.39.5 + resolution: "mnemonist@npm:0.39.5" + dependencies: + obliterator: "npm:^2.0.1" + checksum: 6669d687a434226924b2c84ee6eb7ce7d0f83dfc5caad8bcc164c73c0c11fb6d43cbe32636e710f068046f4b40a56c3032532554e93e02640aafc6ca3dd222e6 + languageName: node + linkType: hard + +"moment-timezone@npm:^0.5.43": + version: 0.5.43 + resolution: "moment-timezone@npm:0.5.43" + dependencies: + moment: "npm:^2.29.4" + checksum: 8075c897ed8a044f992ef26fe8cdbcad80caf974251db424cae157473cca03be2830de8c74d99341b76edae59f148c9d9d19c1c1d9363259085688ec1cf508d0 + languageName: node + linkType: hard + +"moment@npm:^2.29.4": + version: 2.29.4 + resolution: "moment@npm:2.29.4" + checksum: 0ec3f9c2bcba38dc2451b1daed5daded747f17610b92427bebe1d08d48d8b7bdd8d9197500b072d14e326dd0ccf3e326b9e3d07c5895d3d49e39b6803b76e80e + languageName: node + linkType: hard + +"ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + +"ms@npm:^2.0.0": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + +"multiformats@npm:^9.6.4": + version: 9.9.0 + resolution: "multiformats@npm:9.9.0" + checksum: d3e8c1be400c09a014f557ea02251a2710dbc9fca5aa32cc702ff29f636c5471e17979f30bdcb0a9cbb556f162a8591dc2e1219c24fc21394a56115b820bb84e + languageName: node + linkType: hard + +"negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: b8ffeb1e262eff7968fc90a2b6767b04cfd9842582a9d0ece0af7049537266e7b2506dfb1d107a32f06dd849ab2aea834d5830f7f4d0e5cb7d36e1ae55d021d9 + languageName: node + linkType: hard + +"no-case@npm:^3.0.4": + version: 3.0.4 + resolution: "no-case@npm:3.0.4" + dependencies: + lower-case: "npm:^2.0.2" + tslib: "npm:^2.0.3" + checksum: 0b2ebc113dfcf737d48dde49cfebf3ad2d82a8c3188e7100c6f375e30eafbef9e9124aadc3becef237b042fd5eb0aad2fd78669c20972d045bbe7fea8ba0be5c + languageName: node + linkType: hard + +"node-fetch@npm:^2.6.12": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" + dependencies: + whatwg-url: "npm:^5.0.0" + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: d76d2f5edb451a3f05b15115ec89fc6be39de37c6089f1b6368df03b91e1633fd379a7e01b7ab05089a25034b2023d959b47e59759cb38d88341b2459e89d6e5 + languageName: node + linkType: hard + +"node-gyp-build@npm:^4.3.0": + version: 4.6.1 + resolution: "node-gyp-build@npm:4.6.1" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: c3676d337b36803bc7792e35bf7fdcda7cdcb7e289b8f9855a5535702a82498eb976842fefcf487258c58005ca32ce3d537fbed91280b04409161dcd7232a882 + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 9.4.0 + resolution: "node-gyp@npm:9.4.0" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^7.1.4" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^11.0.3" + nopt: "npm:^6.0.0" + npmlog: "npm:^6.0.0" + rimraf: "npm:^3.0.2" + semver: "npm:^7.3.5" + tar: "npm:^6.1.2" + which: "npm:^2.0.2" + bin: + node-gyp: bin/node-gyp.js + checksum: 78b404e2e0639d64e145845f7f5a3cb20c0520cdaf6dda2f6e025e9b644077202ea7de1232396ba5bde3fee84cdc79604feebe6ba3ec84d464c85d407bb5da99 + languageName: node + linkType: hard + +"nopt@npm:^6.0.0": + version: 6.0.0 + resolution: "nopt@npm:6.0.0" + dependencies: + abbrev: "npm:^1.0.0" + bin: + nopt: bin/nopt.js + checksum: 82149371f8be0c4b9ec2f863cc6509a7fd0fa729929c009f3a58e4eb0c9e4cae9920e8f1f8eb46e7d032fec8fb01bede7f0f41a67eb3553b7b8e14fa53de1dac + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + +"npmlog@npm:^6.0.0": + version: 6.0.2 + resolution: "npmlog@npm:6.0.2" + dependencies: + are-we-there-yet: "npm:^3.0.0" + console-control-strings: "npm:^1.1.0" + gauge: "npm:^4.0.3" + set-blocking: "npm:^2.0.0" + checksum: ae238cd264a1c3f22091cdd9e2b106f684297d3c184f1146984ecbe18aaa86343953f26b9520dedd1b1372bc0316905b736c1932d778dbeb1fcf5a1001390e2a + languageName: node + linkType: hard + +"obliterator@npm:^2.0.1": + version: 2.0.4 + resolution: "obliterator@npm:2.0.4" + checksum: f28ad35b6d812089315f375dc3e6e5f9bebf958ebe4b10ccd471c7115cbcf595e74bdac4783ae758e5b1f47e3096427fdb37cfa7bed566b132df92ff317b9a7c + languageName: node + linkType: hard + +"on-exit-leak-free@npm:^2.1.0": + version: 2.1.0 + resolution: "on-exit-leak-free@npm:2.1.0" + checksum: 7334d98b87b0c89c9b69c747760b21196ff35afdedc4eaf1a0a3a02964463d7f6802481b120e4c8298967c74773ca7b914ab2eb3d9b279010eb7f67ac4960eed + languageName: node + linkType: hard + +"once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + +"p-limit@npm:^3.1.0": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: "npm:^0.1.0" + checksum: 7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + +"p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: cb0ab21ec0f32ddffd31dfc250e3afa61e103ef43d957cc45497afe37513634589316de4eb88abdfd969fe6410c22c0b93ab24328833b8eb1ccc087fc0442a1c + languageName: node + linkType: hard + +"pako@npm:^2.0.3": + version: 2.1.0 + resolution: "pako@npm:2.1.0" + checksum: 71666548644c9a4d056bcaba849ca6fd7242c6cf1af0646d3346f3079a1c7f4a66ffec6f7369ee0dc88f61926c10d6ab05da3e1fca44b83551839e89edd75a3e + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + +"path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + +"path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a + languageName: node + linkType: hard + +"path-scurry@npm:^1.10.1": + version: 1.10.1 + resolution: "path-scurry@npm:1.10.1" + dependencies: + lru-cache: "npm:^9.1.1 || ^10.0.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: e2557cff3a8fb8bc07afdd6ab163a92587884f9969b05bbbaf6fe7379348bfb09af9ed292af12ed32398b15fb443e81692047b786d1eeb6d898a51eb17ed7d90 + languageName: node + linkType: hard + +"pg-connection-string@npm:^2.6.0": + version: 2.6.2 + resolution: "pg-connection-string@npm:2.6.2" + checksum: 22265882c3b6f2320785378d0760b051294a684989163d5a1cde4009e64e84448d7bf67d9a7b9e7f69440c3ee9e2212f9aa10dd17ad6773f6143c6020cebbcb5 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 050c865ce81119c4822c45d3c84f1ced46f93a0126febae20737bd05ca20589c564d6e9226977df859ed5e03dc73f02584a2b0faad36e896936238238b0446cf + languageName: node + linkType: hard + +"pino-abstract-transport@npm:v1.0.0": + version: 1.0.0 + resolution: "pino-abstract-transport@npm:1.0.0" + dependencies: + readable-stream: "npm:^4.0.0" + split2: "npm:^4.0.0" + checksum: 05dd0eda52dd99fd204b39fe7b62656744b63e863bc052cdd5105d25f226a236966d0a46e39a1ace4838f6e988c608837ff946d2d0bc92835ca7baa0a3bff8d8 + languageName: node + linkType: hard + +"pino-std-serializers@npm:^6.0.0": + version: 6.2.2 + resolution: "pino-std-serializers@npm:6.2.2" + checksum: aeb0662edc46ec926de9961ed4780a4f0586bb7c37d212cd469c069639e7816887a62c5093bc93f260a4e0900322f44fc8ab1343b5a9fa2864a888acccdb22a4 + languageName: node + linkType: hard + +"pino@npm:^8.12.0": + version: 8.15.0 + resolution: "pino@npm:8.15.0" + dependencies: + atomic-sleep: "npm:^1.0.0" + fast-redact: "npm:^3.1.1" + on-exit-leak-free: "npm:^2.1.0" + pino-abstract-transport: "npm:v1.0.0" + pino-std-serializers: "npm:^6.0.0" + process-warning: "npm:^2.0.0" + quick-format-unescaped: "npm:^4.0.3" + real-require: "npm:^0.2.0" + safe-stable-stringify: "npm:^2.3.1" + sonic-boom: "npm:^3.1.0" + thread-stream: "npm:^2.0.0" + bin: + pino: bin.js + checksum: 9a54d0757f0256201fad01346be1c18b0a4378704fa383df867189da12151d664d2bd18b1e53df70633fbff6c90fd3175228c0c971eaaa734939709cc1a0005b + languageName: node + linkType: hard + +"process-warning@npm:^2.0.0, process-warning@npm:^2.2.0": + version: 2.2.0 + resolution: "process-warning@npm:2.2.0" + checksum: 394ae451c2622ee7d014a7196d36658fc1a5d5cc9f3bfeb54aadd5b77fcfecc89a30a25db259ae76ff49fde3f3f3dd7031dcdfb4da2e5445dac795549352e5d0 + languageName: node + linkType: hard + +"process@npm:^0.11.10": + version: 0.11.10 + resolution: "process@npm:0.11.10" + checksum: bfcce49814f7d172a6e6a14d5fa3ac92cc3d0c3b9feb1279774708a719e19acd673995226351a082a9ae99978254e320ccda4240ddc474ba31a76c79491ca7c3 + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: f96a3f6d90b92b568a26f71e966cbbc0f63ab85ea6ff6c81284dc869b41510e6cdef99b6b65f9030f0db422bf7c96652a3fff9f2e8fb4a0f069d8f4430359429 + languageName: node + linkType: hard + +"proxy-addr@npm:^2.0.7": + version: 2.0.7 + resolution: "proxy-addr@npm:2.0.7" + dependencies: + forwarded: "npm:0.2.0" + ipaddr.js: "npm:1.9.1" + checksum: 29c6990ce9364648255454842f06f8c46fcd124d3e6d7c5066df44662de63cdc0bad032e9bf5a3d653ff72141cc7b6019873d685708ac8210c30458ad99f2b74 + languageName: node + linkType: hard + +"proxy-from-env@npm:^1.1.0": + version: 1.1.0 + resolution: "proxy-from-env@npm:1.1.0" + checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4 + languageName: node + linkType: hard + +"punycode@npm:^2.1.0": + version: 2.3.0 + resolution: "punycode@npm:2.3.0" + checksum: 39f760e09a2a3bbfe8f5287cf733ecdad69d6af2fe6f97ca95f24b8921858b91e9ea3c9eeec6e08cede96181b3bb33f95c6ffd8c77e63986508aa2e8159fa200 + languageName: node + linkType: hard + +"quick-format-unescaped@npm:^4.0.3": + version: 4.0.4 + resolution: "quick-format-unescaped@npm:4.0.4" + checksum: 7bc32b99354a1aa46c089d2a82b63489961002bb1d654cee3e6d2d8778197b68c2d854fd23d8422436ee1fdfd0abaddc4d4da120afe700ade68bd357815b26fd + languageName: node + linkType: hard + +"readable-stream@npm:^3.6.0": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: bdcbe6c22e846b6af075e32cf8f4751c2576238c5043169a1c221c92ee2878458a816a4ea33f4c67623c0b6827c8a400409bfb3cf0bf3381392d0b1dfb52ac8d + languageName: node + linkType: hard + +"readable-stream@npm:^4.0.0": + version: 4.4.2 + resolution: "readable-stream@npm:4.4.2" + dependencies: + abort-controller: "npm:^3.0.0" + buffer: "npm:^6.0.3" + events: "npm:^3.3.0" + process: "npm:^0.11.10" + string_decoder: "npm:^1.3.0" + checksum: 6f4063763dbdb52658d22d3f49ca976420e1fbe16bbd241f744383715845350b196a2f08b8d6330f8e219153dff34b140aeefd6296da828e1041a7eab1f20d5e + languageName: node + linkType: hard + +"readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: "npm:^2.2.1" + checksum: 1ced032e6e45670b6d7352d71d21ce7edf7b9b928494dcaba6f11fba63180d9da6cd7061ebc34175ffda6ff529f481818c962952004d273178acd70f7059b320 + languageName: node + linkType: hard + +"real-require@npm:^0.2.0": + version: 0.2.0 + resolution: "real-require@npm:0.2.0" + checksum: fa060f19f2f447adf678d1376928c76379dce5f72bd334da301685ca6cdcb7b11356813332cc243c88470796bc2e2b1e2917fc10df9143dd93c2ea608694971d + languageName: node + linkType: hard + +"regenerator-runtime@npm:^0.14.0": + version: 0.14.0 + resolution: "regenerator-runtime@npm:0.14.0" + checksum: 1c977ad82a82a4412e4f639d65d22be376d3ebdd30da2c003eeafdaaacd03fc00c2320f18120007ee700900979284fc78a9f00da7fb593f6e6eeebc673fba9a3 + languageName: node + linkType: hard + +"require-from-string@npm:^2.0.2": + version: 2.0.2 + resolution: "require-from-string@npm:2.0.2" + checksum: a03ef6895445f33a4015300c426699bc66b2b044ba7b670aa238610381b56d3f07c686251740d575e22f4c87531ba662d06937508f0f3c0f1ddc04db3130560b + languageName: node + linkType: hard + +"resolve@npm:^1.0.0": + version: 1.22.4 + resolution: "resolve@npm:1.22.4" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 23f25174c2736ce24c6d918910e0d1f89b6b38fefa07a995dff864acd7863d59a7f049e691f93b4b2ee29696303390d921552b6d1b841ed4a8101f517e1d0124 + languageName: node + linkType: hard + +"resolve@patch:resolve@npm%3A^1.0.0#~builtin": + version: 1.22.4 + resolution: "resolve@patch:resolve@npm%3A1.22.4#~builtin::version=1.22.4&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: c45f2545fdc4d21883861b032789e20aa67a2f2692f68da320cc84d5724cd02f2923766c5354b3210897e88f1a7b3d6d2c7c22faeead8eed7078e4c783a444bc + languageName: node + linkType: hard + +"ret@npm:~0.2.0": + version: 0.2.2 + resolution: "ret@npm:0.2.2" + checksum: 774964bb413a3525e687bca92d81c1cd75555ec33147c32ecca22f3d06409e35df87952cfe3d57afff7650a0f7e42139cf60cb44e94c29dde390243bc1941f16 + languageName: node + linkType: hard + +"retry-as-promised@npm:^7.0.4": + version: 7.0.4 + resolution: "retry-as-promised@npm:7.0.4" + checksum: 2b0dcddb06649d42b1384ec1f933c7cb4461939c28004460b0c4be0c8ae16cabaed2411aa5d46e734a320f33f4a1d480078a19b97c743c754bd32e896b3f8ea2 + languageName: node + linkType: hard + +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 623bd7d2e5119467ba66202d733ec3c2e2e26568074923bc0585b6b99db14f357e79bdedb63cab56cec47491c4a0da7e6021a7465ca6dc4f481d3898fdd3158c + languageName: node + linkType: hard + +"reusify@npm:^1.0.4": + version: 1.0.4 + resolution: "reusify@npm:1.0.4" + checksum: c3076ebcc22a6bc252cb0b9c77561795256c22b757f40c0d8110b1300723f15ec0fc8685e8d4ea6d7666f36c79ccc793b1939c748bf36f18f542744a4e379fcc + languageName: node + linkType: hard + +"rfdc@npm:^1.2.0, rfdc@npm:^1.3.0": + version: 1.3.0 + resolution: "rfdc@npm:1.3.0" + checksum: fb2ba8512e43519983b4c61bd3fa77c0f410eff6bae68b08614437bc3f35f91362215f7b4a73cbda6f67330b5746ce07db5dd9850ad3edc91271ad6deea0df32 + languageName: node + linkType: hard + +"rimraf@npm:^2.6.1": + version: 2.7.1 + resolution: "rimraf@npm:2.7.1" + dependencies: + glob: "npm:^7.1.3" + bin: + rimraf: ./bin.js + checksum: cdc7f6eacb17927f2a075117a823e1c5951792c6498ebcce81ca8203454a811d4cf8900314154d3259bb8f0b42ab17f67396a8694a54cae3283326e57ad250cd + languageName: node + linkType: hard + +"rimraf@npm:^3.0.2": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" + dependencies: + glob: "npm:^7.1.3" + bin: + rimraf: bin.js + checksum: 87f4164e396f0171b0a3386cc1877a817f572148ee13a7e113b238e48e8a9f2f31d009a92ec38a591ff1567d9662c6b67fd8818a2dbbaed74bc26a87a2a4a9a0 + languageName: node + linkType: hard + +"rpc-websockets@npm:^7.5.1": + version: 7.6.0 + resolution: "rpc-websockets@npm:7.6.0" + dependencies: + "@babel/runtime": "npm:^7.17.2" + bufferutil: "npm:^4.0.1" + eventemitter3: "npm:^4.0.7" + utf-8-validate: "npm:^5.0.2" + uuid: "npm:^8.3.2" + ws: "npm:^8.5.0" + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: af2b254f65985610bd354e8e13de07b5a36010b94672b0b5a9d226b9bb1b8b17d01c63221cad97263845888f3610e55867a32e4c0017dfb92fddf89417c4cb6c + languageName: node + linkType: hard + +"safe-buffer@npm:5.2.1, safe-buffer@npm:^5.0.1, safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 + languageName: node + linkType: hard + +"safe-regex2@npm:^2.0.0": + version: 2.0.0 + resolution: "safe-regex2@npm:2.0.0" + dependencies: + ret: "npm:~0.2.0" + checksum: f5e182fca040dedd50ae052ea0eb035d9903b2db71243d5d8b43299735857288ef2ab52546a368d9c6fd1333b2a0d039297925e78ffc14845354f3f6158af7c2 + languageName: node + linkType: hard + +"safe-stable-stringify@npm:^2.3.1": + version: 2.4.3 + resolution: "safe-stable-stringify@npm:2.4.3" + checksum: 3aeb64449706ee1f5ad2459fc99648b131d48e7a1fbb608d7c628020177512dc9d94108a5cb61bbc953985d313d0afea6566d243237743e02870490afef04b43 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0 + languageName: node + linkType: hard + +"secure-json-parse@npm:^2.5.0": + version: 2.7.0 + resolution: "secure-json-parse@npm:2.7.0" + checksum: d9d7d5a01fc6db6115744ba23cf9e67ecfe8c524d771537c062ee05ad5c11b64c730bc58c7f33f60bd6877f96b86f0ceb9ea29644e4040cb757f6912d4dd6737 + languageName: node + linkType: hard + +"semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.5.0, semver@npm:^7.5.1": + version: 7.5.4 + resolution: "semver@npm:7.5.4" + dependencies: + lru-cache: "npm:^6.0.0" + bin: + semver: bin/semver.js + checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3 + languageName: node + linkType: hard + +"sequelize-pool@npm:^7.1.0": + version: 7.1.0 + resolution: "sequelize-pool@npm:7.1.0" + checksum: b11d06d02de9e8fc428ba3020b86f05fe7adad764e57f23c5901f924e31867901a5e7a090180337dc3b90de3934b64f34ae552fde37b0f3d37b09c0c8ecbddc7 + languageName: node + linkType: hard + +"sequelize@npm:^6.28.0": + version: 6.32.1 + resolution: "sequelize@npm:6.32.1" + dependencies: + "@types/debug": "npm:^4.1.8" + "@types/validator": "npm:^13.7.17" + debug: "npm:^4.3.4" + dottie: "npm:^2.0.4" + inflection: "npm:^1.13.4" + lodash: "npm:^4.17.21" + moment: "npm:^2.29.4" + moment-timezone: "npm:^0.5.43" + pg-connection-string: "npm:^2.6.0" + retry-as-promised: "npm:^7.0.4" + semver: "npm:^7.5.1" + sequelize-pool: "npm:^7.1.0" + toposort-class: "npm:^1.0.1" + uuid: "npm:^8.3.2" + validator: "npm:^13.9.0" + wkx: "npm:^0.5.0" + peerDependenciesMeta: + ibm_db: + optional: true + mariadb: + optional: true + mysql2: + optional: true + oracledb: + optional: true + pg: + optional: true + pg-hstore: + optional: true + snowflake-sdk: + optional: true + sqlite3: + optional: true + tedious: + optional: true + checksum: 5284fd7a8eb8dfa8340c50c119b31006dda0931714d3e5a72bbfef3a07838018f935cc1b789a46486298043f10d553dbf9cf9cf60c46c6646ecfc9e9623a8b4c + languageName: node + linkType: hard + +"set-blocking@npm:^2.0.0": + version: 2.0.0 + resolution: "set-blocking@npm:2.0.0" + checksum: 6e65a05f7cf7ebdf8b7c75b101e18c0b7e3dff4940d480efed8aad3a36a4005140b660fa1d804cb8bce911cac290441dc728084a30504d3516ac2ff7ad607b02 + languageName: node + linkType: hard + +"set-cookie-parser@npm:^2.4.1": + version: 2.6.0 + resolution: "set-cookie-parser@npm:2.6.0" + checksum: bf11ebc594c53d84588f1b4c04f1b8ce14e0498b1c011b3d76b5c6d5aac481bbc3f7c5260ec4ce99bdc1d9aed19f9fc315e73166a36ca74d0f12349a73f6bdc9 + languageName: node + linkType: hard + +"setprototypeof@npm:1.2.0": + version: 1.2.0 + resolution: "setprototypeof@npm:1.2.0" + checksum: be18cbbf70e7d8097c97f713a2e76edf84e87299b40d085c6bf8b65314e994cc15e2e317727342fa6996e38e1f52c59720b53fe621e2eb593a6847bf0356db89 + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: "npm:^3.0.0" + checksum: 6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + +"signal-exit@npm:^3.0.7": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 + languageName: node + linkType: hard + +"simple-git@npm:^3.21.0": + version: 3.21.0 + resolution: "simple-git@npm:3.21.0" + dependencies: + "@kwsites/file-exists": ^1.1.1 + "@kwsites/promise-deferred": ^1.1.1 + debug: ^4.3.4 + checksum: e992d2ac5905c19d385ebb8575db92886c93e677acfb9edb28a842d05b7a3974ef34cc26ccb8057144099a1c5875070867456787aef5bf641a99ebfb9ef656bf + languageName: node + linkType: hard + +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: b5167a7142c1da704c0e3af85c402002b597081dd9575031a90b4f229ca5678e9a36e8a374f1814c8156a725d17008ae3bde63b92f9cfd132526379e580bec8b + languageName: node + linkType: hard + +"snake-case@npm:^3.0.4": + version: 3.0.4 + resolution: "snake-case@npm:3.0.4" + dependencies: + dot-case: "npm:^3.0.4" + tslib: "npm:^2.0.3" + checksum: 0a7a79900bbb36f8aaa922cf111702a3647ac6165736d5dc96d3ef367efc50465cac70c53cd172c382b022dac72ec91710608e5393de71f76d7142e6fd80e8a3 + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "socks-proxy-agent@npm:7.0.0" + dependencies: + agent-base: "npm:^6.0.2" + debug: "npm:^4.3.3" + socks: "npm:^2.6.2" + checksum: 720554370154cbc979e2e9ce6a6ec6ced205d02757d8f5d93fe95adae454fc187a5cbfc6b022afab850a5ce9b4c7d73e0f98e381879cf45f66317a4895953846 + languageName: node + linkType: hard + +"socks@npm:^2.6.2": + version: 2.7.1 + resolution: "socks@npm:2.7.1" + dependencies: + ip: "npm:^2.0.0" + smart-buffer: "npm:^4.2.0" + checksum: 259d9e3e8e1c9809a7f5c32238c3d4d2a36b39b83851d0f573bfde5f21c4b1288417ce1af06af1452569cd1eb0841169afd4998f0e04ba04656f6b7f0e46d748 + languageName: node + linkType: hard + +"sonic-boom@npm:^3.1.0": + version: 3.3.0 + resolution: "sonic-boom@npm:3.3.0" + dependencies: + atomic-sleep: "npm:^1.0.0" + checksum: 4a290dd0f3edf49894bb72c631ee304dc3f9be0752c43d516808a365f341821f5cf49997c80ee7c0e67167e0e5131dc71afe7c58812858eb965d6b9746c0cac7 + languageName: node + linkType: hard + +"source-map-support@npm:^0.5.12": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 43e98d700d79af1d36f859bdb7318e601dfc918c7ba2e98456118ebc4c4872b327773e5a1df09b0524e9e5063bb18f0934538eace60cca2710d1fa687645d137 + languageName: node + linkType: hard + +"source-map@npm:^0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 + languageName: node + linkType: hard + +"split2@npm:^4.0.0": + version: 4.2.0 + resolution: "split2@npm:4.2.0" + checksum: 05d54102546549fe4d2455900699056580cca006c0275c334611420f854da30ac999230857a85fdd9914dc2109ae50f80fda43d2a445f2aa86eccdc1dfce779d + languageName: node + linkType: hard + +"ssri@npm:^10.0.0": + version: 10.0.5 + resolution: "ssri@npm:10.0.5" + dependencies: + minipass: "npm:^7.0.3" + checksum: 0a31b65f21872dea1ed3f7c200d7bc1c1b91c15e419deca14f282508ba917cbb342c08a6814c7f68ca4ca4116dd1a85da2bbf39227480e50125a1ceffeecb750 + languageName: node + linkType: hard + +"statuses@npm:2.0.1": + version: 2.0.1 + resolution: "statuses@npm:2.0.1" + checksum: 18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + +"string_decoder@npm:^1.1.1, string_decoder@npm:^1.3.0": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 8417646695a66e73aefc4420eb3b84cc9ffd89572861fe004e6aeb13c7bc00e2f616247505d2dbbef24247c372f70268f594af7126f43548565c68c117bdeb56 + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 859c73fcf27869c22a4e4d8c6acfe690064659e84bef9458aa6d13719d09ca88dcfd40cbf31fd0be63518ea1a643fe070b4827d353e09533a5b0b9fd4553d64d + languageName: node + linkType: hard + +"strip-bom@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-bom@npm:3.0.0" + checksum: 8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b + languageName: node + linkType: hard + +"strip-json-comments@npm:^2.0.0": + version: 2.0.1 + resolution: "strip-json-comments@npm:2.0.1" + checksum: 1074ccb63270d32ca28edfb0a281c96b94dc679077828135141f27d52a5a398ef5e78bcf22809d23cadc2b81dfbe345eb5fd8699b385c8b1128907dec4a7d1e1 + languageName: node + linkType: hard + +"superstruct@npm:^0.14.2": + version: 0.14.2 + resolution: "superstruct@npm:0.14.2" + checksum: c5c4840f432da82125b923ec45faca5113217e83ae416e314d80eae012b8bb603d2e745025d173450758d116348820bc7028157f8c9a72b6beae879f94b837c0 + languageName: node + linkType: hard + +"superstruct@npm:^0.15.4": + version: 0.15.5 + resolution: "superstruct@npm:0.15.5" + checksum: 6d1f5249fee789424b7178fa0a1ffb2ace629c5480c39505885bd8c0046a4ff8b267569a3442fa53b8c560a7ba6599cf3f8af94225aebeb2cf6023f7dd911050 + languageName: node + linkType: hard + +"supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 3dda818de06ebbe5b9653e07842d9479f3555ebc77e9a0280caf5a14fb877ffee9ed57007c3b78f5a6324b8dbeec648d9e97a24e2ed9fdb81ddc69ea07100f4a + languageName: node + linkType: hard + +"supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 53b1e247e68e05db7b3808b99b892bd36fb096e6fba213a06da7fab22045e97597db425c724f2bbd6c99a3c295e1e73f3e4de78592289f38431049e1277ca0ae + languageName: node + linkType: hard + +"tapable@npm:^2.2.0": + version: 2.2.1 + resolution: "tapable@npm:2.2.1" + checksum: 3b7a1b4d86fa940aad46d9e73d1e8739335efd4c48322cb37d073eb6f80f5281889bf0320c6d8ffcfa1a0dd5bfdbd0f9d037e252ef972aca595330538aac4d51 + languageName: node + linkType: hard + +"tar@npm:^6.1.11, tar@npm:^6.1.2": + version: 6.1.15 + resolution: "tar@npm:6.1.15" + dependencies: + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.0.0" + minipass: "npm:^5.0.0" + minizlib: "npm:^2.1.1" + mkdirp: "npm:^1.0.3" + yallist: "npm:^4.0.0" + checksum: f23832fceeba7578bf31907aac744ae21e74a66f4a17a9e94507acf460e48f6db598c7023882db33bab75b80e027c21f276d405e4a0322d58f51c7088d428268 + languageName: node + linkType: hard + +"text-encoding-utf-8@npm:^1.0.2": + version: 1.0.2 + resolution: "text-encoding-utf-8@npm:1.0.2" + checksum: ec4c15d50e738c5dba7327ad432ebf0725ec75d4d69c0bd55609254c5a3bc5341272d7003691084a0a73d60d981c8eb0e87603676fdb6f3fed60f4c9192309f9 + languageName: node + linkType: hard + +"thread-stream@npm:^2.0.0": + version: 2.4.0 + resolution: "thread-stream@npm:2.4.0" + dependencies: + real-require: "npm:^0.2.0" + checksum: 09b2daba1902ad5a8bca9adc97ae143ea7377292d4998b129ed625eb2d00be79d9fd77e1dc9480f7ae5f7b214b16dff849b7cd88090ff9fba8a3977574555a79 + languageName: node + linkType: hard + +"through@npm:>=2.2.7 <3": + version: 2.3.8 + resolution: "through@npm:2.3.8" + checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd + languageName: node + linkType: hard + +"tiny-lru@npm:^11.0.1": + version: 11.0.1 + resolution: "tiny-lru@npm:11.0.1" + checksum: 709ab58a454028eae15dd249518a1e348520e22514e52fd625ef89ba04a42599522e9f6cc89f50f76d3809cc46cac352bd0b63f052d23562e7adafe3e728531a + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: f76fa01b3d5be85db6a2a143e24df9f60dd047d151062d0ba3df62953f2f697b16fe5dad9b0ac6191c7efc7b1d9dcaa4b768174b7b29da89d4428e64bc0a20ed + languageName: node + linkType: hard + +"toidentifier@npm:1.0.1": + version: 1.0.1 + resolution: "toidentifier@npm:1.0.1" + checksum: 952c29e2a85d7123239b5cfdd889a0dde47ab0497f0913d70588f19c53f7e0b5327c95f4651e413c74b785147f9637b17410ac8c846d5d4a20a5a33eb6dc3a45 + languageName: node + linkType: hard + +"toml@npm:^3.0.0": + version: 3.0.0 + resolution: "toml@npm:3.0.0" + checksum: 5d7f1d8413ad7780e9bdecce8ea4c3f5130dd53b0a4f2e90b93340979a137739879d7b9ce2ce05c938b8cc828897fe9e95085197342a1377dd8850bf5125f15f + languageName: node + linkType: hard + +"toposort-class@npm:^1.0.1": + version: 1.0.1 + resolution: "toposort-class@npm:1.0.1" + checksum: c5e3229d4899b23350b09ed26cfb7a28aadd0889550625f1bcadc0da266cdf2790fb0ccc3e92be93ba6ad64f57bc2fd1ab94446cb4ae83054dab263753157f5f + languageName: node + linkType: hard + +"tr46@npm:~0.0.3": + version: 0.0.3 + resolution: "tr46@npm:0.0.3" + checksum: 726321c5eaf41b5002e17ffbd1fb7245999a073e8979085dacd47c4b4e8068ff5777142fc6726d6ca1fd2ff16921b48788b87225cbc57c72636f6efa8efbffe3 + languageName: node + linkType: hard + +"tree-kill@npm:^1.2.2": + version: 1.2.2 + resolution: "tree-kill@npm:1.2.2" + bin: + tree-kill: cli.js + checksum: 49117f5f410d19c84b0464d29afb9642c863bc5ba40fcb9a245d474c6d5cc64d1b177a6e6713129eb346b40aebb9d4631d967517f9fbe8251c35b21b13cd96c7 + languageName: node + linkType: hard + +"ts-loader@npm:^9.2.3": + version: 9.4.4 + resolution: "ts-loader@npm:9.4.4" + dependencies: + chalk: "npm:^4.1.0" + enhanced-resolve: "npm:^5.0.0" + micromatch: "npm:^4.0.0" + semver: "npm:^7.3.4" + peerDependencies: + typescript: "*" + webpack: ^5.0.0 + checksum: 8e5e6b839b0edfa40d2156c880d88ccab58226894ea5978221bc48c7db3215e2e856bfd0093f148e925a2befc42d6c94cafa9a994a7da274541efaa916012b63 + languageName: node + linkType: hard + +"ts-node-dev@npm:^2.0.0": + version: 2.0.0 + resolution: "ts-node-dev@npm:2.0.0" + dependencies: + chokidar: "npm:^3.5.1" + dynamic-dedupe: "npm:^0.3.0" + minimist: "npm:^1.2.6" + mkdirp: "npm:^1.0.4" + resolve: "npm:^1.0.0" + rimraf: "npm:^2.6.1" + source-map-support: "npm:^0.5.12" + tree-kill: "npm:^1.2.2" + ts-node: "npm:^10.4.0" + tsconfig: "npm:^7.0.0" + peerDependencies: + node-notifier: "*" + typescript: "*" + peerDependenciesMeta: + node-notifier: + optional: true + bin: + ts-node-dev: lib/bin.js + tsnd: lib/bin.js + checksum: d654b401de3d13c167981481be2a375229f6bfd2aeedf43bc0b6816e57676fcbfba3afdcf209c7a06fb6bd8768ca548c2eb0a0c9d38fa42246be3f50df1b28fb + languageName: node + linkType: hard + +"ts-node@npm:^10.4.0, ts-node@npm:^10.9.1": + version: 10.9.1 + resolution: "ts-node@npm:10.9.1" + dependencies: + "@cspotcode/source-map-support": "npm:^0.8.0" + "@tsconfig/node10": "npm:^1.0.7" + "@tsconfig/node12": "npm:^1.0.7" + "@tsconfig/node14": "npm:^1.0.0" + "@tsconfig/node16": "npm:^1.0.2" + acorn: "npm:^8.4.1" + acorn-walk: "npm:^8.1.1" + arg: "npm:^4.1.0" + create-require: "npm:^1.1.0" + diff: "npm:^4.0.1" + make-error: "npm:^1.1.1" + v8-compile-cache-lib: "npm:^3.0.1" + yn: "npm:3.1.1" + peerDependencies: + "@swc/core": ">=1.2.50" + "@swc/wasm": ">=1.2.50" + "@types/node": "*" + typescript: ">=2.7" + peerDependenciesMeta: + "@swc/core": + optional: true + "@swc/wasm": + optional: true + bin: + ts-node: dist/bin.js + ts-node-cwd: dist/bin-cwd.js + ts-node-esm: dist/bin-esm.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 090adff1302ab20bd3486e6b4799e90f97726ed39e02b39e566f8ab674fd5bd5f727f43615debbfc580d33c6d9d1c6b1b3ce7d8e3cca3e20530a145ffa232c35 + languageName: node + linkType: hard + +"tsconfig@npm:^7.0.0": + version: 7.0.0 + resolution: "tsconfig@npm:7.0.0" + dependencies: + "@types/strip-bom": "npm:^3.0.0" + "@types/strip-json-comments": "npm:0.0.30" + strip-bom: "npm:^3.0.0" + strip-json-comments: "npm:^2.0.0" + checksum: 8bce05e93c673defd56d93d83d4055e49651d3947c076339c4bc15d47b7eb5029bed194087e568764213a2e4bf45c477ba9f4da16adfd92cd901af7c09e4517e + languageName: node + linkType: hard + +"tslib@npm:^2.0.3": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad + languageName: node + linkType: hard + +"typescript-collections@npm:^1.3.3": + version: 1.3.3 + resolution: "typescript-collections@npm:1.3.3" + checksum: a27f07dffdfe8407c4302eedb3e578b1360de783626cbd53519bd9c7943293a2940ed1ec3004cafae9dce049768b143185a36ca812d0d5c3c0f621a289239633 + languageName: node + linkType: hard + +"typescript@npm:^5.2.2": + version: 5.2.2 + resolution: "typescript@npm:5.2.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 7912821dac4d962d315c36800fe387cdc0a6298dba7ec171b350b4a6e988b51d7b8f051317786db1094bd7431d526b648aba7da8236607febb26cf5b871d2d3c + languageName: node + linkType: hard + +"typescript@patch:typescript@^5.2.2#~builtin": + version: 5.2.2 + resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=f3b441" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 0f4da2f15e6f1245e49db15801dbee52f2bbfb267e1c39225afdab5afee1a72839cd86000e65ee9d7e4dfaff12239d28beaf5ee431357fcced15fb08583d72ca + languageName: node + linkType: hard + +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: "npm:^4.0.0" + checksum: 8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 0884b58365af59f89739e6f71e3feacb5b1b41f2df2d842d0757933620e6de08eff347d27e9d499b43c40476cbaf7988638d3acb2ffbcb9d35fd035591adfd15 + languageName: node + linkType: hard + +"uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" + dependencies: + punycode: "npm:^2.1.0" + checksum: 7167432de6817fe8e9e0c9684f1d2de2bb688c94388f7569f7dbdb1587c9f4ca2a77962f134ec90be0cc4d004c939ff0d05acc9f34a0db39a3c797dada262633 + languageName: node + linkType: hard + +"utf-8-validate@npm:^5.0.2": + version: 5.0.10 + resolution: "utf-8-validate@npm:5.0.10" + dependencies: + node-gyp: "npm:latest" + node-gyp-build: "npm:^4.3.0" + checksum: 5579350a023c66a2326752b6c8804cc7b39dcd251bb088241da38db994b8d78352e388dcc24ad398ab98385ba3c5ffcadb6b5b14b2637e43f767869055e46ba6 + languageName: node + linkType: hard + +"util-deprecate@npm:^1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 + languageName: node + linkType: hard + +"uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 5575a8a75c13120e2f10e6ddc801b2c7ed7d8f3c8ac22c7ed0c7b2ba6383ec0abda88c905085d630e251719e0777045ae3236f04c812184b7c765f63a70e58df + languageName: node + linkType: hard + +"v8-compile-cache-lib@npm:^3.0.1": + version: 3.0.1 + resolution: "v8-compile-cache-lib@npm:3.0.1" + checksum: 78089ad549e21bcdbfca10c08850022b22024cdcc2da9b168bcf5a73a6ed7bf01a9cebb9eac28e03cd23a684d81e0502797e88f3ccd27a32aeab1cfc44c39da0 + languageName: node + linkType: hard + +"validator@npm:^13.9.0": + version: 13.11.0 + resolution: "validator@npm:13.11.0" + checksum: d1e0c27022681420756da25bc03eb08d5f0c66fb008f8ff02ebc95812b77c6be6e03d3bd05cf80ca702e23eeb73dadd66b4b3683173ea2a0bc7cc72820bee131 + languageName: node + linkType: hard + +"webidl-conversions@npm:^3.0.0": + version: 3.0.1 + resolution: "webidl-conversions@npm:3.0.1" + checksum: c92a0a6ab95314bde9c32e1d0a6dfac83b578f8fa5f21e675bc2706ed6981bc26b7eb7e6a1fab158e5ce4adf9caa4a0aee49a52505d4d13c7be545f15021b17c + languageName: node + linkType: hard + +"whatwg-url@npm:^5.0.0": + version: 5.0.0 + resolution: "whatwg-url@npm:5.0.0" + dependencies: + tr46: "npm:~0.0.3" + webidl-conversions: "npm:^3.0.0" + checksum: b8daed4ad3356cc4899048a15b2c143a9aed0dfae1f611ebd55073310c7b910f522ad75d727346ad64203d7e6c79ef25eafd465f4d12775ca44b90fa82ed9e2c + languageName: node + linkType: hard + +"which@npm:^2.0.1, which@npm:^2.0.2": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 1a5c563d3c1b52d5f893c8b61afe11abc3bab4afac492e8da5bde69d550de701cf9806235f20a47b5c8fa8a1d6a9135841de2596535e998027a54589000e66d1 + languageName: node + linkType: hard + +"wide-align@npm:^1.1.5": + version: 1.1.5 + resolution: "wide-align@npm:1.1.5" + dependencies: + string-width: "npm:^1.0.2 || 2 || 3 || 4" + checksum: d5fc37cd561f9daee3c80e03b92ed3e84d80dde3365a8767263d03dacfc8fa06b065ffe1df00d8c2a09f731482fcacae745abfbb478d4af36d0a891fad4834d3 + languageName: node + linkType: hard + +"wkx@npm:^0.5.0": + version: 0.5.0 + resolution: "wkx@npm:0.5.0" + dependencies: + "@types/node": "npm:*" + checksum: 47b27387de81fbd077528c1c11be996bf5a6dbeb94858ea0e2fa6619c2af626aa2f127f6fee1b4b57057a7cbef8a810b39a67815f2eb54ed33b1790e29db86ee + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: "npm:^6.1.0" + string-width: "npm:^5.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 371733296dc2d616900ce15a0049dca0ef67597d6394c57347ba334393599e800bab03c41d4d45221b6bc967b8c453ec3ae4749eff3894202d16800fdfe0e238 + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + +"ws@npm:^7.4.5": + version: 7.5.9 + resolution: "ws@npm:7.5.9" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 + languageName: node + linkType: hard + +"ws@npm:^8.5.0": + version: 8.13.0 + resolution: "ws@npm:8.13.0" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 53e991bbf928faf5dc6efac9b8eb9ab6497c69feeb94f963d648b7a3530a720b19ec2e0ec037344257e05a4f35bd9ad04d9de6f289615ffb133282031b18c61c + languageName: node + linkType: hard + +"xtend@npm:^4.0.0": + version: 4.0.2 + resolution: "xtend@npm:4.0.2" + checksum: ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 343617202af32df2a15a3be36a5a8c0c8545208f3d3dfbc6bb7c3e3b7e8c6f8e7485432e4f3b88da3031a6e20afa7c711eded32ddfb122896ac5d914e75848d5 + languageName: node + linkType: hard + +"yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: 2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 + languageName: node + linkType: hard + +"yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index 86881a823..499488b3f 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -20,13 +20,18 @@ import { useDelegatedPositions } from "../hooks/useDelegatedPositions"; import { useDelegations } from "../hooks/useDelegations"; import { usePositions } from "../hooks/usePositions"; import { useRegistrar } from "../hooks/useRegistrar"; +import { init as initNftDelegation } from "@helium/nft-delegation-sdk"; import { DelegationV0, PositionWithMeta } from "../sdk/types"; import { calcPositionVotingPower } from "../utils/calcPositionVotingPower"; import { GetPositionsArgs as GetPosArgs, getPositionKeys, - getRegistrarKey, } from "../utils/getPositionKeys"; +import { + VoteService, + getRegistrarKey, + init, +} from "@helium/voter-stake-registry-sdk"; type Registrar = IdlAccounts["registrar"]; @@ -40,6 +45,7 @@ export interface HeliumVsrState { votingPower?: BN; registrar?: Registrar & { pubkey?: PublicKey }; refetch: () => void; + voteService?: VoteService; } const defaultState: HeliumVsrState = { @@ -49,6 +55,7 @@ const defaultState: HeliumVsrState = { positions: [], provider: undefined, votingPower: new BN(0), + voteService: undefined, refetch: () => {}, }; @@ -70,7 +77,8 @@ export const HeliumVsrStateProvider: React.FC<{ wallet: Wallet | undefined; mint: PublicKey | undefined; children: React.ReactNode; -}> = ({ wallet, mint, connection, children }) => { + heliumVoteUri?: string; +}> = ({ heliumVoteUri, wallet, mint, connection, children }) => { const provider = useMemo(() => { if (connection && wallet) { return new AnchorProvider(connection, wallet, { @@ -85,22 +93,43 @@ export const HeliumVsrStateProvider: React.FC<{ /// Allow refetching all NFTs by incrementing call index const [callIndex, setCallIndex] = useState(0); const refetch = useCallback(() => setCallIndex((i) => i + 1), [setCallIndex]); + const registrarKey = useMemo( + () => mint && getRegistrarKey(mint), + [mint?.toBase58()] + ); + // Allow vote service either from native rpc or from api + const { result: voteService } = useAsync(async () => { + if (registrarKey) { + if (heliumVoteUri) { + return new VoteService({ + baseURL: heliumVoteUri, + registrar: registrarKey, + }); + } else { + const program = await init(provider as any); + const nftDelegationProgram = await initNftDelegation(provider as any); + new VoteService({ + registrar: registrarKey, + program, + nftDelegationProgram, + }); + } + } + }, [provider, registrarKey]); const args = useMemo( () => wallet && mint && connection && + voteService && ({ wallet: provider?.publicKey, mint, provider, callIndex, + voteService, } as GetPosArgs), - [mint, provider, callIndex] - ); - const registrarKey = useMemo( - () => mint && getRegistrarKey(mint), - [mint?.toBase58()] + [mint, provider, callIndex, voteService] ); const { info: registrar } = useRegistrar(registrarKey); const { result, loading, error } = useAsync( @@ -261,6 +290,7 @@ export const HeliumVsrStateProvider: React.FC<{ pubkey: registrarKey, } : undefined, + voteService, }), [ loadingPositions, @@ -275,6 +305,7 @@ export const HeliumVsrStateProvider: React.FC<{ refetch, votingPower, registrar, + voteService, ] ); return ( diff --git a/packages/voter-stake-registry-hooks/src/hooks/useCreatePosition.ts b/packages/voter-stake-registry-hooks/src/hooks/useCreatePosition.ts index 0198a1c06..e05f1eaea 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useCreatePosition.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useCreatePosition.ts @@ -1,6 +1,6 @@ import { BN } from "@coral-xyz/anchor"; import { sendInstructions } from "@helium/spl-utils"; -import { positionKey } from "@helium/voter-stake-registry-sdk"; +import { getRegistrarKey, positionKey } from "@helium/voter-stake-registry-sdk"; import { MintLayout, TOKEN_PROGRAM_ID, @@ -15,7 +15,6 @@ import { import { useAsync, useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { HeliumVsrClient } from "../sdk/client"; -import { getRegistrarKey } from "../utils/getPositionKeys"; export const useCreatePosition = () => { const { provider } = useHeliumVsrState(); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts index ca6462644..014e251c1 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts @@ -1,19 +1,15 @@ import { useProposal } from "@helium/modular-governance-hooks"; import { batchParallelInstructions, - bulkSendTransactions, - chunks, - truthy, + truthy } from "@helium/spl-utils"; import { init, voteMarkerKey } from "@helium/voter-stake-registry-sdk"; import { PublicKey } from "@metaplex-foundation/js"; -import { Transaction } from "@solana/web3.js"; import BN from "bn.js"; import { useCallback, useMemo } from "react"; import { useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { useVoteMarkers } from "./useVoteMarkers"; -import { getRegistrarKey } from "../utils/getPositionKeys"; export const useVote = (proposalKey: PublicKey) => { const { info: proposal } = useProposal(proposalKey); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts index 78fa1c00a..f780bae0f 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts @@ -1,13 +1,17 @@ import { Program } from "@coral-xyz/anchor"; import { PROGRAM_ID, init } from "@helium/nft-delegation-sdk"; -import { batchLinearInstructions, sendInstructions, truthy } from "@helium/spl-utils"; +import { + batchLinearInstructions, + sendInstructions, + truthy, +} from "@helium/spl-utils"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { PositionWithMeta } from "../sdk/types"; export const useVotingUndelegatePositions = () => { - const { provider, registrar } = useHeliumVsrState(); + const { provider, registrar, voteService } = useHeliumVsrState(); const { error, loading, execute } = useAsyncCallback( async ({ positions, @@ -23,33 +27,25 @@ export const useVotingUndelegatePositions = () => { if (loading) return; - if (isInvalid || !nftDelegationProgram || !registrar) { + if (isInvalid || !nftDelegationProgram || !registrar || !voteService) { throw new Error("Unable to voting delegate, Invalid params"); } else { const instructions: TransactionInstruction[] = []; for (const position of positions) { - const toUndelegate = ( - await nftDelegationProgram.account.delegationV0.all([ - { - memcmp: { - offset: 8 + 32, - bytes: registrar.delegationConfig.toBase58(), - }, - }, - { - memcmp: { - offset: 8 + 32 + 32, - bytes: position.mint.toBase58(), - }, - }, - ]) - ).sort((a, b) => b.account.index - a.account.index); - let currentDelegation = toUndelegate.find((d) => - d.account.owner.equals(provider.wallet.publicKey) - )?.publicKey; + const toUndelegate = await voteService.getPositionDelegations( + position.pubkey + ); + + let currentDelegationStr = toUndelegate.find( + (d) => d.owner === provider.wallet.publicKey.toBase58() + )?.address; + let currentDelegation = + currentDelegationStr && new PublicKey(currentDelegationStr); if (!currentDelegation) { // If no delegation found with me as the owner, must be the primary delegation - currentDelegation = toUndelegate[toUndelegate.length - 1].publicKey + currentDelegation = new PublicKey( + toUndelegate[toUndelegate.length - 1].address + ); } instructions.push( @@ -61,14 +57,16 @@ export const useVotingUndelegatePositions = () => { return Promise.resolve(undefined); } - const prevDelegation = toUndelegate[index + 1].publicKey; + const prevDelegation = new PublicKey( + toUndelegate[index + 1].address + ); return nftDelegationProgram.methods .undelegateV0() .accounts({ asset: position.mint, prevDelegation, currentDelegation, - delegation: delegation.publicKey, + delegation: new PublicKey(delegation.address), }) .instruction(); }) @@ -76,7 +74,7 @@ export const useVotingUndelegatePositions = () => { ).filter(truthy) ); } - await batchLinearInstructions(provider, instructions) + await batchLinearInstructions(provider, instructions); } } ); diff --git a/packages/voter-stake-registry-hooks/src/index.ts b/packages/voter-stake-registry-hooks/src/index.ts index c83f6574c..a686bfd10 100644 --- a/packages/voter-stake-registry-hooks/src/index.ts +++ b/packages/voter-stake-registry-hooks/src/index.ts @@ -21,7 +21,6 @@ export { useRegistrar } from "./hooks/useRegistrar"; export { calcLockupMultiplier } from "./utils/calcLockupMultiplier"; export { calcPositionVotingPower } from "./utils/calcPositionVotingPower"; export * from "./sdk/types"; -export { getRegistrarKey, getPositionKeys } from "./utils/getPositionKeys"; export { useVoteMarkers } from "./hooks/useVoteMarkers"; export { useVote } from "./hooks/useVote"; export { useRelinquishVote } from "./hooks/useRelinquishVote"; diff --git a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts index 748aa6e16..e8bfbe54e 100644 --- a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts +++ b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts @@ -1,40 +1,23 @@ import { AnchorProvider } from "@coral-xyz/anchor"; -import { HNT_MINT, IOT_MINT, MOBILE_MINT } from "@helium/spl-utils"; +import { init } from "@helium/nft-delegation-sdk"; import { + VoteService, + getRegistrarKey, init as initVsr, positionKey, - registrarKey, } from "@helium/voter-stake-registry-sdk"; -import { init } from "@helium/nft-delegation-sdk"; import { Metadata, Metaplex, Nft, Sft } from "@metaplex-foundation/js"; -import { getMint, Mint } from "@solana/spl-token"; +import { Mint, getMint } from "@solana/spl-token"; import { PublicKey } from "@solana/web3.js"; -import { DelegationV0, Registrar } from "../sdk/types"; +import { Registrar } from "../sdk/types"; export interface GetPositionsArgs { wallet: PublicKey; mint: PublicKey; provider: AnchorProvider; + voteService: VoteService; } -export function getRegistrarKey(mint: PublicKey) { - return registrarKey( - PublicKey.findProgramAddressSync( - [ - Buffer.from("governance", "utf-8"), - Buffer.from(realmNames[mint.toBase58()], "utf-8"), - ], - new PublicKey("hgovkRU6Ghe1Qoyb54HdSLdqN7VtxaifBzRmh9jtd3S") - )[0], - mint - )[0]; -} - -const realmNames: Record = { - [HNT_MINT.toBase58()]: "Helium", - [MOBILE_MINT.toBase58()]: "Helium MOBILE", - [IOT_MINT.toBase58()]: "Helium IOT", -}; export const getPositionKeys = async ( args: GetPositionsArgs ): Promise<{ @@ -43,7 +26,7 @@ export const getPositionKeys = async ( nfts: (Metadata | Nft | Sft)[]; delegationKeys: PublicKey[]; }> => { - const { mint, wallet, provider } = args; + const { mint, wallet, provider, voteService } = args; const connection = provider.connection; const me = wallet; @@ -55,22 +38,9 @@ export const getPositionKeys = async ( const registrar = (await program.account.registrar.fetch( registrarPk )) as Registrar; - const myDelegations = await delegationProgram.account.delegationV0.all([ - { - memcmp: { - offset: 8, - bytes: me.toBase58(), - }, - }, - { - memcmp: { - offset: 8 + 32, - bytes: registrar.delegationConfig.toBase58() - } - } - ]); + const myDelegations = await voteService.getMyDelegations(me); const delegationPositions = myDelegations.map( - (del) => positionKey(del.account.asset)[0] + (del) => positionKey(new PublicKey(del.asset))[0] ); const mintCfgs = registrar.votingMints; const mints: Record = {}; @@ -90,7 +60,7 @@ export const getPositionKeys = async ( return { positionKeys, votingDelegatedPositionKeys: delegationPositions, - delegationKeys: myDelegations.map((d) => d.publicKey), + delegationKeys: myDelegations.map((d) => new PublicKey(d.address)), nfts, }; }; diff --git a/packages/voter-stake-registry-sdk/src/index.ts b/packages/voter-stake-registry-sdk/src/index.ts index f34aeb0a6..b08669b1c 100644 --- a/packages/voter-stake-registry-sdk/src/index.ts +++ b/packages/voter-stake-registry-sdk/src/index.ts @@ -1,11 +1,32 @@ import { VoterStakeRegistry } from "@helium/idls/lib/types/voter_stake_registry"; import { AnchorProvider, Idl, Program } from "@coral-xyz/anchor"; import { PublicKey } from "@solana/web3.js"; -import { vsrResolvers } from "./resolvers"; +import { registrarKey, vsrResolvers } from "./resolvers"; import { PROGRAM_ID } from "./constants"; +import { HNT_MINT, IOT_MINT, MOBILE_MINT } from "@helium/spl-utils"; export * from "./constants"; export * from "./pdas"; export * from "./resolvers"; +export { VoteService } from "./voteService" + +export function getRegistrarKey(mint: PublicKey) { + return registrarKey( + PublicKey.findProgramAddressSync( + [ + Buffer.from("governance", "utf-8"), + Buffer.from(realmNames[mint.toBase58()], "utf-8"), + ], + new PublicKey("hgovkRU6Ghe1Qoyb54HdSLdqN7VtxaifBzRmh9jtd3S") + )[0], + mint + )[0]; +} + +const realmNames: Record = { + [HNT_MINT.toBase58()]: "Helium", + [MOBILE_MINT.toBase58()]: "Helium MOBILE", + [IOT_MINT.toBase58()]: "Helium IOT", +}; export const init = async ( provider: AnchorProvider, diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts new file mode 100644 index 000000000..8efdf90c5 --- /dev/null +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -0,0 +1,159 @@ +import { IdlAccounts, Program } from "@coral-xyz/anchor"; +import { VoterStakeRegistry } from "@helium/idls/lib/types/voter_stake_registry"; +import { NftDelegation } from "@helium/modular-governance-idls/lib/types/nft_delegation"; +import axios, { AxiosInstance } from "axios"; +import { PublicKey } from "@solana/web3.js"; + +export type Delegation = { + owner: string; + nextOwner: string; + index: number; + address: string; + asset: string; +}; + +export class VoteService { + private client: AxiosInstance | undefined; + private program: Program | undefined; + private nftDelegationProgram: Program | undefined; + private registrar: PublicKey; + + // Wrapper arÍound vsr bulk operations that either uses + // an API or gPA calls + constructor({ + baseURL, + program, + registrar, + nftDelegationProgram, + }: { + registrar: PublicKey; + baseURL?: string; + program?: Program; + nftDelegationProgram?: Program; + }) { + if (baseURL) { + this.client = axios.create({ baseURL: baseURL }); + } + this.program = program; + this.nftDelegationProgram = nftDelegationProgram; + this.registrar = registrar; + } + + async getMyDelegations(wallet: PublicKey): Promise { + if (this.client) { + return ( + await this.client.get(`/delegations`, { + params: { limit: 10000, owner: wallet.toBase58() }, + }) + ).data; + } + + if (this.nftDelegationProgram && this.program) { + const registrar = await this.program.account.registrar.fetch( + this.registrar + ); + return ( + await this.nftDelegationProgram.account.delegationV0.all([ + { + memcmp: { + offset: 8, + bytes: wallet.toBase58(), + }, + }, + { + memcmp: { + offset: 8 + 32, + bytes: registrar.delegationConfig.toBase58(), + }, + }, + ]) + ) + .sort((a, b) => b.account.index - a.account.index) + .map((a) => ({ + owner: a.account.owner.toBase58(), + nextOwner: a.account.nextOwner.toBase58(), + index: a.account.index, + address: a.publicKey.toBase58(), + asset: a.account.asset.toBase58(), + })); + } else { + throw new Error("No nft delegation program or api url"); + } + } + + async getPositionDelegations(position: PublicKey): Promise { + if (this.client) { + return ( + await this.client.get(`/delegations`, { + params: { limit: 10000, position }, + }) + ).data; + } + + if (this.nftDelegationProgram && this.program) { + const registrar = await this.program.account.registrar.fetch( + this.registrar + ); + const positionAcc = await this.program.account.positionV0.fetch(position); + return ( + await this.nftDelegationProgram.account.delegationV0.all([ + { + memcmp: { + offset: 8 + 32, + bytes: registrar.delegationConfig.toBase58(), + }, + }, + { + memcmp: { + offset: 8 + 32 + 32, + bytes: positionAcc.mint.toBase58(), + }, + }, + ]) + ) + .sort((a, b) => b.account.index - a.account.index) + .map((a) => ({ + owner: a.account.owner.toBase58(), + nextOwner: a.account.nextOwner.toBase58(), + index: a.account.index, + address: a.publicKey.toBase58(), + asset: a.account.asset.toBase58(), + })); + } else { + throw new Error("No nft delegation program or api url"); + } + } + + async getProxies({ + page, + limit, + }: { + page: number; + limit: number; + }): Promise { + if (!this.client) { + throw new Error("This operation is not supported without an API"); + } + const response = await this.client.get( + `/registrar/${this.registrar.toBase58()}/proxies`, + { + params: { page, limit }, + } + ); + return response.data; + } + + async searchProxies({ query }: { query: string }): Promise { + if (!this.client) { + throw new Error("This operation is not supported without an API"); + } + + const response = await this.client.get( + `/registrar/${this.registrar.toBase58()}/proxies/search`, + { + params: { query }, + } + ); + return response.data; + } +} diff --git a/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs b/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs index a59e643ad..2888d1a67 100644 --- a/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs +++ b/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs @@ -12,17 +12,12 @@ pub struct RelinquishVoteArgsV1 { #[derive(Accounts)] pub struct RelinquishVoteV1<'info> { - /// CHECK: You're getting sol why do you care? - /// Account to receive sol refund if marker is closed - #[account(mut)] - pub rent_refund: AccountInfo<'info>, #[account( mut, seeds = [b"marker", mint.key().as_ref(), proposal.key().as_ref()], bump = marker.bump_seed, has_one = registrar, has_one = mint, - has_one = rent_refund, )] pub marker: Box>, pub registrar: Box>, @@ -103,9 +98,5 @@ pub fn handler(ctx: Context, args: RelinquishVoteArgsV1) -> Re }, )?; - if marker.choices.is_empty() { - marker.close(ctx.accounts.rent_refund.to_account_info())?; - } - Ok(()) } diff --git a/yarn.lock b/yarn.lock index 52a2c3309..790e2ee98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -763,6 +763,13 @@ __metadata: languageName: node linkType: hard +"@fastify/accept-negotiator@npm:^1.0.0": + version: 1.1.0 + resolution: "@fastify/accept-negotiator@npm:1.1.0" + checksum: 5c8f263680af0aece8c1fdea4d4c094a7f82cc5ed90b709357eb52a01e3388d1ac74a17e5a1d5d53f2d3ca93ae50d283ee451a6435b2cbe1b9847fff4d7d0732 + languageName: node + linkType: hard + "@fastify/ajv-compiler@npm:^3.5.0": version: 3.5.0 resolution: "@fastify/ajv-compiler@npm:3.5.0" @@ -807,6 +814,33 @@ __metadata: languageName: node linkType: hard +"@fastify/send@npm:^2.0.0": + version: 2.1.0 + resolution: "@fastify/send@npm:2.1.0" + dependencies: + "@lukeed/ms": ^2.0.1 + escape-html: ~1.0.3 + fast-decode-uri-component: ^1.0.1 + http-errors: 2.0.0 + mime: ^3.0.0 + checksum: c0eeddd35c53167e41ee7c25ccbb964e5a1e4a17c827da6486db656581f83f162237d6f8104b698a4a136d8ea054f2d028bfa4c7d1c4126db51584680f43e1f1 + languageName: node + linkType: hard + +"@fastify/static@npm:^6": + version: 6.12.0 + resolution: "@fastify/static@npm:6.12.0" + dependencies: + "@fastify/accept-negotiator": ^1.0.0 + "@fastify/send": ^2.0.0 + content-disposition: ^0.5.3 + fastify-plugin: ^4.0.0 + glob: ^8.0.1 + p-limit: ^3.1.0 + checksum: 1ba2f88665baddc9e67c7ea8aee401b5ec8c207e7fd615b2e68246a7ee2cafcc75e66b66d901abb154566fa7132af2319cd00e15350ed57936b74ee10c8eb9c7 + languageName: node + linkType: hard + "@floating-ui/core@npm:^1.4.1": version: 1.4.1 resolution: "@floating-ui/core@npm:1.4.1" @@ -1379,6 +1413,27 @@ __metadata: languageName: unknown linkType: soft +"@helium/helium-vote-service@workspace:packages/helium-vote-service": + version: 0.0.0-use.local + resolution: "@helium/helium-vote-service@workspace:packages/helium-vote-service" + dependencies: + "@fastify/cors": ^8.1.1 + "@fastify/static": ^6 + "@helium/spl-utils": ^0.6.2 + "@helium/voter-stake-registry-sdk": ^0.6.2 + "@types/bn.js": ^5.1.1 + dotenv: ^16.0.3 + fastify: ^4.13.0 + git-format-staged: ^2.1.3 + sequelize: ^6.28.0 + simple-git: ^3.21.0 + ts-loader: ^9.2.3 + ts-node: ^10.9.1 + ts-node-dev: ^2.0.0 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + "@helium/hotspot-utils@workspace:packages/hotspot-utils": version: 0.0.0-use.local resolution: "@helium/hotspot-utils@workspace:packages/hotspot-utils" @@ -1993,6 +2048,22 @@ __metadata: languageName: node linkType: hard +"@kwsites/file-exists@npm:^1.1.1": + version: 1.1.1 + resolution: "@kwsites/file-exists@npm:1.1.1" + dependencies: + debug: ^4.1.1 + checksum: 4ff945de7293285133aeae759caddc71e73c4a44a12fac710fdd4f574cce2671a3f89d8165fdb03d383cfc97f3f96f677d8de3c95133da3d0e12a123a23109fe + languageName: node + linkType: hard + +"@kwsites/promise-deferred@npm:^1.1.1": + version: 1.1.1 + resolution: "@kwsites/promise-deferred@npm:1.1.1" + checksum: 07455477a0123d9a38afb503739eeff2c5424afa8d3dbdcc7f9502f13604488a4b1d9742fc7288832a52a6422cf1e1c0a1d51f69a39052f14d27c9a0420b6629 + languageName: node + linkType: hard + "@lerna/add@npm:5.6.2": version: 5.6.2 resolution: "@lerna/add@npm:5.6.2" @@ -2855,6 +2926,13 @@ __metadata: languageName: node linkType: hard +"@lukeed/ms@npm:^2.0.1": + version: 2.0.1 + resolution: "@lukeed/ms@npm:2.0.1" + checksum: c7b46933bf7bad3e024dcbbe2ad6201392b4ed2a05a717c0ef7e96a03fb885d44f08b4b749c392cc51c2736a6a45a08c77f1863ace1c072928fbfd9908a13db3 + languageName: node + linkType: hard + "@metaplex-foundation/beet-solana@npm:0.4.0, @metaplex-foundation/beet-solana@npm:^0.4.0": version: 0.4.0 resolution: "@metaplex-foundation/beet-solana@npm:0.4.0" @@ -7410,7 +7488,7 @@ __metadata: languageName: node linkType: hard -"content-disposition@npm:0.5.4, content-disposition@npm:^0.5.2": +"content-disposition@npm:0.5.4, content-disposition@npm:^0.5.2, content-disposition@npm:^0.5.3": version: 0.5.4 resolution: "content-disposition@npm:0.5.4" dependencies: @@ -7815,7 +7893,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.3.3, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.1, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -13020,7 +13098,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:3.1.0, p-limit@npm:^3.0.2": +"p-limit@npm:3.1.0, p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": version: 3.1.0 resolution: "p-limit@npm:3.1.0" dependencies: @@ -14914,6 +14992,17 @@ __metadata: languageName: node linkType: hard +"simple-git@npm:^3.21.0": + version: 3.21.0 + resolution: "simple-git@npm:3.21.0" + dependencies: + "@kwsites/file-exists": ^1.1.1 + "@kwsites/promise-deferred": ^1.1.1 + debug: ^4.3.4 + checksum: e992d2ac5905c19d385ebb8575db92886c93e677acfb9edb28a842d05b7a3974ef34cc26ccb8057144099a1c5875070867456787aef5bf641a99ebfb9ef656bf + languageName: node + linkType: hard + "simple-update-notifier@npm:^1.0.7": version: 1.1.0 resolution: "simple-update-notifier@npm:1.1.0" From e27793f0f3bed68110a03b5fae5b9a04bd4b3e55 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Mon, 27 Nov 2023 19:38:08 -0300 Subject: [PATCH 011/130] WIP voter profile page endpoints --- .../src/server.ts | 2 +- .../vote_service_example.json | 16 +++ packages/helium-vote-service/package.json | 1 + packages/helium-vote-service/src/index.ts | 133 +++++++++++++++++- packages/helium-vote-service/src/model.ts | 83 +++++++++-- .../src/contexts/heliumVsrContext.tsx | 59 +++----- .../src/hooks/useDelegations.ts | 6 +- .../src/hooks/usePositions.ts | 5 +- .../src/hooks/useVotingDelegatePositions.ts | 4 +- .../src/hooks/useVotingDelegatedTo.ts | 43 ++++++ .../src/hooks/useVotingUndelegatePositions.ts | 40 ++++-- .../voter-stake-registry-hooks/src/index.ts | 3 +- .../src/sdk/types.ts | 3 +- .../src/utils/getPositionKeys.ts | 21 ++- .../voter-stake-registry-sdk/src/index.ts | 11 +- .../src/voteService.ts | 124 ++++++++++++++-- 16 files changed, 464 insertions(+), 90 deletions(-) create mode 100644 packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts diff --git a/packages/account-postgres-sink-service/src/server.ts b/packages/account-postgres-sink-service/src/server.ts index 6a8956d58..2974e801d 100644 --- a/packages/account-postgres-sink-service/src/server.ts +++ b/packages/account-postgres-sink-service/src/server.ts @@ -214,7 +214,7 @@ if (!HELIUS_AUTH_SECRET) { await database.sync(); await defineAllIdlModels({ configs, sequelize: database }); await createPgIndexes({ indexConfigs, sequelize: database }); - await server.listen({ port: 3000, host: "0.0.0.0" }); + await server.listen({ port: Number(process.env.PORT || "3000"), host: "0.0.0.0" }); const address = server.server.address(); const port = typeof address === "string" ? address : address?.port; console.log(`Running on 0.0.0.0:${port}`); diff --git a/packages/account-postgres-sink-service/vote_service_example.json b/packages/account-postgres-sink-service/vote_service_example.json index b810394f1..7a7a523b9 100644 --- a/packages/account-postgres-sink-service/vote_service_example.json +++ b/packages/account-postgres-sink-service/vote_service_example.json @@ -13,6 +13,22 @@ "accounts": [ { "type": "DelegationV0", "table": "delegations", "schema": "public" } ] + }, + { + "programId": "propFYxqmVcufMhk5esNMrexq2ogHbbC2kP9PU1qxKs", + "accounts": [ + { "type": "ProposalV0", "table": "proposals", "schema": "public" } + ] + }, + { + "programId": "orgdXvHVLkWgBYerptASkAwkZAE563CJUu717dMNx5f", + "accounts": [ + { + "type": "OrganizationV0", + "table": "organizations", + "schema": "public" + } + ] } ], "indexConfigs": [] diff --git a/packages/helium-vote-service/package.json b/packages/helium-vote-service/package.json index efd5232ec..e700e118f 100644 --- a/packages/helium-vote-service/package.json +++ b/packages/helium-vote-service/package.json @@ -36,6 +36,7 @@ "@fastify/static": "^6", "@helium/spl-utils": "^0.6.2", "@helium/voter-stake-registry-sdk": "^0.6.2", + "@helium/organization-sdk": "^0.6.2", "dotenv": "^16.0.3", "fastify": "^4.13.0", "sequelize": "^6.28.0", diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index fab1d5a19..b69f77657 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -6,12 +6,17 @@ import { Op } from "sequelize"; import { Delegation, Position, + Proposal, Proxy, ProxyRegistrar, + Registrar, + VoteMarker, sequelize, } from "./model"; import { cloneRepo, readProxiesAndUpsert } from "./repo"; import fastifyStatic from "@fastify/static"; +import { HNT_MINT, IOT_MINT, MOBILE_MINT } from "@helium/spl-utils"; +import { organizationKey } from "@helium/organization-sdk"; const server: FastifyInstance = Fastify({ logger: true, @@ -40,13 +45,26 @@ server.get<{ limit: number; owner: string; nextOwner: string; + minIndex: number; position: string; }; }>("/delegations", async (request, reply) => { - const { position, owner, nextOwner, page = 1, limit = 1000 } = request.query; + const { + position, + owner, + nextOwner, + page = 1, + limit = 1000, + minIndex, + } = request.query; const where: any = {}; if (owner) where.owner = owner; if (nextOwner) where.nextOwner = nextOwner; + if (typeof minIndex !== "undefined") { + where.index = { + [Op.gte]: minIndex, + }; + } const offset = (page - 1) * limit; @@ -59,13 +77,14 @@ server.get<{ { model: Position, where: { - address: request.params.position, + address: position, }, attributes: [], required: true, }, ] : undefined, + order: [["index", "DESC"]], }); }); @@ -105,12 +124,12 @@ WITH description, detail, count(p.owner) as "numDelegations", - sum(p.ve_tokens) as "delegatedVeTokens", + floor(sum(p.ve_tokens)) as "delegatedVeTokens", 100 * sum(p.ve_tokens) / (select total_vetokens from total_vetokens) as "percent" FROM proxies JOIN proxy_registrars pr ON pr.wallet = proxies.wallet - JOIN positions_with_delegations p ON p.owner = proxies.wallet + LEFT OUTER JOIN positions_with_delegations p ON p.owner = proxies.wallet WHERE pr.registrar = ${escapedRegistrar} GROUP BY name, @@ -129,6 +148,63 @@ LIMIT ${limit}; return proxies[0]; }); +server.get<{ + Params: { registrar: string; wallet: string }; +}>("/registrars/:registrar/proxies/:wallet", async (request, reply) => { + const registrar = request.params.registrar; + const escapedRegistrar = sequelize.escape(registrar); + const wallet = request.params.wallet; + const escapedWallet = sequelize.escape(request.params.wallet); + + const proxies = await sequelize.query(` +WITH + positions_with_delegations AS ( + SELECT + * + FROM + positions_with_vetokens p + JOIN delegations d on d.asset = p.asset + AND d.next_owner = '11111111111111111111111111111111' + WHERE registrar = ${escapedRegistrar} + ), + total_vetokens as ( + SELECT + SUM(ve_tokens) total_vetokens + FROM + positions_with_vetokens + WHERE + registrar = ${escapedRegistrar} + ), + proxies_with_delegations AS ( + SELECT + name, + image, + proxies.wallet as wallet, + description, + detail, + count(p.owner) as "numDelegations", + floor(sum(p.ve_tokens)) as "delegatedVeTokens", + 100 * sum(p.ve_tokens) / (select total_vetokens from total_vetokens) as "percent" + FROM + proxies + JOIN proxy_registrars pr ON pr.wallet = proxies.wallet + LEFT OUTER JOIN positions_with_delegations p ON p.owner = proxies.wallet + WHERE pr.registrar = ${escapedRegistrar} AND proxies.wallet = ${escapedWallet} + GROUP BY + name, + image, + proxies.wallet, + description, + detail + ) +SELECT + * +FROM proxies_with_delegations +LIMIT 1 + `); + return proxies[0][0]; +}); + server.get<{ Params: { registrar: string }; Querystring: { query: string } }>( "/registrars/:registrar/proxies/search", async (request, reply) => { @@ -155,6 +231,55 @@ server.get<{ Params: { registrar: string }; Querystring: { query: string } }>( } ); +const ORG_IDS = { + [HNT_MINT.toBase58()]: organizationKey("Helium")[0].toBase58(), + [MOBILE_MINT.toBase58()]: organizationKey("Helium MOBILE")[0].toBase58(), + [IOT_MINT.toBase58()]: organizationKey("Helium IOT")[0].toBase58(), +}; + +server.get<{ + Params: { registrar: string; wallet: string }; + Querystring: { limit: number; page: number }; +}>("/registrars/:registrar/votes/:wallet", async (request, reply) => { + const wallet = sequelize.escape(request.params.wallet); + const registrar = sequelize.escape(request.params.registrar); + const limit = Number(request.query.limit || 1000); // default limit + const offset = Number((request.query.page || 1) - 1) * limit; + const mint = (await Registrar.findByPk(request.params.registrar)) + ?.realmGoverningTokenMint; + if (!mint) { + return reply.code(404).send({ + error: "Mint not found", + }); + } + + const result = await sequelize.query(` +WITH exploded_choice_vote_markers AS( + SELECT voter, registrar, proposal, sum(weight) as weight, unnest(choices) as choice + FROM vote_markers + GROUP BY voter, registrar, proposal, choice +) +SELECT + p.*, + json_agg(json_build_object( + 'voter', vms.voter, + 'registrar', vms.registrar, + 'weight', vms.weight, + 'choice', vms.choice, + 'choiceName', p.choices[vms.choice]->>'name' + )) as votes +FROM exploded_choice_vote_markers vms +JOIN proposals p ON vms.proposal = p.address +WHERE p.namespace = ${sequelize.escape( + ORG_IDS[mint] + )} AND vms.registrar = ${registrar} AND vms.voter = ${wallet} +GROUP BY p.address +OFFSET ${offset} +LIMIT ${limit}; + `); + return result[0]; +}); + const start = async () => { try { const port = process.env.PORT ? Number(process.env.PORT) : 8081; diff --git a/packages/helium-vote-service/src/model.ts b/packages/helium-vote-service/src/model.ts index 97e1c7b8e..a8893848c 100644 --- a/packages/helium-vote-service/src/model.ts +++ b/packages/helium-vote-service/src/model.ts @@ -50,6 +50,52 @@ export const sequelize = new Sequelize({ }, }); +export class Proposal extends Model { + declare address: string; + declare namespace: string; + declare owner: string; + declare state: object; + declare created_at: number; + declare proposal_config: string; + declare max_choices_per_voter: number; + declare seed: Buffer; + declare name: string; + declare uri: string; + declare tags: string[]; + declare choices: object[]; + declare bump_seed: number; + declare refreshed_at: Date; +} + +Proposal.init( + { + address: { + type: DataTypes.STRING, + primaryKey: true, + }, + namespace: DataTypes.STRING, + owner: DataTypes.STRING, + state: DataTypes.JSONB, + created_at: DataTypes.DECIMAL, + proposal_config: DataTypes.STRING, + max_choices_per_voter: DataTypes.INTEGER, + seed: DataTypes.BLOB, + name: DataTypes.STRING, + uri: DataTypes.STRING, + tags: DataTypes.ARRAY(DataTypes.STRING), + choices: DataTypes.ARRAY(DataTypes.JSONB), + bump_seed: DataTypes.INTEGER, + refreshed_at: DataTypes.DATE, + }, + { + sequelize, + modelName: "proposal", + tableName: "proposals", + underscored: true, + timestamps: false, + } +); + export class VoteMarker extends Model { declare address: string; declare voter: string; @@ -82,16 +128,24 @@ VoteMarker.init( tableName: "vote_markers", underscored: true, timestamps: false, + indexes: [ + { + fields: ["voter"], + }, + { + fields: ["proposal"], + }, + ], } ); export class Registrar extends Model { declare address: string; - declare governance_program_id: string; + declare governanceProgramId: string; declare realm: string; - declare realm_governing_token_mint: string; - declare realm_authority: string; - declare voting_mints: { + declare realmGoverningTokenMint: string; + declare realmAuthority: string; + declare votingMints: { mint: string; baselineVoteWeightScaledFactor: string; maxExtraLockupVoteWeightScaledFactor: string; @@ -107,10 +161,10 @@ Registrar.init( type: DataTypes.STRING, primaryKey: true, }, - governance_program_id: DataTypes.STRING, + governanceProgramId: DataTypes.STRING, realm: DataTypes.STRING, - realm_governing_token_mint: DataTypes.STRING, - realm_authority: DataTypes.STRING, + realmGoverningTokenMint: DataTypes.STRING, + realmAuthority: DataTypes.STRING, voting_mints: DataTypes.JSONB, }, { @@ -126,6 +180,7 @@ export class Position extends Model { declare address: string; declare registrar: string; declare mint: string; + declare asset: string; declare lockup: { startTs: string; endTs: string; @@ -145,6 +200,7 @@ Position.init( }, registrar: DataTypes.STRING, mint: DataTypes.STRING, + asset: DataTypes.STRING, lockup: DataTypes.JSONB, amountDepositedNative: DataTypes.DECIMAL.UNSIGNED, votingMintConfigIdx: DataTypes.INTEGER, @@ -234,6 +290,9 @@ export class Delegation extends Model { declare nextOwner: string; declare index: number; declare asset: string; + declare delegationConfig: string + declare rentRefund: string; + declare bumpSeed: number; } Delegation.init( { @@ -245,6 +304,10 @@ Delegation.init( nextOwner: DataTypes.STRING, index: DataTypes.INTEGER, asset: DataTypes.STRING, + delegationConfig: DataTypes.STRING, + rentRefund: DataTypes.STRING, + bumpSeed: DataTypes.INTEGER, + expirationTime: DataTypes.DECIMAL.UNSIGNED }, { sequelize, @@ -255,8 +318,8 @@ Delegation.init( } ); -Delegation.belongsTo(Position, { foreignKey: "asset", targetKey: "mint" }); -Position.hasMany(Delegation, { foreignKey: "asset", sourceKey: "mint" }); +Delegation.belongsTo(Position, { foreignKey: "asset", targetKey: "asset" }); +Position.hasMany(Delegation, { foreignKey: "asset", sourceKey: "asset" }); Proxy.hasMany(Delegation, { foreignKey: "owner", sourceKey: "wallet" }); -ProxyRegistrar.hasMany(Proxy, { foreignKey: "wallet", sourceKey: "wallet" }) +ProxyRegistrar.hasMany(Proxy, { foreignKey: "wallet", sourceKey: "wallet" }); Proxy.hasMany(ProxyRegistrar, { foreignKey: "wallet", sourceKey: "wallet" }); diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index 499488b3f..91b712806 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -12,6 +12,7 @@ import React, { createContext, useCallback, useContext, + useEffect, useMemo, useState, } from "react"; @@ -146,35 +147,25 @@ export const HeliumVsrStateProvider: React.FC<{ const { accounts: delegatedAccounts, loading: loadingDel } = useDelegatedPositions(delegatedPositionKeys); - const delegationKeys = useMemo(() => { - return ( - registrar && - result && [ - ...result.nfts.map((nft) => { - return delegationKey( - registrar.delegationConfig, - // @ts-ignore - nft.mintAddress!, - PublicKey.default - )[0]; - }), - ...result.delegationKeys, - ] - ); - }, [result?.nfts, result?.delegationKeys]); - const { accounts: delegationAccounts, loading: loadingDelegations } = - useDelegations(delegationKeys); - - const allPositions = useMemo( - () => [ - ...(result?.positionKeys || []), - ...(result?.votingDelegatedPositionKeys || []), - ], - [result?.positionKeys, result?.votingDelegatedPositionKeys] - ); + const votingDelegationAccounts = result?.delegations; + const votingDelegationAccountsByAsset = useMemo(() => { + return votingDelegationAccounts?.reduce((acc, del) => { + acc[del.asset.toBase58()] = del; + return acc + }, {} as Record) + }, [votingDelegationAccounts]) const myOwnedPositionsEndIdx = result?.positionKeys?.length; - const { accounts: positions, loading: loadingPositions } = - usePositions(allPositions); + // Assume that my positions are a small amount, so we don't need to say they're static + const { accounts: myPositions, loading: loadingMyPositions } = usePositions( + result?.positionKeys + ); + // Delegated positions may be a lot, set to static + const { accounts: delegatedPositions, loading: loadingDelPositions } = + usePositions(result?.votingDelegatedPositionKeys, true); + const positions = useMemo( + () => [...(myPositions || []), ...(delegatedPositions || [])], + [myPositions, delegatedPositions] + ); const now = useSolanaUnixNow(60 * 5 * 1000); const { @@ -192,7 +183,7 @@ export const HeliumVsrStateProvider: React.FC<{ .map((position, idx) => { if (position && position.info) { const isDelegated = !!delegatedAccounts?.[idx]?.info; - const delegation = delegationAccounts?.[idx]?.info; + const delegation = votingDelegationAccountsByAsset?.[position.info.mint.toBase58()]; const delegatedSubDao = isDelegated ? delegatedAccounts[idx]?.info?.subDao : null; @@ -231,12 +222,7 @@ export const HeliumVsrStateProvider: React.FC<{ votingPower: posVotingPower, votingMint: mintCfgs[position.info.votingMintConfigIdx], isVotingDelegatedToMe, - votingDelegation: delegation - ? ({ - ...delegation, - address: delegationAccounts?.[idx]?.publicKey, - } as DelegationV0 & { address: PublicKey }) - : undefined, + votingDelegation: delegation, } as PositionWithMeta; } }) @@ -256,7 +242,7 @@ export const HeliumVsrStateProvider: React.FC<{ positions, registrar, delegatedAccounts, - delegationAccounts, + votingDelegationAccounts, ]); const sortedPositions = useMemo( @@ -273,6 +259,7 @@ export const HeliumVsrStateProvider: React.FC<{ }), [positionsWithMeta] ); + const loadingPositions = loadingMyPositions || loadingDelPositions; const ret = useMemo( () => ({ loading: loading || loadingPositions || loadingDel, diff --git a/packages/voter-stake-registry-hooks/src/hooks/useDelegations.ts b/packages/voter-stake-registry-hooks/src/hooks/useDelegations.ts index 63974e95a..f76c1ebc5 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useDelegations.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useDelegations.ts @@ -3,10 +3,12 @@ import { NftDelegation } from "@helium/modular-governance-idls/lib/types/nft_del import { PublicKey } from "@solana/web3.js"; export const useDelegations = ( - delegationKeys: PublicKey[] | undefined + delegationKeys: PublicKey[] | undefined, + isStatic: boolean = false ) => { return useAnchorAccounts( delegationKeys, - "delegationV0" + "delegationV0", + isStatic ); }; diff --git a/packages/voter-stake-registry-hooks/src/hooks/usePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/usePositions.ts index fe6a5fa61..b7c37b34d 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/usePositions.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/usePositions.ts @@ -2,9 +2,10 @@ import { useAnchorAccounts } from "@helium/helium-react-hooks"; import { VoterStakeRegistry } from "@helium/idls/lib/types/voter_stake_registry"; import { PublicKey } from "@solana/web3.js"; -export const usePositions = (positionKeys: PublicKey[] | undefined) => { +export const usePositions = (positionKeys: PublicKey[] | undefined, isStatic: boolean = false) => { return useAnchorAccounts( positionKeys, - "positionV0" + "positionV0", + isStatic ); }; diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts index 9b6dcf15e..3bb6d27be 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts @@ -8,7 +8,7 @@ import { PositionWithMeta } from "../sdk/types"; import BN from "bn.js"; export const useVotingDelegatePositions = () => { - const { provider, registrar } = useHeliumVsrState(); + const { provider, registrar, refetch } = useHeliumVsrState(); const { error, loading, execute } = useAsyncCallback( async ({ positions, @@ -55,6 +55,8 @@ export const useVotingDelegatePositions = () => { } await batchParallelInstructions(provider, instructions); + // Wait a couple seconds for changes to hit pg-sink + setTimeout(refetch, 2 * 1000) } } ); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts new file mode 100644 index 000000000..8a2eef0c4 --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts @@ -0,0 +1,43 @@ +import { PublicKey } from "@solana/web3.js"; +import { useHeliumVsrState } from "../contexts/heliumVsrContext"; +import { useMemo } from "react"; +import { PositionWithMeta } from "../sdk/types"; +import BN from "bn.js"; +import { calcPositionVotingPower } from "../utils/calcPositionVotingPower"; +import { getRegistrarKey } from "@helium/voter-stake-registry-sdk"; +import { useSolanaUnixNow } from "@helium/helium-react-hooks"; + +export function useVotingDelegatedTo(wallet?: PublicKey): { + positions?: PositionWithMeta[]; + votingPower?: BN; +} { + const { positions, registrar } = useHeliumVsrState(); + const now = useSolanaUnixNow(60 * 5 * 1000); + + const result = useMemo(() => { + if (wallet) { + return positions?.filter( + (position) => + position.votingDelegation && + position.votingDelegation.nextOwner.equals(wallet) + ); + } + }, [positions]); + const votingPower = useMemo(() => { + if (registrar && now) + return result?.reduce((acc, position) => { + const power = calcPositionVotingPower({ + position: position, + registrar, + unixNow: new BN(now), + }); + acc = acc.add(power); + return acc; + }, new BN(0)); + }, [result, registrar, now]); + + return { + positions: result, + votingPower, + }; +} diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts index f780bae0f..47cce487d 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts @@ -1,5 +1,5 @@ import { Program } from "@coral-xyz/anchor"; -import { PROGRAM_ID, init } from "@helium/nft-delegation-sdk"; +import { PROGRAM_ID, delegationKey, init } from "@helium/nft-delegation-sdk"; import { batchLinearInstructions, sendInstructions, @@ -11,7 +11,7 @@ import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { PositionWithMeta } from "../sdk/types"; export const useVotingUndelegatePositions = () => { - const { provider, registrar, voteService } = useHeliumVsrState(); + const { provider, registrar, voteService, refetch } = useHeliumVsrState(); const { error, loading, execute } = useAsyncCallback( async ({ positions, @@ -32,21 +32,29 @@ export const useVotingUndelegatePositions = () => { } else { const instructions: TransactionInstruction[] = []; for (const position of positions) { - const toUndelegate = await voteService.getPositionDelegations( - position.pubkey - ); - - let currentDelegationStr = toUndelegate.find( - (d) => d.owner === provider.wallet.publicKey.toBase58() - )?.address; - let currentDelegation = - currentDelegationStr && new PublicKey(currentDelegationStr); - if (!currentDelegation) { - // If no delegation found with me as the owner, must be the primary delegation - currentDelegation = new PublicKey( - toUndelegate[toUndelegate.length - 1].address + let currentDelegation = delegationKey( + registrar.delegationConfig, + position.mint, + provider.wallet.publicKey + )[0]; + let delegation = + await nftDelegationProgram.account.delegationV0.fetchNullable( + currentDelegation + ); + if (!delegation) { + currentDelegation = delegationKey( + registrar.delegationConfig, + position.mint, + PublicKey.default + )[0]; + delegation = await nftDelegationProgram.account.delegationV0.fetch( + currentDelegation ); } + const toUndelegate = await voteService.getDelegationsForWallet( + position.pubkey, + delegation.index + ); instructions.push( ...( @@ -75,6 +83,8 @@ export const useVotingUndelegatePositions = () => { ); } await batchLinearInstructions(provider, instructions); + // Wait a couple seconds for changes to hit pg-sink + setTimeout(refetch, 2 * 1000); } } ); diff --git a/packages/voter-stake-registry-hooks/src/index.ts b/packages/voter-stake-registry-hooks/src/index.ts index a686bfd10..8ce468632 100644 --- a/packages/voter-stake-registry-hooks/src/index.ts +++ b/packages/voter-stake-registry-hooks/src/index.ts @@ -25,4 +25,5 @@ export { useVoteMarkers } from "./hooks/useVoteMarkers"; export { useVote } from "./hooks/useVote"; export { useRelinquishVote } from "./hooks/useRelinquishVote"; export { useVotingDelegatePositions } from "./hooks/useVotingDelegatePositions"; -export { useVotingUndelegatePositions } from "./hooks/useVotingUndelegatePositions"; \ No newline at end of file +export { useVotingUndelegatePositions } from "./hooks/useVotingUndelegatePositions"; +export { useVotingDelegatedTo } from "./hooks/useVotingDelegatedTo" \ No newline at end of file diff --git a/packages/voter-stake-registry-hooks/src/sdk/types.ts b/packages/voter-stake-registry-hooks/src/sdk/types.ts index e37fafbcf..6f5c07d40 100644 --- a/packages/voter-stake-registry-hooks/src/sdk/types.ts +++ b/packages/voter-stake-registry-hooks/src/sdk/types.ts @@ -18,6 +18,7 @@ export interface Registrar extends RegistrarV0 { export interface Position extends Omit { lockup: Lockup } +export type Delegation = DelegationV0 & { address: PublicKey }; export interface PositionWithMeta extends Position { pubkey: PublicKey isDelegated: boolean @@ -28,7 +29,7 @@ export interface PositionWithMeta extends Position { hasGenesisMultiplier: boolean votingPower: BN votingMint: VotingMintConfig - votingDelegation: (DelegationV0 & { address: PublicKey }) | null + votingDelegation: Delegation | null } export type LockupKind = IdlTypes['LockupKind'] /* export type InitializePositionV0Args = IdlTypes['InitializePositionArgsV0'] diff --git a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts index e8bfbe54e..40603b982 100644 --- a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts +++ b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts @@ -1,5 +1,4 @@ import { AnchorProvider } from "@coral-xyz/anchor"; -import { init } from "@helium/nft-delegation-sdk"; import { VoteService, getRegistrarKey, @@ -9,7 +8,8 @@ import { import { Metadata, Metaplex, Nft, Sft } from "@metaplex-foundation/js"; import { Mint, getMint } from "@solana/spl-token"; import { PublicKey } from "@solana/web3.js"; -import { Registrar } from "../sdk/types"; +import { Delegation, Registrar } from "../sdk/types"; +import { BN } from "bn.js"; export interface GetPositionsArgs { wallet: PublicKey; @@ -24,13 +24,12 @@ export const getPositionKeys = async ( votingDelegatedPositionKeys: PublicKey[]; positionKeys: PublicKey[]; nfts: (Metadata | Nft | Sft)[]; - delegationKeys: PublicKey[]; + delegations: Delegation[]; }> => { const { mint, wallet, provider, voteService } = args; const connection = provider.connection; const me = wallet; - const delegationProgram = await init(provider); const metaplex = new Metaplex(connection); const registrarPk = getRegistrarKey(mint); @@ -38,7 +37,7 @@ export const getPositionKeys = async ( const registrar = (await program.account.registrar.fetch( registrarPk )) as Registrar; - const myDelegations = await voteService.getMyDelegations(me); + const myDelegations = await voteService.getDelegationsForWallet(me); const delegationPositions = myDelegations.map( (del) => positionKey(new PublicKey(del.asset))[0] ); @@ -60,7 +59,17 @@ export const getPositionKeys = async ( return { positionKeys, votingDelegatedPositionKeys: delegationPositions, - delegationKeys: myDelegations.map((d) => new PublicKey(d.address)), + delegations: myDelegations.map((d) => ({ + owner: new PublicKey(d.owner), + nextOwner: new PublicKey(d.nextOwner), + address: new PublicKey(d.address), + asset: new PublicKey(d.asset), + rentRefund: new PublicKey(d.rentRefund), + delegationConfig: new PublicKey(d.delegationConfig), + index: d.index, + bumpSeed: d.bumpSeed, + expirationTime: new BN(d.expirationTime) + })), nfts, }; }; diff --git a/packages/voter-stake-registry-sdk/src/index.ts b/packages/voter-stake-registry-sdk/src/index.ts index b08669b1c..0b0c6c5d7 100644 --- a/packages/voter-stake-registry-sdk/src/index.ts +++ b/packages/voter-stake-registry-sdk/src/index.ts @@ -7,7 +7,14 @@ import { HNT_MINT, IOT_MINT, MOBILE_MINT } from "@helium/spl-utils"; export * from "./constants"; export * from "./pdas"; export * from "./resolvers"; -export { VoteService } from "./voteService" +export { VoteService } from "./voteService"; +export type { + ProposalWithVotes, + Delegation, + Proxy, + EnhancedProxy, + EnhancedProxyData, +} from "./voteService"; export function getRegistrarKey(mint: PublicKey) { return registrarKey( @@ -43,7 +50,7 @@ export const init = async ( provider, undefined, () => { - return vsrResolvers + return vsrResolvers; } ) as Program; diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index 8efdf90c5..185678208 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -1,8 +1,8 @@ -import { IdlAccounts, Program } from "@coral-xyz/anchor"; +import { Program } from "@coral-xyz/anchor"; import { VoterStakeRegistry } from "@helium/idls/lib/types/voter_stake_registry"; import { NftDelegation } from "@helium/modular-governance-idls/lib/types/nft_delegation"; -import axios, { AxiosInstance } from "axios"; import { PublicKey } from "@solana/web3.js"; +import axios, { AxiosInstance } from "axios"; export type Delegation = { owner: string; @@ -10,6 +10,53 @@ export type Delegation = { index: number; address: string; asset: string; + delegationConfig: string; + bumpSeed: number; + rentRefund: string; + expirationTime: string; +}; + +export type Proxy = { + name: string; + image: string; + wallet: string; + description: string; + detail: string; +}; + +export type EnhancedProxyData = { + numDelegations: string; + delegatedVeTokens: string; + percent: string; +}; + +export type EnhancedProxy = Proxy & EnhancedProxyData; + +export type Proposal = { + address: string; + namespace: string; + owner: string; + state: object; + created_at: number; + proposal_config: string; + max_choices_per_voter: number; + seed: Buffer; + name: string; + uri: string; + tags: string[]; + choices: object[]; + bump_seed: number; + refreshed_at: Date; +}; + +export type ProposalWithVotes = Proposal & { + votes: { + voter: string; + registrar: string; + weight: string; + choice: number; + choiceName: string; + }[]; }; export class VoteService { @@ -39,11 +86,48 @@ export class VoteService { this.registrar = registrar; } - async getMyDelegations(wallet: PublicKey): Promise { + getAssetUrl(baseUrl: string) { + return baseUrl.replace( + "./", + `${this.client!.getUri()}/helium-vote-proxies/` + ); + } + + async getVotesForWallet({ + wallet, + page, + limit = 1000, + }: { + wallet: PublicKey; + page: number; + limit: number; + }): Promise { + if (this.client) { + return ( + await this.client.get( + `/registrars/${this.registrar.toBase58()}/votes/${wallet.toBase58()}`, + { + params: { limit, page }, + } + ) + ).data; + } else { + throw new Error("This is not supported without an indexer"); + } + } + + async getDelegationsForWallet( + wallet: PublicKey, + minDelegationIndex: number = 0 + ): Promise { if (this.client) { return ( await this.client.get(`/delegations`, { - params: { limit: 10000, owner: wallet.toBase58() }, + params: { + limit: 10000, + owner: wallet.toBase58(), + minIndex: minDelegationIndex, + }, }) ).data; } @@ -75,17 +159,24 @@ export class VoteService { index: a.account.index, address: a.publicKey.toBase58(), asset: a.account.asset.toBase58(), + delegationConfig: a.account.delegationConfig.toBase58(), + rentRefund: a.account.rentRefund.toBase58(), + bumpSeed: a.account.bumpSeed, + expirationTime: a.account.expirationTime.toString(), })); } else { throw new Error("No nft delegation program or api url"); } } - async getPositionDelegations(position: PublicKey): Promise { + async getPositionDelegations( + position: PublicKey, + minIndex: number + ): Promise { if (this.client) { return ( await this.client.get(`/delegations`, { - params: { limit: 10000, position }, + params: { limit: 10000, position, minIndex }, }) ).data; } @@ -111,6 +202,7 @@ export class VoteService { }, ]) ) + .filter((a) => a.account.index >= minIndex) .sort((a, b) => b.account.index - a.account.index) .map((a) => ({ owner: a.account.owner.toBase58(), @@ -118,6 +210,10 @@ export class VoteService { index: a.account.index, address: a.publicKey.toBase58(), asset: a.account.asset.toBase58(), + delegationConfig: a.account.delegationConfig.toBase58(), + rentRefund: a.account.rentRefund.toBase58(), + bumpSeed: a.account.bumpSeed, + expirationTime: a.account.expirationTime.toString(), })); } else { throw new Error("No nft delegation program or api url"); @@ -130,12 +226,12 @@ export class VoteService { }: { page: number; limit: number; - }): Promise { + }): Promise { if (!this.client) { throw new Error("This operation is not supported without an API"); } const response = await this.client.get( - `/registrar/${this.registrar.toBase58()}/proxies`, + `/registrars/${this.registrar.toBase58()}/proxies`, { params: { page, limit }, } @@ -143,7 +239,17 @@ export class VoteService { return response.data; } - async searchProxies({ query }: { query: string }): Promise { + async getProxy(wallet: string): Promise { + if (!this.client) { + throw new Error("This operation is not supported without an API"); + } + const response = await this.client.get( + `/registrars/${this.registrar.toBase58()}/proxies/${wallet}` + ); + return response.data; + } + + async searchProxies({ query }: { query: string }): Promise { if (!this.client) { throw new Error("This operation is not supported without an API"); } From 0d5f2c3bf08773e7a7af88a5ac81d1c01cdd08eb Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Tue, 28 Nov 2023 15:04:50 -0300 Subject: [PATCH 012/130] Fix vote history --- packages/helium-vote-service/src/index.ts | 23 +++++++++++++++++-- packages/helium-vote-service/src/model.ts | 20 ++++++++-------- .../src/voteService.ts | 2 +- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index b69f77657..4e40b9952 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -17,6 +17,7 @@ import { cloneRepo, readProxiesAndUpsert } from "./repo"; import fastifyStatic from "@fastify/static"; import { HNT_MINT, IOT_MINT, MOBILE_MINT } from "@helium/spl-utils"; import { organizationKey } from "@helium/organization-sdk"; +import { camelCase, isPlainObject, mapKeys } from "lodash"; const server: FastifyInstance = Fastify({ logger: true, @@ -266,7 +267,7 @@ SELECT 'registrar', vms.registrar, 'weight', vms.weight, 'choice', vms.choice, - 'choiceName', p.choices[vms.choice]->>'name' + 'choiceName', p.choices[vms.choice + 1]->>'name' )) as votes FROM exploded_choice_vote_markers vms JOIN proposals p ON vms.proposal = p.address @@ -277,9 +278,27 @@ GROUP BY p.address OFFSET ${offset} LIMIT ${limit}; `); - return result[0]; + return result[0].map(deepCamelCaseKeys); }); +function deepCamelCaseKeys(obj) { + if (Array.isArray(obj)) { + return obj.map(deepCamelCaseKeys); + } else if (isPlainObject(obj)) { + return mapKeys( + Object.fromEntries( + Object.entries(obj).map(([key, value]) => [ + camelCase(key), + deepCamelCaseKeys(value), + ]) + ), + (value, key) => camelCase(key) + ); + } else { + return obj; + } +} + const start = async () => { try { const port = process.env.PORT ? Number(process.env.PORT) : 8081; diff --git a/packages/helium-vote-service/src/model.ts b/packages/helium-vote-service/src/model.ts index a8893848c..7ae717943 100644 --- a/packages/helium-vote-service/src/model.ts +++ b/packages/helium-vote-service/src/model.ts @@ -55,16 +55,16 @@ export class Proposal extends Model { declare namespace: string; declare owner: string; declare state: object; - declare created_at: number; - declare proposal_config: string; - declare max_choices_per_voter: number; + declare createdAt: number; + declare proposalConfig: string; + declare maxChoicesPerVoter: number; declare seed: Buffer; declare name: string; declare uri: string; declare tags: string[]; declare choices: object[]; - declare bump_seed: number; - declare refreshed_at: Date; + declare bumpSeed: number; + declare refreshedAt: Date; } Proposal.init( @@ -76,16 +76,16 @@ Proposal.init( namespace: DataTypes.STRING, owner: DataTypes.STRING, state: DataTypes.JSONB, - created_at: DataTypes.DECIMAL, - proposal_config: DataTypes.STRING, - max_choices_per_voter: DataTypes.INTEGER, + createdAt: DataTypes.DECIMAL, + proposalConfig: DataTypes.STRING, + maxChoicesPerVoter: DataTypes.INTEGER, seed: DataTypes.BLOB, name: DataTypes.STRING, uri: DataTypes.STRING, tags: DataTypes.ARRAY(DataTypes.STRING), choices: DataTypes.ARRAY(DataTypes.JSONB), - bump_seed: DataTypes.INTEGER, - refreshed_at: DataTypes.DATE, + bumpSeed: DataTypes.INTEGER, + refreshedAt: DataTypes.DATE, }, { sequelize, diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index 185678208..f63108933 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -44,7 +44,7 @@ export type Proposal = { name: string; uri: string; tags: string[]; - choices: object[]; + choices: { name: string; weight: string; uri: string }[]; bump_seed: number; refreshed_at: Date; }; From 0562848b2a66fd2ec71dd8cdb73beaa7a72b1508 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Dec 2023 17:54:23 -0600 Subject: [PATCH 013/130] Fix relations --- packages/helium-vote-service/package.json | 2 +- packages/helium-vote-service/src/index.ts | 5 ++- packages/helium-vote-service/src/model.ts | 13 ++++--- packages/helium-vote-service/src/repo.ts | 33 +++++++++--------- packages/helium-vote-service/yarn.deploy.lock | 34 +++++++++++++++++++ yarn.lock | 34 +++++++++++++++++++ 6 files changed, 98 insertions(+), 23 deletions(-) diff --git a/packages/helium-vote-service/package.json b/packages/helium-vote-service/package.json index e700e118f..3b9dcbf46 100644 --- a/packages/helium-vote-service/package.json +++ b/packages/helium-vote-service/package.json @@ -34,9 +34,9 @@ "dependencies": { "@fastify/cors": "^8.1.1", "@fastify/static": "^6", + "@helium/organization-sdk": "^0.0.5", "@helium/spl-utils": "^0.6.2", "@helium/voter-stake-registry-sdk": "^0.6.2", - "@helium/organization-sdk": "^0.6.2", "dotenv": "^16.0.3", "fastify": "^4.13.0", "sequelize": "^6.28.0", diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index 4e40b9952..e72b8d6ba 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -12,6 +12,7 @@ import { Registrar, VoteMarker, sequelize, + setRelations, } from "./model"; import { cloneRepo, readProxiesAndUpsert } from "./repo"; import fastifyStatic from "@fastify/static"; @@ -310,8 +311,9 @@ const start = async () => { server.server.address(); console.log(`Started server on 0.0.0.0:${port}`); - await Proxy.sync({ alter: true }); await ProxyRegistrar.sync({ alter: true }); + await Proxy.sync({ alter: true }); + setRelations() // Read SQL file const sqlFilePath = path.join( __dirname, @@ -322,6 +324,7 @@ const start = async () => { // Execute SQL query await sequelize.query(sqlQuery); + console.log("Created models"); } catch (err) { server.log.error(err); process.exit(1); diff --git a/packages/helium-vote-service/src/model.ts b/packages/helium-vote-service/src/model.ts index 7ae717943..cc3eca139 100644 --- a/packages/helium-vote-service/src/model.ts +++ b/packages/helium-vote-service/src/model.ts @@ -318,8 +318,11 @@ Delegation.init( } ); -Delegation.belongsTo(Position, { foreignKey: "asset", targetKey: "asset" }); -Position.hasMany(Delegation, { foreignKey: "asset", sourceKey: "asset" }); -Proxy.hasMany(Delegation, { foreignKey: "owner", sourceKey: "wallet" }); -ProxyRegistrar.hasMany(Proxy, { foreignKey: "wallet", sourceKey: "wallet" }); -Proxy.hasMany(ProxyRegistrar, { foreignKey: "wallet", sourceKey: "wallet" }); + +export function setRelations() { + Delegation.belongsTo(Position, { foreignKey: "asset", targetKey: "asset" }); + Position.hasMany(Delegation, { foreignKey: "asset", sourceKey: "asset" }); + Proxy.hasMany(Delegation, { foreignKey: "owner", sourceKey: "wallet" }); + ProxyRegistrar.hasMany(Proxy, { foreignKey: "wallet", sourceKey: "wallet" }); + Proxy.hasMany(ProxyRegistrar, { foreignKey: "wallet", sourceKey: "wallet" }); +} diff --git a/packages/helium-vote-service/src/repo.ts b/packages/helium-vote-service/src/repo.ts index b4b8b4897..74819d323 100644 --- a/packages/helium-vote-service/src/repo.ts +++ b/packages/helium-vote-service/src/repo.ts @@ -29,22 +29,6 @@ export const readProxiesAndUpsert = async () => { ); const proxies = JSON.parse(proxiesJson); for (const proxy of proxies) { - for (const network of proxy.networks) { - const registrar = networksToRegistrars[network]; - if (registrar) { - const proxyRegistrar = { - registrar, - wallet: proxy.wallet, - }; - const existing = await ProxyRegistrar.findOne({ - where: proxyRegistrar, - }); - if (!existing) { - await ProxyRegistrar.create(proxyRegistrar) - } - } - } - delete proxy.networks const existingProxy = await Proxy.findOne({ where: { [Op.or]: [{ name: proxy.name }, { wallet: proxy.wallet }], @@ -60,6 +44,23 @@ export const readProxiesAndUpsert = async () => { } else { await Proxy.create(proxy); } + for (const network of proxy.networks) { + const registrar = networksToRegistrars[network]; + if (registrar) { + const proxyRegistrar = { + registrar, + wallet: proxy.wallet, + }; + const existing = await ProxyRegistrar.findOne({ + where: proxyRegistrar, + }); + console.log(registrar); + if (!existing) { + await ProxyRegistrar.create(proxyRegistrar); + } + } + } + delete proxy.networks; } }; diff --git a/packages/helium-vote-service/yarn.deploy.lock b/packages/helium-vote-service/yarn.deploy.lock index 3ed17f18b..0f68af52d 100644 --- a/packages/helium-vote-service/yarn.deploy.lock +++ b/packages/helium-vote-service/yarn.deploy.lock @@ -190,6 +190,7 @@ __metadata: dependencies: "@fastify/cors": ^8.1.1 "@fastify/static": ^6 + "@helium/organization-sdk": ^0.0.5 "@helium/spl-utils": ^0.6.2 "@helium/voter-stake-registry-sdk": ^0.6.2 "@types/bn.js": ^5.1.1 @@ -219,6 +220,16 @@ __metadata: languageName: unknown linkType: soft +"@helium/modular-governance-idls@npm:^0.0.5": + version: 0.0.5 + resolution: "@helium/modular-governance-idls@npm:0.0.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.43.4 + checksum: fd13b16178d67bda5720a3658e6782d7787f73299af60807822fc4e737e2f2424b68e097f642d9e944f247bfb5df9c785c6f060c156dfe89f2ce7aae8a48d411 + languageName: node + linkType: hard + "@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" @@ -241,6 +252,29 @@ __metadata: languageName: node linkType: hard +"@helium/organization-sdk@npm:^0.0.5": + version: 0.0.5 + resolution: "@helium/organization-sdk@npm:0.0.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.5 + "@helium/proposal-sdk": ^0.0.5 + checksum: 6ee2034f142d45828db65085ce4a88d0f1bd795492695b6af7530ac021bfc7df469ae66641b0673fde17826cc9f54e2bcd0e9b65f573ec7a0ea21e14045dc6cf + languageName: node + linkType: hard + +"@helium/proposal-sdk@npm:^0.0.5": + version: 0.0.5 + resolution: "@helium/proposal-sdk@npm:0.0.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.5 + checksum: c774de53273fd51f64d683f0f9d9449d4716bebf3b29178f557c999fd290d632932ede281e85834c34c2496bef0e4b7f732f9f177840f93b464e89e5f48512bb + languageName: node + linkType: hard + "@helium/spl-utils@^0.6.2": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" diff --git a/yarn.lock b/yarn.lock index 790e2ee98..7e7bebf1d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1419,6 +1419,7 @@ __metadata: dependencies: "@fastify/cors": ^8.1.1 "@fastify/static": ^6 + "@helium/organization-sdk": ^0.0.5 "@helium/spl-utils": ^0.6.2 "@helium/voter-stake-registry-sdk": ^0.6.2 "@types/bn.js": ^5.1.1 @@ -1638,6 +1639,16 @@ __metadata: languageName: node linkType: hard +"@helium/modular-governance-idls@npm:^0.0.5": + version: 0.0.5 + resolution: "@helium/modular-governance-idls@npm:0.0.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.43.4 + checksum: fd13b16178d67bda5720a3658e6782d7787f73299af60807822fc4e737e2f2424b68e097f642d9e944f247bfb5df9c785c6f060c156dfe89f2ce7aae8a48d411 + languageName: node + linkType: hard + "@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" @@ -1693,6 +1704,18 @@ __metadata: languageName: node linkType: hard +"@helium/organization-sdk@npm:^0.0.5": + version: 0.0.5 + resolution: "@helium/organization-sdk@npm:0.0.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.5 + "@helium/proposal-sdk": ^0.0.5 + checksum: 6ee2034f142d45828db65085ce4a88d0f1bd795492695b6af7530ac021bfc7df469ae66641b0673fde17826cc9f54e2bcd0e9b65f573ec7a0ea21e14045dc6cf + languageName: node + linkType: hard + "@helium/organization-sdk@npm:^0.0.8, @helium/organization-sdk@npm:^0.0.8-next.12+f1b0c8c": version: 0.0.8 resolution: "@helium/organization-sdk@npm:0.0.8" @@ -1731,6 +1754,17 @@ __metadata: languageName: node linkType: hard +"@helium/proposal-sdk@npm:^0.0.5": + version: 0.0.5 + resolution: "@helium/proposal-sdk@npm:0.0.5" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.5 + checksum: c774de53273fd51f64d683f0f9d9449d4716bebf3b29178f557c999fd290d632932ede281e85834c34c2496bef0e4b7f732f9f177840f93b464e89e5f48512bb + languageName: node + linkType: hard + "@helium/proposal-sdk@npm:^0.0.8": version: 0.0.8 resolution: "@helium/proposal-sdk@npm:0.0.8" From 15ca89351eb0d29ae5396b54eafea01f9be97a01 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Mon, 15 Apr 2024 13:16:40 -0500 Subject: [PATCH 014/130] wip --- Anchor.toml | 2 +- packages/crons/yarn.deploy.lock | 1 + packages/data-credits-sdk/yarn.deploy.lock | 160 ++++++++++++++++++ packages/distributor-oracle/yarn.deploy.lock | 1 + packages/entity-invalidator/yarn.deploy.lock | 1 + packages/helium-admin-cli/yarn.deploy.lock | 1 + .../yarn.deploy.lock | 1 + packages/helium-sub-daos-sdk/yarn.deploy.lock | 160 ++++++++++++++++++ packages/hexboosting-sdk/yarn.deploy.lock | 160 ++++++++++++++++++ packages/hotspot-utils/yarn.deploy.lock | 1 + packages/metadata-service/yarn.deploy.lock | 1 + packages/migration-service/yarn.deploy.lock | 1 + .../yarn.deploy.lock | 1 + packages/monitor-service/yarn.deploy.lock | 1 + .../src/hooks/useRelinquishPositionVotes.ts | 1 - .../src/hooks/useVotingDelegatePositions.ts | 10 +- .../src/hooks/useVotingUndelegatePositions.ts | 8 +- .../voter-stake-registry-hooks/src/index.ts | 2 +- .../src/sdk/types.ts | 1 - .../yarn.deploy.lock | 1 + .../voter-stake-registry-sdk/package.json | 1 + .../voter-stake-registry-sdk/tsconfig.json | 3 + .../voter-stake-registry-sdk/yarn.deploy.lock | 160 ++++++++++++++++++ .../vsr-metadata-service/yarn.deploy.lock | 1 + packages/xnft-hotspot/yarn.deploy.lock | 1 + tests/voter-stake-registry.ts | 2 +- yarn.lock | 1 + 27 files changed, 669 insertions(+), 15 deletions(-) diff --git a/Anchor.toml b/Anchor.toml index c1bf84e6e..49690f270 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -77,7 +77,7 @@ address = "propFYxqmVcufMhk5esNMrexq2ogHbbC2kP9PU1qxKs" # Proposal address = "66t3XARU6Ja3zj91gDZ2KoNLJHEMTYPSKqJWYb6PJJBA" # Proposal IDL [[test.validator.clone]] -address = "nde169MVKXLYbtDbrTF8wiJc8KYJRvLXKAzHApZ5vvD" # NFT Delegation +address = "nprx42sXf5rpVnwBWEdRg1d8tuCWsTuVLys1pRWwE6p" # NFT Proxy [[test.validator.clone]] address = "5612ANVGVnwJRuvKJ1uSmky3A2mCfFDAi6DaK9xoZRp9" # NFT Delegation IDL diff --git a/packages/crons/yarn.deploy.lock b/packages/crons/yarn.deploy.lock index 901472c7e..b535861ca 100644 --- a/packages/crons/yarn.deploy.lock +++ b/packages/crons/yarn.deploy.lock @@ -535,6 +535,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/data-credits-sdk/yarn.deploy.lock b/packages/data-credits-sdk/yarn.deploy.lock index 50d60baf1..e124f5d9a 100644 --- a/packages/data-credits-sdk/yarn.deploy.lock +++ b/packages/data-credits-sdk/yarn.deploy.lock @@ -67,6 +67,28 @@ __metadata: languageName: node linkType: hard +"@helium/account-fetch-cache@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" + dependencies: + "@solana/web3.js": ^1.78.8 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + +"@helium/address@npm:^4.10.2": + version: 4.10.2 + resolution: "@helium/address@npm:4.10.2" + dependencies: + bs58: "npm:^5.0.0" + js-sha256: "npm:^0.9.0" + multiformats: "npm:^9.6.4" + checksum: 4d83df57c638ed1496a92241a2f45da671e11b6397f02ab65c5281cbd1a435548e7ffd5be969d8d214b5af045e9be4bdd2d89f41744289c17e6410d458b03bcc + languageName: node + linkType: hard + "@helium/anchor-resolvers@^0.7.6": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" @@ -183,6 +205,28 @@ __metadata: languageName: node linkType: hard +"@helium/spl-utils@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/spl-utils@workspace:packages/spl-utils" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/account-fetch-cache": ^0.7.6 + "@helium/address": ^4.10.2 + "@helium/anchor-resolvers": ^0.7.6 + "@metaplex-foundation/mpl-token-metadata": ^2.10.0 + "@solana/spl-account-compression": ^0.1.7 + "@solana/spl-token": ^0.3.8 + "@solana/web3.js": ^1.78.8 + axios: ^1.5.0 + bn.js: ^5.2.0 + borsh: ^0.7.0 + bs58: ^4.0.1 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + "@helium/treasury-management-sdk@^0.7.6": version: 0.0.0-use.local resolution: "@helium/treasury-management-sdk@workspace:packages/treasury-management-sdk" @@ -208,6 +252,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -371,6 +416,22 @@ __metadata: languageName: node linkType: hard +"@solana/spl-account-compression@npm:^0.1.7": + version: 0.1.10 + resolution: "@solana/spl-account-compression@npm:0.1.10" + dependencies: + "@metaplex-foundation/beet": "npm:^0.7.1" + "@metaplex-foundation/beet-solana": "npm:^0.4.0" + bn.js: "npm:^5.2.1" + borsh: "npm:^0.7.0" + js-sha3: "npm:^0.8.0" + typescript-collections: "npm:^1.3.3" + peerDependencies: + "@solana/web3.js": ^1.50.1 + checksum: 99bd851933c46a068dbd13484770edd7ae12488b1474ee2e9d7dfd114087f3f9f813745795f91278142fbeb09aec1024f74ef2d2c8be2b47f1df319d37f0af11 + languageName: node + linkType: hard + "@solana/spl-token@npm:^0.3.6, @solana/spl-token@npm:^0.3.8": version: 0.3.8 resolution: "@solana/spl-token@npm:0.3.8" @@ -628,6 +689,24 @@ __metadata: languageName: node linkType: hard +"asynckit@npm:^0.4.0": + version: 0.4.0 + resolution: "asynckit@npm:0.4.0" + checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be + languageName: node + linkType: hard + +"axios@npm:^1.5.0": + version: 1.5.0 + resolution: "axios@npm:1.5.0" + dependencies: + follow-redirects: "npm:^1.15.0" + form-data: "npm:^4.0.0" + proxy-from-env: "npm:^1.1.0" + checksum: e7405a5dbbea97760d0e6cd58fecba311b0401ddb4a8efbc4108f5537da9b3f278bde566deb777935a960beec4fa18e7b8353881f2f465e4f2c0e949fead35be + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -851,6 +930,15 @@ __metadata: languageName: node linkType: hard +"combined-stream@npm:^1.0.8": + version: 1.0.8 + resolution: "combined-stream@npm:1.0.8" + dependencies: + delayed-stream: "npm:~1.0.0" + checksum: 49fa4aeb4916567e33ea81d088f6584749fc90c7abec76fd516bf1c5aa5c79f3584b5ba3de6b86d26ddd64bae5329c4c7479343250cfe71c75bb366eae53bb7c + languageName: node + linkType: hard + "commander@npm:^2.20.3": version: 2.20.3 resolution: "commander@npm:2.20.3" @@ -932,6 +1020,13 @@ __metadata: languageName: node linkType: hard +"delayed-stream@npm:~1.0.0": + version: 1.0.0 + resolution: "delayed-stream@npm:1.0.0" + checksum: 46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020 + languageName: node + linkType: hard + "delegates@npm:^1.0.0": version: 1.0.0 resolution: "delegates@npm:1.0.0" @@ -1070,6 +1165,16 @@ __metadata: languageName: node linkType: hard +"follow-redirects@npm:^1.15.0": + version: 1.15.2 + resolution: "follow-redirects@npm:1.15.2" + peerDependenciesMeta: + debug: + optional: true + checksum: faa66059b66358ba65c234c2f2a37fcec029dc22775f35d9ad6abac56003268baf41e55f9ee645957b32c7d9f62baf1f0b906e68267276f54ec4b4c597c2b190 + languageName: node + linkType: hard + "foreground-child@npm:^3.1.0": version: 3.1.1 resolution: "foreground-child@npm:3.1.1" @@ -1080,6 +1185,17 @@ __metadata: languageName: node linkType: hard +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" + dependencies: + asynckit: "npm:^0.4.0" + combined-stream: "npm:^1.0.8" + mime-types: "npm:^2.1.12" + checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -1350,6 +1466,13 @@ __metadata: languageName: node linkType: hard +"js-sha3@npm:^0.8.0": + version: 0.8.0 + resolution: "js-sha3@npm:0.8.0" + checksum: 75df77c1fc266973f06cce8309ce010e9e9f07ec35ab12022ed29b7f0d9c8757f5a73e1b35aa24840dced0dea7059085aa143d817aea9e188e2a80d569d9adce + languageName: node + linkType: hard + "json-stringify-safe@npm:^5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" @@ -1436,6 +1559,22 @@ __metadata: languageName: node linkType: hard +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f + languageName: node + linkType: hard + +"mime-types@npm:^2.1.12": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: "npm:1.52.0" + checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836 + languageName: node + linkType: hard + "minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -1561,6 +1700,13 @@ __metadata: languageName: node linkType: hard +"multiformats@npm:^9.6.4": + version: 9.9.0 + resolution: "multiformats@npm:9.9.0" + checksum: d3e8c1be400c09a014f557ea02251a2710dbc9fca5aa32cc702ff29f636c5471e17979f30bdcb0a9cbb556f162a8591dc2e1219c24fc21394a56115b820bb84e + languageName: node + linkType: hard + "negotiator@npm:^0.6.3": version: 0.6.3 resolution: "negotiator@npm:0.6.3" @@ -1713,6 +1859,13 @@ __metadata: languageName: node linkType: hard +"proxy-from-env@npm:^1.1.0": + version: 1.1.0 + resolution: "proxy-from-env@npm:1.1.0" + checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4 + languageName: node + linkType: hard + "readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" @@ -2067,6 +2220,13 @@ __metadata: languageName: node linkType: hard +"typescript-collections@npm:^1.3.3": + version: 1.3.3 + resolution: "typescript-collections@npm:1.3.3" + checksum: a27f07dffdfe8407c4302eedb3e578b1360de783626cbd53519bd9c7943293a2940ed1ec3004cafae9dce049768b143185a36ca812d0d5c3c0f621a289239633 + languageName: node + linkType: hard + "typescript@npm:^5.2.2": version: 5.2.2 resolution: "typescript@npm:5.2.2" diff --git a/packages/distributor-oracle/yarn.deploy.lock b/packages/distributor-oracle/yarn.deploy.lock index 7daf1b354..ad731329c 100644 --- a/packages/distributor-oracle/yarn.deploy.lock +++ b/packages/distributor-oracle/yarn.deploy.lock @@ -413,6 +413,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/entity-invalidator/yarn.deploy.lock b/packages/entity-invalidator/yarn.deploy.lock index 289151875..31ff694bb 100644 --- a/packages/entity-invalidator/yarn.deploy.lock +++ b/packages/entity-invalidator/yarn.deploy.lock @@ -327,6 +327,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-admin-cli/yarn.deploy.lock b/packages/helium-admin-cli/yarn.deploy.lock index 4e41fe617..90ce00c0a 100644 --- a/packages/helium-admin-cli/yarn.deploy.lock +++ b/packages/helium-admin-cli/yarn.deploy.lock @@ -566,6 +566,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-entity-manager-sdk/yarn.deploy.lock b/packages/helium-entity-manager-sdk/yarn.deploy.lock index 72a6dcd56..96b29a828 100644 --- a/packages/helium-entity-manager-sdk/yarn.deploy.lock +++ b/packages/helium-entity-manager-sdk/yarn.deploy.lock @@ -296,6 +296,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-sub-daos-sdk/yarn.deploy.lock b/packages/helium-sub-daos-sdk/yarn.deploy.lock index 200910e79..b709eb30a 100644 --- a/packages/helium-sub-daos-sdk/yarn.deploy.lock +++ b/packages/helium-sub-daos-sdk/yarn.deploy.lock @@ -67,6 +67,28 @@ __metadata: languageName: node linkType: hard +"@helium/account-fetch-cache@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" + dependencies: + "@solana/web3.js": ^1.78.8 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + +"@helium/address@npm:^4.10.2": + version: 4.10.2 + resolution: "@helium/address@npm:4.10.2" + dependencies: + bs58: "npm:^5.0.0" + js-sha256: "npm:^0.9.0" + multiformats: "npm:^9.6.4" + checksum: 4d83df57c638ed1496a92241a2f45da671e11b6397f02ab65c5281cbd1a435548e7ffd5be969d8d214b5af045e9be4bdd2d89f41744289c17e6410d458b03bcc + languageName: node + linkType: hard + "@helium/anchor-resolvers@^0.7.6": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" @@ -163,6 +185,28 @@ __metadata: languageName: node linkType: hard +"@helium/spl-utils@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/spl-utils@workspace:packages/spl-utils" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/account-fetch-cache": ^0.7.6 + "@helium/address": ^4.10.2 + "@helium/anchor-resolvers": ^0.7.6 + "@metaplex-foundation/mpl-token-metadata": ^2.10.0 + "@solana/spl-account-compression": ^0.1.7 + "@solana/spl-token": ^0.3.8 + "@solana/web3.js": ^1.78.8 + axios: ^1.5.0 + bn.js: ^5.2.0 + borsh: ^0.7.0 + bs58: ^4.0.1 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + "@helium/treasury-management-sdk@^0.7.6": version: 0.0.0-use.local resolution: "@helium/treasury-management-sdk@workspace:packages/treasury-management-sdk" @@ -188,6 +232,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -351,6 +396,22 @@ __metadata: languageName: node linkType: hard +"@solana/spl-account-compression@npm:^0.1.7": + version: 0.1.10 + resolution: "@solana/spl-account-compression@npm:0.1.10" + dependencies: + "@metaplex-foundation/beet": "npm:^0.7.1" + "@metaplex-foundation/beet-solana": "npm:^0.4.0" + bn.js: "npm:^5.2.1" + borsh: "npm:^0.7.0" + js-sha3: "npm:^0.8.0" + typescript-collections: "npm:^1.3.3" + peerDependencies: + "@solana/web3.js": ^1.50.1 + checksum: 99bd851933c46a068dbd13484770edd7ae12488b1474ee2e9d7dfd114087f3f9f813745795f91278142fbeb09aec1024f74ef2d2c8be2b47f1df319d37f0af11 + languageName: node + linkType: hard + "@solana/spl-token@npm:^0.3.6, @solana/spl-token@npm:^0.3.8": version: 0.3.8 resolution: "@solana/spl-token@npm:0.3.8" @@ -601,6 +662,24 @@ __metadata: languageName: node linkType: hard +"asynckit@npm:^0.4.0": + version: 0.4.0 + resolution: "asynckit@npm:0.4.0" + checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be + languageName: node + linkType: hard + +"axios@npm:^1.5.0": + version: 1.5.0 + resolution: "axios@npm:1.5.0" + dependencies: + follow-redirects: "npm:^1.15.0" + form-data: "npm:^4.0.0" + proxy-from-env: "npm:^1.1.0" + checksum: e7405a5dbbea97760d0e6cd58fecba311b0401ddb4a8efbc4108f5537da9b3f278bde566deb777935a960beec4fa18e7b8353881f2f465e4f2c0e949fead35be + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -824,6 +903,15 @@ __metadata: languageName: node linkType: hard +"combined-stream@npm:^1.0.8": + version: 1.0.8 + resolution: "combined-stream@npm:1.0.8" + dependencies: + delayed-stream: "npm:~1.0.0" + checksum: 49fa4aeb4916567e33ea81d088f6584749fc90c7abec76fd516bf1c5aa5c79f3584b5ba3de6b86d26ddd64bae5329c4c7479343250cfe71c75bb366eae53bb7c + languageName: node + linkType: hard + "commander@npm:^2.20.3": version: 2.20.3 resolution: "commander@npm:2.20.3" @@ -898,6 +986,13 @@ __metadata: languageName: node linkType: hard +"delayed-stream@npm:~1.0.0": + version: 1.0.0 + resolution: "delayed-stream@npm:1.0.0" + checksum: 46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020 + languageName: node + linkType: hard + "delegates@npm:^1.0.0": version: 1.0.0 resolution: "delegates@npm:1.0.0" @@ -1036,6 +1131,16 @@ __metadata: languageName: node linkType: hard +"follow-redirects@npm:^1.15.0": + version: 1.15.2 + resolution: "follow-redirects@npm:1.15.2" + peerDependenciesMeta: + debug: + optional: true + checksum: faa66059b66358ba65c234c2f2a37fcec029dc22775f35d9ad6abac56003268baf41e55f9ee645957b32c7d9f62baf1f0b906e68267276f54ec4b4c597c2b190 + languageName: node + linkType: hard + "foreground-child@npm:^3.1.0": version: 3.1.1 resolution: "foreground-child@npm:3.1.1" @@ -1046,6 +1151,17 @@ __metadata: languageName: node linkType: hard +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" + dependencies: + asynckit: "npm:^0.4.0" + combined-stream: "npm:^1.0.8" + mime-types: "npm:^2.1.12" + checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -1316,6 +1432,13 @@ __metadata: languageName: node linkType: hard +"js-sha3@npm:^0.8.0": + version: 0.8.0 + resolution: "js-sha3@npm:0.8.0" + checksum: 75df77c1fc266973f06cce8309ce010e9e9f07ec35ab12022ed29b7f0d9c8757f5a73e1b35aa24840dced0dea7059085aa143d817aea9e188e2a80d569d9adce + languageName: node + linkType: hard + "json-stringify-safe@npm:^5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" @@ -1402,6 +1525,22 @@ __metadata: languageName: node linkType: hard +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f + languageName: node + linkType: hard + +"mime-types@npm:^2.1.12": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: "npm:1.52.0" + checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836 + languageName: node + linkType: hard + "minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -1527,6 +1666,13 @@ __metadata: languageName: node linkType: hard +"multiformats@npm:^9.6.4": + version: 9.9.0 + resolution: "multiformats@npm:9.9.0" + checksum: d3e8c1be400c09a014f557ea02251a2710dbc9fca5aa32cc702ff29f636c5471e17979f30bdcb0a9cbb556f162a8591dc2e1219c24fc21394a56115b820bb84e + languageName: node + linkType: hard + "negotiator@npm:^0.6.3": version: 0.6.3 resolution: "negotiator@npm:0.6.3" @@ -1679,6 +1825,13 @@ __metadata: languageName: node linkType: hard +"proxy-from-env@npm:^1.1.0": + version: 1.1.0 + resolution: "proxy-from-env@npm:1.1.0" + checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4 + languageName: node + linkType: hard + "readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" @@ -2033,6 +2186,13 @@ __metadata: languageName: node linkType: hard +"typescript-collections@npm:^1.3.3": + version: 1.3.3 + resolution: "typescript-collections@npm:1.3.3" + checksum: a27f07dffdfe8407c4302eedb3e578b1360de783626cbd53519bd9c7943293a2940ed1ec3004cafae9dce049768b143185a36ca812d0d5c3c0f621a289239633 + languageName: node + linkType: hard + "typescript@npm:^5.2.2": version: 5.2.2 resolution: "typescript@npm:5.2.2" diff --git a/packages/hexboosting-sdk/yarn.deploy.lock b/packages/hexboosting-sdk/yarn.deploy.lock index bb29fd2a7..a89c59db0 100644 --- a/packages/hexboosting-sdk/yarn.deploy.lock +++ b/packages/hexboosting-sdk/yarn.deploy.lock @@ -67,6 +67,28 @@ __metadata: languageName: node linkType: hard +"@helium/account-fetch-cache@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" + dependencies: + "@solana/web3.js": ^1.78.8 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + +"@helium/address@npm:^4.10.2": + version: 4.10.2 + resolution: "@helium/address@npm:4.10.2" + dependencies: + bs58: "npm:^5.0.0" + js-sha256: "npm:^0.9.0" + multiformats: "npm:^9.6.4" + checksum: 4d83df57c638ed1496a92241a2f45da671e11b6397f02ab65c5281cbd1a435548e7ffd5be969d8d214b5af045e9be4bdd2d89f41744289c17e6410d458b03bcc + languageName: node + linkType: hard + "@helium/anchor-resolvers@^0.7.6": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" @@ -180,6 +202,28 @@ __metadata: languageName: node linkType: hard +"@helium/spl-utils@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/spl-utils@workspace:packages/spl-utils" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/account-fetch-cache": ^0.7.6 + "@helium/address": ^4.10.2 + "@helium/anchor-resolvers": ^0.7.6 + "@metaplex-foundation/mpl-token-metadata": ^2.10.0 + "@solana/spl-account-compression": ^0.1.7 + "@solana/spl-token": ^0.3.8 + "@solana/web3.js": ^1.78.8 + axios: ^1.5.0 + bn.js: ^5.2.0 + borsh: ^0.7.0 + bs58: ^4.0.1 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + "@helium/treasury-management-sdk@^0.7.6": version: 0.0.0-use.local resolution: "@helium/treasury-management-sdk@workspace:packages/treasury-management-sdk" @@ -205,6 +249,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -368,6 +413,22 @@ __metadata: languageName: node linkType: hard +"@solana/spl-account-compression@npm:^0.1.7": + version: 0.1.10 + resolution: "@solana/spl-account-compression@npm:0.1.10" + dependencies: + "@metaplex-foundation/beet": "npm:^0.7.1" + "@metaplex-foundation/beet-solana": "npm:^0.4.0" + bn.js: "npm:^5.2.1" + borsh: "npm:^0.7.0" + js-sha3: "npm:^0.8.0" + typescript-collections: "npm:^1.3.3" + peerDependencies: + "@solana/web3.js": ^1.50.1 + checksum: 99bd851933c46a068dbd13484770edd7ae12488b1474ee2e9d7dfd114087f3f9f813745795f91278142fbeb09aec1024f74ef2d2c8be2b47f1df319d37f0af11 + languageName: node + linkType: hard + "@solana/spl-token@npm:^0.3.6, @solana/spl-token@npm:^0.3.8": version: 0.3.8 resolution: "@solana/spl-token@npm:0.3.8" @@ -618,6 +679,24 @@ __metadata: languageName: node linkType: hard +"asynckit@npm:^0.4.0": + version: 0.4.0 + resolution: "asynckit@npm:0.4.0" + checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be + languageName: node + linkType: hard + +"axios@npm:^1.5.0": + version: 1.5.0 + resolution: "axios@npm:1.5.0" + dependencies: + follow-redirects: "npm:^1.15.0" + form-data: "npm:^4.0.0" + proxy-from-env: "npm:^1.1.0" + checksum: e7405a5dbbea97760d0e6cd58fecba311b0401ddb4a8efbc4108f5537da9b3f278bde566deb777935a960beec4fa18e7b8353881f2f465e4f2c0e949fead35be + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -841,6 +920,15 @@ __metadata: languageName: node linkType: hard +"combined-stream@npm:^1.0.8": + version: 1.0.8 + resolution: "combined-stream@npm:1.0.8" + dependencies: + delayed-stream: "npm:~1.0.0" + checksum: 49fa4aeb4916567e33ea81d088f6584749fc90c7abec76fd516bf1c5aa5c79f3584b5ba3de6b86d26ddd64bae5329c4c7479343250cfe71c75bb366eae53bb7c + languageName: node + linkType: hard + "commander@npm:^2.20.3": version: 2.20.3 resolution: "commander@npm:2.20.3" @@ -915,6 +1003,13 @@ __metadata: languageName: node linkType: hard +"delayed-stream@npm:~1.0.0": + version: 1.0.0 + resolution: "delayed-stream@npm:1.0.0" + checksum: 46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020 + languageName: node + linkType: hard + "delegates@npm:^1.0.0": version: 1.0.0 resolution: "delegates@npm:1.0.0" @@ -1053,6 +1148,16 @@ __metadata: languageName: node linkType: hard +"follow-redirects@npm:^1.15.0": + version: 1.15.2 + resolution: "follow-redirects@npm:1.15.2" + peerDependenciesMeta: + debug: + optional: true + checksum: faa66059b66358ba65c234c2f2a37fcec029dc22775f35d9ad6abac56003268baf41e55f9ee645957b32c7d9f62baf1f0b906e68267276f54ec4b4c597c2b190 + languageName: node + linkType: hard + "foreground-child@npm:^3.1.0": version: 3.1.1 resolution: "foreground-child@npm:3.1.1" @@ -1063,6 +1168,17 @@ __metadata: languageName: node linkType: hard +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" + dependencies: + asynckit: "npm:^0.4.0" + combined-stream: "npm:^1.0.8" + mime-types: "npm:^2.1.12" + checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -1333,6 +1449,13 @@ __metadata: languageName: node linkType: hard +"js-sha3@npm:^0.8.0": + version: 0.8.0 + resolution: "js-sha3@npm:0.8.0" + checksum: 75df77c1fc266973f06cce8309ce010e9e9f07ec35ab12022ed29b7f0d9c8757f5a73e1b35aa24840dced0dea7059085aa143d817aea9e188e2a80d569d9adce + languageName: node + linkType: hard + "json-stringify-safe@npm:^5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" @@ -1419,6 +1542,22 @@ __metadata: languageName: node linkType: hard +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f + languageName: node + linkType: hard + +"mime-types@npm:^2.1.12": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: "npm:1.52.0" + checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836 + languageName: node + linkType: hard + "minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -1544,6 +1683,13 @@ __metadata: languageName: node linkType: hard +"multiformats@npm:^9.6.4": + version: 9.9.0 + resolution: "multiformats@npm:9.9.0" + checksum: d3e8c1be400c09a014f557ea02251a2710dbc9fca5aa32cc702ff29f636c5471e17979f30bdcb0a9cbb556f162a8591dc2e1219c24fc21394a56115b820bb84e + languageName: node + linkType: hard + "negotiator@npm:^0.6.3": version: 0.6.3 resolution: "negotiator@npm:0.6.3" @@ -1696,6 +1842,13 @@ __metadata: languageName: node linkType: hard +"proxy-from-env@npm:^1.1.0": + version: 1.1.0 + resolution: "proxy-from-env@npm:1.1.0" + checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4 + languageName: node + linkType: hard + "readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" @@ -2050,6 +2203,13 @@ __metadata: languageName: node linkType: hard +"typescript-collections@npm:^1.3.3": + version: 1.3.3 + resolution: "typescript-collections@npm:1.3.3" + checksum: a27f07dffdfe8407c4302eedb3e578b1360de783626cbd53519bd9c7943293a2940ed1ec3004cafae9dce049768b143185a36ca812d0d5c3c0f621a289239633 + languageName: node + linkType: hard + "typescript@npm:^5.2.2": version: 5.2.2 resolution: "typescript@npm:5.2.2" diff --git a/packages/hotspot-utils/yarn.deploy.lock b/packages/hotspot-utils/yarn.deploy.lock index 3f4401cbd..a3617b4aa 100644 --- a/packages/hotspot-utils/yarn.deploy.lock +++ b/packages/hotspot-utils/yarn.deploy.lock @@ -310,6 +310,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/metadata-service/yarn.deploy.lock b/packages/metadata-service/yarn.deploy.lock index 96317ae71..42b002684 100644 --- a/packages/metadata-service/yarn.deploy.lock +++ b/packages/metadata-service/yarn.deploy.lock @@ -424,6 +424,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/migration-service/yarn.deploy.lock b/packages/migration-service/yarn.deploy.lock index 39615dc75..f4416c366 100644 --- a/packages/migration-service/yarn.deploy.lock +++ b/packages/migration-service/yarn.deploy.lock @@ -555,6 +555,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/mobile-entity-manager-sdk/yarn.deploy.lock b/packages/mobile-entity-manager-sdk/yarn.deploy.lock index a2b54573b..a57c99543 100644 --- a/packages/mobile-entity-manager-sdk/yarn.deploy.lock +++ b/packages/mobile-entity-manager-sdk/yarn.deploy.lock @@ -314,6 +314,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/monitor-service/yarn.deploy.lock b/packages/monitor-service/yarn.deploy.lock index 964cd28c5..2ca0c3eac 100644 --- a/packages/monitor-service/yarn.deploy.lock +++ b/packages/monitor-service/yarn.deploy.lock @@ -440,6 +440,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishPositionVotes.ts b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishPositionVotes.ts index 569a842fb..17be65f0e 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishPositionVotes.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishPositionVotes.ts @@ -93,7 +93,6 @@ export const useRelinquishPositionVotes = () => { proposal: marker.proposal, voter: provider.wallet.publicKey, position: position.pubkey, - refund: provider.wallet.publicKey, }) .instruction(); }) diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts index 3bb6d27be..eee791c89 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts @@ -47,16 +47,18 @@ export const useVotingDelegatePositions = () => { }) .prepare(); // Don't delegate where there's already a delegation. - if ((await provider.connection.getAccountInfo(nextDelegation!))) { - throw new Error("Recipient wallet is already a proxy to this position") + if (await provider.connection.getAccountInfo(nextDelegation!)) { + throw new Error( + "Recipient wallet is already a proxy to this position" + ); } else { instructions.push(instruction); } } - await batchParallelInstructions(provider, instructions); + await batchParallelInstructions({ provider, instructions }); // Wait a couple seconds for changes to hit pg-sink - setTimeout(refetch, 2 * 1000) + setTimeout(refetch, 2 * 1000); } } ); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts index 47cce487d..acb1c55ae 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts @@ -1,10 +1,6 @@ import { Program } from "@coral-xyz/anchor"; import { PROGRAM_ID, delegationKey, init } from "@helium/nft-delegation-sdk"; -import { - batchLinearInstructions, - sendInstructions, - truthy, -} from "@helium/spl-utils"; +import { truthy, batchParallelInstructions } from "@helium/spl-utils"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; @@ -82,7 +78,7 @@ export const useVotingUndelegatePositions = () => { ).filter(truthy) ); } - await batchLinearInstructions(provider, instructions); + await batchParallelInstructions({ provider, instructions }); // Wait a couple seconds for changes to hit pg-sink setTimeout(refetch, 2 * 1000); } diff --git a/packages/voter-stake-registry-hooks/src/index.ts b/packages/voter-stake-registry-hooks/src/index.ts index 0bd0a2d44..712814bd8 100644 --- a/packages/voter-stake-registry-hooks/src/index.ts +++ b/packages/voter-stake-registry-hooks/src/index.ts @@ -24,7 +24,7 @@ export * from "./sdk/types"; export { useVotingDelegatePositions } from "./hooks/useVotingDelegatePositions"; export { useVotingUndelegatePositions } from "./hooks/useVotingUndelegatePositions"; export { useVotingDelegatedTo } from "./hooks/useVotingDelegatedTo" -export { getRegistrarKey, getPositionKeys } from "./utils/getPositionKeys"; +export { getPositionKeys } from "./utils/getPositionKeys"; export { getSubDaos } from "./utils/getSubDaos"; export { useVoteMarkers } from "./hooks/useVoteMarkers"; export { useVote } from "./hooks/useVote"; diff --git a/packages/voter-stake-registry-hooks/src/sdk/types.ts b/packages/voter-stake-registry-hooks/src/sdk/types.ts index 3d2f39338..ad9f522e4 100644 --- a/packages/voter-stake-registry-hooks/src/sdk/types.ts +++ b/packages/voter-stake-registry-hooks/src/sdk/types.ts @@ -2,7 +2,6 @@ import { BN, IdlAccounts, IdlTypes } from '@coral-xyz/anchor' import { HeliumSubDaos } from '@helium/idls/lib/types/helium_sub_daos' import { VoterStakeRegistry as HeliumVoterStakeRegistry } from '@helium/idls/lib/types/voter_stake_registry' import { NftDelegation } from '@helium/modular-governance-idls/lib/types/nft_delegation' -import { Sft } from '@metaplex-foundation/js' import { PublicKey } from '@solana/web3.js' export type VotingMintConfig = IdlTypes['VotingMintConfigV0'] diff --git a/packages/voter-stake-registry-hooks/yarn.deploy.lock b/packages/voter-stake-registry-hooks/yarn.deploy.lock index 1c943809e..b84657f32 100644 --- a/packages/voter-stake-registry-hooks/yarn.deploy.lock +++ b/packages/voter-stake-registry-hooks/yarn.deploy.lock @@ -406,6 +406,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/voter-stake-registry-sdk/package.json b/packages/voter-stake-registry-sdk/package.json index 6b1f2aeb1..513b1990d 100644 --- a/packages/voter-stake-registry-sdk/package.json +++ b/packages/voter-stake-registry-sdk/package.json @@ -35,6 +35,7 @@ "@helium/anchor-resolvers": "^0.7.6", "@helium/idls": "^0.7.6", "@helium/nft-delegation-sdk": "0.0.8-next.12+f1b0c8c", + "@helium/spl-utils": "^0.7.6", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", "bn.js": "^5.2.0", diff --git a/packages/voter-stake-registry-sdk/tsconfig.json b/packages/voter-stake-registry-sdk/tsconfig.json index 9e1a89a8e..baa4e028a 100644 --- a/packages/voter-stake-registry-sdk/tsconfig.json +++ b/packages/voter-stake-registry-sdk/tsconfig.json @@ -4,6 +4,9 @@ { "path": "../idls" }, + { + "path": "../spl-utils" + }, { "path": "../anchor-resolvers" }, diff --git a/packages/voter-stake-registry-sdk/yarn.deploy.lock b/packages/voter-stake-registry-sdk/yarn.deploy.lock index 94fe4e107..ebe0f5251 100644 --- a/packages/voter-stake-registry-sdk/yarn.deploy.lock +++ b/packages/voter-stake-registry-sdk/yarn.deploy.lock @@ -67,6 +67,28 @@ __metadata: languageName: node linkType: hard +"@helium/account-fetch-cache@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" + dependencies: + "@solana/web3.js": ^1.78.8 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + +"@helium/address@npm:^4.10.2": + version: 4.10.2 + resolution: "@helium/address@npm:4.10.2" + dependencies: + bs58: "npm:^5.0.0" + js-sha256: "npm:^0.9.0" + multiformats: "npm:^9.6.4" + checksum: 4d83df57c638ed1496a92241a2f45da671e11b6397f02ab65c5281cbd1a435548e7ffd5be969d8d214b5af045e9be4bdd2d89f41744289c17e6410d458b03bcc + languageName: node + linkType: hard + "@helium/anchor-resolvers@^0.7.6": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" @@ -129,6 +151,28 @@ __metadata: languageName: node linkType: hard +"@helium/spl-utils@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/spl-utils@workspace:packages/spl-utils" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/account-fetch-cache": ^0.7.6 + "@helium/address": ^4.10.2 + "@helium/anchor-resolvers": ^0.7.6 + "@metaplex-foundation/mpl-token-metadata": ^2.10.0 + "@solana/spl-account-compression": ^0.1.7 + "@solana/spl-token": ^0.3.8 + "@solana/web3.js": ^1.78.8 + axios: ^1.5.0 + bn.js: ^5.2.0 + borsh: ^0.7.0 + bs58: ^4.0.1 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft + "@helium/voter-stake-registry-sdk@workspace:.": version: 0.0.0-use.local resolution: "@helium/voter-stake-registry-sdk@workspace:." @@ -137,6 +181,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 @@ -300,6 +345,22 @@ __metadata: languageName: node linkType: hard +"@solana/spl-account-compression@npm:^0.1.7": + version: 0.1.10 + resolution: "@solana/spl-account-compression@npm:0.1.10" + dependencies: + "@metaplex-foundation/beet": "npm:^0.7.1" + "@metaplex-foundation/beet-solana": "npm:^0.4.0" + bn.js: "npm:^5.2.1" + borsh: "npm:^0.7.0" + js-sha3: "npm:^0.8.0" + typescript-collections: "npm:^1.3.3" + peerDependencies: + "@solana/web3.js": ^1.50.1 + checksum: 99bd851933c46a068dbd13484770edd7ae12488b1474ee2e9d7dfd114087f3f9f813745795f91278142fbeb09aec1024f74ef2d2c8be2b47f1df319d37f0af11 + languageName: node + linkType: hard + "@solana/spl-token@npm:^0.3.6, @solana/spl-token@npm:^0.3.8": version: 0.3.8 resolution: "@solana/spl-token@npm:0.3.8" @@ -550,6 +611,24 @@ __metadata: languageName: node linkType: hard +"asynckit@npm:^0.4.0": + version: 0.4.0 + resolution: "asynckit@npm:0.4.0" + checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be + languageName: node + linkType: hard + +"axios@npm:^1.5.0": + version: 1.5.0 + resolution: "axios@npm:1.5.0" + dependencies: + follow-redirects: "npm:^1.15.0" + form-data: "npm:^4.0.0" + proxy-from-env: "npm:^1.1.0" + checksum: e7405a5dbbea97760d0e6cd58fecba311b0401ddb4a8efbc4108f5537da9b3f278bde566deb777935a960beec4fa18e7b8353881f2f465e4f2c0e949fead35be + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -773,6 +852,15 @@ __metadata: languageName: node linkType: hard +"combined-stream@npm:^1.0.8": + version: 1.0.8 + resolution: "combined-stream@npm:1.0.8" + dependencies: + delayed-stream: "npm:~1.0.0" + checksum: 49fa4aeb4916567e33ea81d088f6584749fc90c7abec76fd516bf1c5aa5c79f3584b5ba3de6b86d26ddd64bae5329c4c7479343250cfe71c75bb366eae53bb7c + languageName: node + linkType: hard + "commander@npm:^2.20.3": version: 2.20.3 resolution: "commander@npm:2.20.3" @@ -847,6 +935,13 @@ __metadata: languageName: node linkType: hard +"delayed-stream@npm:~1.0.0": + version: 1.0.0 + resolution: "delayed-stream@npm:1.0.0" + checksum: 46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020 + languageName: node + linkType: hard + "delegates@npm:^1.0.0": version: 1.0.0 resolution: "delegates@npm:1.0.0" @@ -985,6 +1080,16 @@ __metadata: languageName: node linkType: hard +"follow-redirects@npm:^1.15.0": + version: 1.15.2 + resolution: "follow-redirects@npm:1.15.2" + peerDependenciesMeta: + debug: + optional: true + checksum: faa66059b66358ba65c234c2f2a37fcec029dc22775f35d9ad6abac56003268baf41e55f9ee645957b32c7d9f62baf1f0b906e68267276f54ec4b4c597c2b190 + languageName: node + linkType: hard + "foreground-child@npm:^3.1.0": version: 3.1.1 resolution: "foreground-child@npm:3.1.1" @@ -995,6 +1100,17 @@ __metadata: languageName: node linkType: hard +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" + dependencies: + asynckit: "npm:^0.4.0" + combined-stream: "npm:^1.0.8" + mime-types: "npm:^2.1.12" + checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -1265,6 +1381,13 @@ __metadata: languageName: node linkType: hard +"js-sha3@npm:^0.8.0": + version: 0.8.0 + resolution: "js-sha3@npm:0.8.0" + checksum: 75df77c1fc266973f06cce8309ce010e9e9f07ec35ab12022ed29b7f0d9c8757f5a73e1b35aa24840dced0dea7059085aa143d817aea9e188e2a80d569d9adce + languageName: node + linkType: hard + "json-stringify-safe@npm:^5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" @@ -1351,6 +1474,22 @@ __metadata: languageName: node linkType: hard +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f + languageName: node + linkType: hard + +"mime-types@npm:^2.1.12": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: "npm:1.52.0" + checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836 + languageName: node + linkType: hard + "minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -1476,6 +1615,13 @@ __metadata: languageName: node linkType: hard +"multiformats@npm:^9.6.4": + version: 9.9.0 + resolution: "multiformats@npm:9.9.0" + checksum: d3e8c1be400c09a014f557ea02251a2710dbc9fca5aa32cc702ff29f636c5471e17979f30bdcb0a9cbb556f162a8591dc2e1219c24fc21394a56115b820bb84e + languageName: node + linkType: hard + "negotiator@npm:^0.6.3": version: 0.6.3 resolution: "negotiator@npm:0.6.3" @@ -1628,6 +1774,13 @@ __metadata: languageName: node linkType: hard +"proxy-from-env@npm:^1.1.0": + version: 1.1.0 + resolution: "proxy-from-env@npm:1.1.0" + checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4 + languageName: node + linkType: hard + "readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" @@ -1982,6 +2135,13 @@ __metadata: languageName: node linkType: hard +"typescript-collections@npm:^1.3.3": + version: 1.3.3 + resolution: "typescript-collections@npm:1.3.3" + checksum: a27f07dffdfe8407c4302eedb3e578b1360de783626cbd53519bd9c7943293a2940ed1ec3004cafae9dce049768b143185a36ca812d0d5c3c0f621a289239633 + languageName: node + linkType: hard + "typescript@npm:^5.2.2": version: 5.2.2 resolution: "typescript@npm:5.2.2" diff --git a/packages/vsr-metadata-service/yarn.deploy.lock b/packages/vsr-metadata-service/yarn.deploy.lock index d70b35d9d..9b4c44e03 100644 --- a/packages/vsr-metadata-service/yarn.deploy.lock +++ b/packages/vsr-metadata-service/yarn.deploy.lock @@ -225,6 +225,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/xnft-hotspot/yarn.deploy.lock b/packages/xnft-hotspot/yarn.deploy.lock index a3aebc15d..5828c7a19 100644 --- a/packages/xnft-hotspot/yarn.deploy.lock +++ b/packages/xnft-hotspot/yarn.deploy.lock @@ -646,6 +646,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/tests/voter-stake-registry.ts b/tests/voter-stake-registry.ts index 2deae7213..8280ee276 100644 --- a/tests/voter-stake-registry.ts +++ b/tests/voter-stake-registry.ts @@ -563,7 +563,7 @@ describe("voter-stake-registry", () => { markerA = await program.account.voteMarkerV0.fetchNullable( marker! as PublicKey ); - expect(markerA).to.be.null; + expect(markerA?.choices).to.be.empty; await program.methods .voteV0({ diff --git a/yarn.lock b/yarn.lock index e9946027c..ab762637c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1764,6 +1764,7 @@ __metadata: "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 From 959dc773cb77cec245801e0ff768e8a7eda8761e Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Tue, 16 Apr 2024 09:55:34 -0500 Subject: [PATCH 015/130] Fix ts errors renaming all to proxy --- Cargo.lock | 4 +- Cargo.toml | 2 +- package.json | 6 +- .../yarn.deploy.lock | 12 +- packages/account-fetch-cache/yarn.deploy.lock | 12 +- .../yarn.deploy.lock | 63 +- packages/anchor-resolvers/yarn.deploy.lock | 12 +- packages/circuit-breaker-sdk/yarn.deploy.lock | 12 +- packages/crons/package.json | 2 +- packages/crons/yarn.deploy.lock | 38 +- packages/currency-utils/yarn.deploy.lock | 12 +- packages/data-credits-sdk/yarn.deploy.lock | 26 +- ...solana-web3.js-npm-1.78.4-a8d1cdae74.patch | 1458 ----------------- packages/distributor-oracle/yarn.deploy.lock | 26 +- packages/docsite/yarn.deploy.lock | 759 ++++----- packages/entity-invalidator/yarn.deploy.lock | 26 +- .../fanout-metadata-service/yarn.deploy.lock | 12 +- packages/fanout-sdk/yarn.deploy.lock | 12 +- packages/faucet-service/yarn.deploy.lock | 12 +- packages/helium-admin-cli/package.json | 2 +- packages/helium-admin-cli/src/create-dao.ts | 12 +- .../helium-admin-cli/src/create-subdao.ts | 12 +- .../src/set-delegation-config.ts | 12 +- packages/helium-admin-cli/yarn.deploy.lock | 28 +- .../yarn.deploy.lock | 26 +- packages/helium-react-hooks/yarn.deploy.lock | 12 +- packages/helium-sub-daos-sdk/yarn.deploy.lock | 26 +- packages/helium-vote-service/src/model.ts | 8 +- packages/helium-vote-service/yarn.deploy.lock | 12 +- packages/hexboosting-sdk/yarn.deploy.lock | 26 +- packages/hotspot-utils/yarn.deploy.lock | 26 +- packages/idls/yarn.deploy.lock | 12 +- .../lazy-distributor-sdk/yarn.deploy.lock | 12 +- .../lazy-transactions-sdk/yarn.deploy.lock | 12 +- packages/metadata-service/yarn.deploy.lock | 67 +- packages/migration-service/yarn.deploy.lock | 26 +- .../yarn.deploy.lock | 26 +- packages/monitor-service/yarn.deploy.lock | 26 +- packages/price-oracle-sdk/yarn.deploy.lock | 12 +- packages/rewards-oracle-sdk/yarn.deploy.lock | 12 +- packages/spl-utils/yarn.deploy.lock | 12 +- packages/sus/yarn.deploy.lock | 28 +- .../tokens-to-rent-service/yarn.deploy.lock | 12 +- .../treasury-management-sdk/yarn.deploy.lock | 12 +- .../voter-stake-registry-hooks/package.json | 2 +- .../src/contexts/heliumVsrContext.tsx | 49 +- ...legatePositions.ts => useAssignProxies.ts} | 48 +- .../{useDelegations.ts => useProxies.ts} | 8 +- .../src/hooks/useRelinquishVote.ts | 12 +- .../src/hooks/useUnassignProxies.ts | 114 ++ .../src/hooks/useVote.ts | 12 +- .../src/hooks/useVotingDelegatedTo.ts | 6 +- .../src/hooks/useVotingUndelegatePositions.ts | 93 -- .../voter-stake-registry-hooks/src/index.ts | 6 +- .../src/sdk/types.ts | 12 +- .../src/utils/getPositionKeys.ts | 16 +- .../yarn.deploy.lock | 36 +- .../voter-stake-registry-sdk/package.json | 2 +- .../voter-stake-registry-sdk/src/index.ts | 2 +- .../voter-stake-registry-sdk/src/resolvers.ts | 10 +- .../src/voteService.ts | 52 +- .../voter-stake-registry-sdk/yarn.deploy.lock | 26 +- .../vsr-metadata-service/yarn.deploy.lock | 26 +- packages/xnft-hotspot/yarn.deploy.lock | 26 +- programs/voter-stake-registry/Cargo.toml | 2 +- .../instructions/initialize_registrar_v0.rs | 8 +- .../src/instructions/mod.rs | 8 +- ...te_v0.rs => proxied_relinquish_vote_v0.rs} | 16 +- ...elegated_vote_v0.rs => proxied_vote_v0.rs} | 18 +- .../src/instructions/update_registrar_v0.rs | 8 +- .../src/instructions/vote_v0.rs | 2 +- programs/voter-stake-registry/src/lib.rs | 10 +- .../voter-stake-registry/src/state/marker.rs | 2 +- .../src/state/registrar.rs | 2 +- tests/utils/vsr.ts | 2 +- tests/voter-stake-registry.ts | 50 +- .../{nft-delegation => nft-proxy}/Cargo.toml | 6 +- utils/{nft-delegation => nft-proxy}/idl.json | 103 +- .../{nft-delegation => nft-proxy}/src/lib.rs | 0 yarn.lock | 916 +++++------ 80 files changed, 1550 insertions(+), 3138 deletions(-) delete mode 100644 packages/distributor-oracle/.yarn/patches/@solana-web3.js-npm-1.78.4-a8d1cdae74.patch rename packages/voter-stake-registry-hooks/src/hooks/{useVotingDelegatePositions.ts => useAssignProxies.ts} (57%) rename packages/voter-stake-registry-hooks/src/hooks/{useDelegations.ts => useProxies.ts} (53%) create mode 100644 packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts delete mode 100644 packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts rename programs/voter-stake-registry/src/instructions/{delegated_relinquish_vote_v0.rs => proxied_relinquish_vote_v0.rs} (84%) rename programs/voter-stake-registry/src/instructions/{delegated_vote_v0.rs => proxied_vote_v0.rs} (84%) rename utils/{nft-delegation => nft-proxy}/Cargo.toml (77%) rename utils/{nft-delegation => nft-proxy}/idl.json (75%) rename utils/{nft-delegation => nft-proxy}/src/lib.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 41e3481c5..529743a5e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2568,7 +2568,7 @@ dependencies = [ ] [[package]] -name = "nft-delegation" +name = "nft-proxy" version = "0.0.2" dependencies = [ "anchor-gen", @@ -5681,7 +5681,7 @@ dependencies = [ "itertools", "log", "mpl-token-metadata", - "nft-delegation", + "nft-proxy", "proposal", "serde", "shared-utils", diff --git a/Cargo.toml b/Cargo.toml index 9537394a5..85930685b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ members = [ "programs/*", "utils/proposal", - "utils/nft-delegation", + "utils/nft-proxy", ] exclude = [ diff --git a/package.json b/package.json index 414e45bb3..b968a3973 100644 --- a/package.json +++ b/package.json @@ -34,9 +34,9 @@ "@coral-xyz/anchor-cli": "^0.28.0", "@coral-xyz/borsh": "^0.2.6", "@helium/crypto": "^4.10.2", - "@helium/modular-governance-idls": "0.0.8-next.12+f1b0c8c", - "@helium/nft-delegation-sdk": "0.0.8-next.12+f1b0c8c", - "@helium/proposal-sdk": "0.0.8-next.12+f1b0c8c", + "@helium/modular-governance-idls": "0.0.8-next.16+ace2c47", + "@helium/nft-proxy-sdk": "0.0.8-next.16+ace2c47", + "@helium/proposal-sdk": "0.0.8-next.16+ace2c47", "@helium/transactions": "^3.38.0", "@metaplex-foundation/mpl-bubblegum": "^0.7.0", "@pythnetwork/client": "^2.8.0", diff --git a/packages/account-fetch-cache-hooks/yarn.deploy.lock b/packages/account-fetch-cache-hooks/yarn.deploy.lock index 0c6978899..682f9d28f 100644 --- a/packages/account-fetch-cache-hooks/yarn.deploy.lock +++ b/packages/account-fetch-cache-hooks/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -106,8 +106,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -124,7 +124,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/account-fetch-cache/yarn.deploy.lock b/packages/account-fetch-cache/yarn.deploy.lock index 74aebf738..b267139e8 100644 --- a/packages/account-fetch-cache/yarn.deploy.lock +++ b/packages/account-fetch-cache/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -90,8 +90,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -108,7 +108,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/account-postgres-sink-service/yarn.deploy.lock b/packages/account-postgres-sink-service/yarn.deploy.lock index 62b7dede4..a3ec71677 100644 --- a/packages/account-postgres-sink-service/yarn.deploy.lock +++ b/packages/account-postgres-sink-service/yarn.deploy.lock @@ -24,39 +24,39 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard "@bufbuild/protobuf@npm:^1.7.2": - version: 1.7.2 - resolution: "@bufbuild/protobuf@npm:1.7.2" - checksum: f91e2574c97a64cceba04f7e697279fee621eb76cf5d049047184e3d08bd2c52d4a7e9afbe8560cfd49948bd61a24dc9013d6ca56fc10302e948de09afd7acff + version: 1.8.0 + resolution: "@bufbuild/protobuf@npm:1.8.0" + checksum: 148755fce3cc28891a42c35a375596a3817710e2e8f4a452f034ffd988bbec1c9154135865b0b846f5f56765c93eb88cacc2f42af053925fb14f09b6a2b8c295 languageName: node linkType: hard "@connectrpc/connect-node@npm:^1.3.0": - version: 1.3.0 - resolution: "@connectrpc/connect-node@npm:1.3.0" + version: 1.4.0 + resolution: "@connectrpc/connect-node@npm:1.4.0" dependencies: - undici: ^5.28.2 + undici: ^5.28.3 peerDependencies: "@bufbuild/protobuf": ^1.4.2 - "@connectrpc/connect": 1.3.0 - checksum: 4e53cc5057b9a2fbd533e2209833881a0e27dc9079c3f56566eedf5667978436d9aaf1bb6d0509874d627dbd4491413eff8e5bad06c50ff049eed824a5a2e1e3 + "@connectrpc/connect": 1.4.0 + checksum: d13dc98d25e7321cce9969a009788874046ae9c0848922ecd2690dddc833b732fe756d486213fe0de55b1e4ae68024a45505d193ba0a927c6ec5b8a6d6a599e0 languageName: node linkType: hard "@connectrpc/connect@npm:^1.3.0": - version: 1.3.0 - resolution: "@connectrpc/connect@npm:1.3.0" + version: 1.4.0 + resolution: "@connectrpc/connect@npm:1.4.0" peerDependencies: "@bufbuild/protobuf": ^1.4.2 - checksum: a68bfffedd817a7db3563c00e5efc5eb510cc00a93c722d81fa1f52b71a96300d7175b0c0710a9d2ef2e8aaabee36921c90470a80343e7a9fbccffd3cc83f868 + checksum: 388145ea90b3216f133b34d96a47dfd0273dfa12c4b4963c7223cf45bdcbf8b3490ab234dda34fd42a7112ad9f51f22efc013f3183744a3f2ae65b825917b870 languageName: node linkType: hard @@ -116,9 +116,9 @@ __metadata: linkType: hard "@fastify/busboy@npm:^2.0.0": - version: 2.1.0 - resolution: "@fastify/busboy@npm:2.1.0" - checksum: 3233abd10f73e50668cb4bb278a79b7b3fadd30215ac6458299b0e5a09a29c3586ec07597aae6bd93f5cbedfcef43a8aeea51829cd28fc13850cdbcd324c28d5 + version: 2.1.1 + resolution: "@fastify/busboy@npm:2.1.1" + checksum: 42c32ef75e906c9a4809c1e1930a5ca6d4ddc8d138e1a8c8ba5ea07f997db32210617d23b2e4a85fe376316a41a1a0439fc6ff2dedf5126d96f45a9d80754fb2 languageName: node linkType: hard @@ -406,8 +406,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -424,7 +424,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard @@ -530,6 +530,13 @@ __metadata: languageName: node linkType: hard +"@types/luxon@npm:~3.4.0": + version: 3.4.2 + resolution: "@types/luxon@npm:3.4.2" + checksum: 6f92d5bd02e89f310395753506bcd9cef3a56f5940f7a50db2a2b9822bce753553ac767d143cb5b4f9ed5ddd4a84e64f89ff538082ceb4d18739af7781b56925 + languageName: node + linkType: hard + "@types/ms@npm:*": version: 0.7.31 resolution: "@types/ms@npm:0.7.31" @@ -1260,12 +1267,12 @@ __metadata: linkType: hard "cron@npm:^3.1.6": - version: 3.1.6 - resolution: "cron@npm:3.1.6" + version: 3.1.7 + resolution: "cron@npm:3.1.7" dependencies: - "@types/luxon": ~3.3.0 + "@types/luxon": ~3.4.0 luxon: ~3.4.0 - checksum: e97bb6f85acf3195577c609f28bbac2e22812d8632802752a13591882deceeeeefd2c91c1293fb5102ef442f96ae17ca687854fd0b005149aae9a25834363e1d + checksum: d98ee5297543c138221d96dd49270bf6576db80134e6041f4ce4a3c0cb6060863d76910209b34fee66fbf134461449ec3bd283d6a76d1c50da220cde7fc10c65 languageName: node linkType: hard @@ -4018,12 +4025,12 @@ __metadata: languageName: node linkType: hard -"undici@npm:^5.28.2": - version: 5.28.3 - resolution: "undici@npm:5.28.3" +"undici@npm:^5.28.3": + version: 5.28.4 + resolution: "undici@npm:5.28.4" dependencies: "@fastify/busboy": ^2.0.0 - checksum: fa1e65aff896c5e2ee23637b632e306f9e3a2b32a3dc0b23ea71e5555ad350bcc25713aea894b3dccc0b7dc2c5e92a5a58435ebc2033b731a5524506f573dfd2 + checksum: a8193132d84540e4dc1895ecc8dbaa176e8a49d26084d6fbe48a292e28397cd19ec5d13bc13e604484e76f94f6e334b2bdc740d5f06a6e50c44072818d0c19f9 languageName: node linkType: hard diff --git a/packages/anchor-resolvers/yarn.deploy.lock b/packages/anchor-resolvers/yarn.deploy.lock index fbac6d52b..69c221c79 100644 --- a/packages/anchor-resolvers/yarn.deploy.lock +++ b/packages/anchor-resolvers/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -157,8 +157,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -175,7 +175,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/circuit-breaker-sdk/yarn.deploy.lock b/packages/circuit-breaker-sdk/yarn.deploy.lock index 4ea3f87a0..c4d1b70c9 100644 --- a/packages/circuit-breaker-sdk/yarn.deploy.lock +++ b/packages/circuit-breaker-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -255,8 +255,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -273,7 +273,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/crons/package.json b/packages/crons/package.json index e3ee456c8..79b283eab 100644 --- a/packages/crons/package.json +++ b/packages/crons/package.json @@ -46,7 +46,7 @@ "@helium/proposal-sdk": "^0.0.8", "@helium/rewards-oracle-sdk": "^0.7.6", "@helium/spl-utils": "^0.7.6", - "@helium/state-controller-sdk": "0.0.8-next.12+f1b0c8c", + "@helium/state-controller-sdk": "0.0.8-next.16+ace2c47", "@helium/treasury-management-sdk": "^0.7.6", "@helium/voter-stake-registry-sdk": "^0.7.6", "@solana/spl-token": "^0.3.8", diff --git a/packages/crons/yarn.deploy.lock b/packages/crons/yarn.deploy.lock index b535861ca..31a0b2411 100644 --- a/packages/crons/yarn.deploy.lock +++ b/packages/crons/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -206,7 +206,7 @@ __metadata: "@helium/proposal-sdk": ^0.0.8 "@helium/rewards-oracle-sdk": ^0.7.6 "@helium/spl-utils": ^0.7.6 - "@helium/state-controller-sdk": 0.0.8-next.12+f1b0c8c + "@helium/state-controller-sdk": 0.0.8-next.16+ace2c47 "@helium/treasury-management-sdk": ^0.7.6 "@helium/voter-stake-registry-sdk": ^0.7.6 "@solana/spl-token": ^0.3.8 @@ -385,7 +385,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -395,15 +395,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -499,14 +499,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/state-controller-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/state-controller-sdk@npm:0.0.8-next.12" +"@helium/state-controller-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c - checksum: 45edd457c3b57b8c3faa3074a986f2ff6cb433ef9a8c72ac76034f394715f08b7f8bf6d8f4990344a7a0b7825192850a4cf80896b996d06dd4bc9aa32a26b241 + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + checksum: 2a7b703363f1078b428134e17f1805065e6fbcd9f7aca380c2e06b30c9e12928e1641985e1f4fdb86a17e7397dd8f0a84cbe06f4ffaae5d194900f03954ba842 languageName: node linkType: hard @@ -534,7 +534,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -789,8 +789,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -807,7 +807,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/currency-utils/yarn.deploy.lock b/packages/currency-utils/yarn.deploy.lock index 4a8bbd41b..5d1cb4d53 100644 --- a/packages/currency-utils/yarn.deploy.lock +++ b/packages/currency-utils/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -201,8 +201,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -219,7 +219,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/data-credits-sdk/yarn.deploy.lock b/packages/data-credits-sdk/yarn.deploy.lock index e124f5d9a..58bcff95e 100644 --- a/packages/data-credits-sdk/yarn.deploy.lock +++ b/packages/data-credits-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -183,7 +183,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -193,15 +193,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -251,7 +251,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -469,8 +469,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -487,7 +487,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/distributor-oracle/.yarn/patches/@solana-web3.js-npm-1.78.4-a8d1cdae74.patch b/packages/distributor-oracle/.yarn/patches/@solana-web3.js-npm-1.78.4-a8d1cdae74.patch deleted file mode 100644 index af1e0e7d5..000000000 --- a/packages/distributor-oracle/.yarn/patches/@solana-web3.js-npm-1.78.4-a8d1cdae74.patch +++ /dev/null @@ -1,1458 +0,0 @@ -diff --git a/lib/index.browser.cjs.js b/lib/index.browser.cjs.js -index 2b9ac9368f0e5ce0818320748eef15669156af05..40cc987e861f6418283d3ad97c61a2eddc5808e3 100644 ---- a/lib/index.browser.cjs.js -+++ b/lib/index.browser.cjs.js -@@ -974,6 +974,35 @@ var CompiledKeys = /*#__PURE__*/function () { - return CompiledKeys; - }(); - -+var END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly'; -+ -+/** -+ * Delegates to `Array#shift`, but throws if the array is zero-length. -+ */ -+function guardedShift(byteArray) { -+ if (byteArray.length === 0) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.shift(); -+} -+ -+/** -+ * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of -+ * the array. -+ */ -+function guardedSplice(byteArray) { -+ var _args$; -+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { -+ args[_key - 1] = arguments[_key]; -+ } -+ var start = args[0]; -+ if (args.length === 2 // Implies that `deleteCount` was supplied -+ ? start + ((_args$ = args[1]) !== null && _args$ !== void 0 ? _args$ : 0) > byteArray.length : start >= byteArray.length) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.splice.apply(byteArray, _toConsumableArray__default.default(args)); -+} -+ - /** - * An instruction to execute by a program - * -@@ -1157,32 +1186,28 @@ var Message = /*#__PURE__*/function () { - value: function from(buffer$1) { - // Slice up wire data - var byteArray = _toConsumableArray__default.default(buffer$1); -- var numRequiredSignatures = byteArray.shift(); -+ var numRequiredSignatures = guardedShift(byteArray); - if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) { - throw new Error('Versioned messages must be deserialized with VersionedMessage.deserialize()'); - } -- var numReadonlySignedAccounts = byteArray.shift(); -- var numReadonlyUnsignedAccounts = byteArray.shift(); -+ var numReadonlySignedAccounts = guardedShift(byteArray); -+ var numReadonlyUnsignedAccounts = guardedShift(byteArray); - var accountCount = decodeLength(byteArray); - var accountKeys = []; - for (var i = 0; i < accountCount; i++) { -- var account = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - accountKeys.push(new PublicKey(buffer.Buffer.from(account))); - } -- var recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - var instructionCount = decodeLength(byteArray); - var instructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var _accountCount = decodeLength(byteArray); -- var accounts = byteArray.slice(0, _accountCount); -- byteArray = byteArray.slice(_accountCount); -+ var accounts = guardedSplice(byteArray, 0, _accountCount); - var dataLength = decodeLength(byteArray); -- var dataSlice = byteArray.slice(0, dataLength); -+ var dataSlice = guardedSplice(byteArray, 0, dataLength); - var data = bs58__default.default.encode(buffer.Buffer.from(dataSlice)); -- byteArray = byteArray.slice(dataLength); - instructions.push({ - programIdIndex: programIdIndex, - accounts: accounts, -@@ -1493,30 +1518,30 @@ var MessageV0 = /*#__PURE__*/function () { - key: "deserialize", - value: function deserialize(serializedMessage) { - var byteArray = _toConsumableArray__default.default(serializedMessage); -- var prefix = byteArray.shift(); -+ var prefix = guardedShift(byteArray); - var maskedPrefix = prefix & VERSION_PREFIX_MASK; - assert(prefix !== maskedPrefix, "Expected versioned message but received legacy message"); - var version = maskedPrefix; - assert(version === 0, "Expected versioned message with version 0 but found version ".concat(version)); - var header = { -- numRequiredSignatures: byteArray.shift(), -- numReadonlySignedAccounts: byteArray.shift(), -- numReadonlyUnsignedAccounts: byteArray.shift() -+ numRequiredSignatures: guardedShift(byteArray), -+ numReadonlySignedAccounts: guardedShift(byteArray), -+ numReadonlyUnsignedAccounts: guardedShift(byteArray) - }; - var staticAccountKeys = []; - var staticAccountKeysLength = decodeLength(byteArray); - for (var i = 0; i < staticAccountKeysLength; i++) { -- staticAccountKeys.push(new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH))); -+ staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH))); - } -- var recentBlockhash = bs58__default.default.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var recentBlockhash = bs58__default.default.encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var instructionCount = decodeLength(byteArray); - var compiledInstructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var accountKeyIndexesLength = decodeLength(byteArray); -- var accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength); -+ var accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength); - var dataLength = decodeLength(byteArray); -- var data = new Uint8Array(byteArray.splice(0, dataLength)); -+ var data = new Uint8Array(guardedSplice(byteArray, 0, dataLength)); - compiledInstructions.push({ - programIdIndex: programIdIndex, - accountKeyIndexes: accountKeyIndexes, -@@ -1526,11 +1551,11 @@ var MessageV0 = /*#__PURE__*/function () { - var addressTableLookupsCount = decodeLength(byteArray); - var addressTableLookups = []; - for (var _i2 = 0; _i2 < addressTableLookupsCount; _i2++) { -- var accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var writableIndexesLength = decodeLength(byteArray); -- var writableIndexes = byteArray.splice(0, writableIndexesLength); -+ var writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength); - var readonlyIndexesLength = decodeLength(byteArray); -- var readonlyIndexes = byteArray.splice(0, readonlyIndexesLength); -+ var readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength); - addressTableLookups.push({ - accountKey: accountKey, - writableIndexes: writableIndexes, -@@ -2409,8 +2434,7 @@ var Transaction = /*#__PURE__*/function () { - var signatureCount = decodeLength(byteArray); - var signatures = []; - for (var i = 0; i < signatureCount; i++) { -- var signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES); -- byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES); -+ var signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES); - signatures.push(bs58__default.default.encode(buffer.Buffer.from(signature))); - } - return Transaction.populate(Message.from(byteArray), signatures); -@@ -2665,7 +2689,7 @@ var VersionedTransaction = /*#__PURE__*/function () { - var signatures = []; - var signaturesLength = decodeLength(byteArray); - for (var i = 0; i < signaturesLength; i++) { -- signatures.push(new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES))); -+ signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES))); - } - var message = VersionedMessage.deserialize(new Uint8Array(byteArray)); - return new VersionedTransaction(message, signatures); -@@ -5977,7 +6001,7 @@ var LogsNotificationResult = superstruct.type({ - - /** @internal */ - var COMMON_HTTP_HEADERS = { -- 'solana-client': "js/".concat((_process$env$npm_pack = "0.0.0-development") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') -+ 'solana-client': "js/".concat((_process$env$npm_pack = "1.78.4") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') - }; - - /** -@@ -13290,10 +13314,8 @@ var ValidatorInfo = /*#__PURE__*/function () { - if (configKeyCount !== 2) return null; - var configKeys = []; - for (var i = 0; i < 2; i++) { -- var publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH)); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -- var isSigner = byteArray.slice(0, 1)[0] === 1; -- byteArray = byteArray.slice(1); -+ var publicKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); -+ var isSigner = guardedShift(byteArray) === 1; - configKeys.push({ - publicKey: publicKey, - isSigner: isSigner -diff --git a/lib/index.browser.cjs.js.map b/lib/index.browser.cjs.js.map -index a2efb4262ccfa8ef2848b61460be5a335c0cbe37..42c30eb841a7209a9b8ef7f95a5c5127a84f8144 100644 ---- a/lib/index.browser.cjs.js.map -+++ b/lib/index.browser.cjs.js.map -@@ -1 +1 @@ --{"version":3,"file":"index.browser.cjs.js","sources":["../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/__forks__/browser/fetch-impl.ts","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = byteArray.shift()!;\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = byteArray.shift()!;\n const numReadonlyUnsignedAccounts = byteArray.shift()!;\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift()!;\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = byteArray.slice(0, accountCount);\n byteArray = byteArray.slice(accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = byteArray.slice(0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n byteArray = byteArray.slice(dataLength);\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = byteArray.shift() as number;\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: byteArray.shift() as number,\n numReadonlySignedAccounts: byteArray.shift() as number,\n numReadonlyUnsignedAccounts: byteArray.shift() as number,\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift() as number;\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength);\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(byteArray.splice(0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = byteArray.splice(0, writableIndexesLength);\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = byteArray.splice(0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);\n byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","export const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport default globalThis.fetch;\n","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH));\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n const isSigner = byteArray.slice(0, 1)[0] === 1;\n byteArray = byteArray.slice(1);\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toBytes","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","sha256","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","blob","rustString","rsl","struct","u32","offset","_decode","bind","_encode","rslShim","str","chars","span","authorized","lockup","ns64","voteInit","u8","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","bytes","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","assert","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","Message","args","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","seq","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","byteArray","accountCount","i","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","splice","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","add","_len","items","_key","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","nu64","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","encodeDecode","bigInt","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","u64","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","number","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","fetchWithMiddleware","info","init","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","hash","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","u16","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","split","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAMO,IAAMA,kBAAkB,GAAGC,eAAO,CAACC,KAAK,CAACC,gBAAgB,CAAA;AACzD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAyB;EACnD,IAAMC,aAAa,GAAGJ,eAAO,CAACC,KAAK,CAACC,gBAAgB,EAAE,CAAA;AACtD,EAAA,IAAMG,SAAS,GAAGC,YAAY,CAACF,aAAa,CAAC,CAAA;AAC7C,EAAA,IAAMG,SAAS,GAAG,IA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_google_ignoreList":[30]} -\ No newline at end of file -+{"version":3,"file":"index.browser.cjs.js","sources":["../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/utils/guarded-array-utils.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/__forks__/browser/fetch-impl.ts","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","const END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';\n\n/**\n * Delegates to `Array#shift`, but throws if the array is zero-length.\n */\nexport function guardedShift(byteArray: T[]): T {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift() as T;\n}\n\n/**\n * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of\n * the array.\n */\nexport function guardedSplice(\n byteArray: T[],\n ...args:\n | [start: number, deleteCount?: number]\n | [start: number, deleteCount: number, ...items: T[]]\n): T[] {\n const [start] = args;\n if (\n args.length === 2 // Implies that `deleteCount` was supplied\n ? start + (args[1] ?? 0) > byteArray.length\n : start >= byteArray.length\n ) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(\n ...(args as Parameters),\n );\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = guardedShift(byteArray);\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray),\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(\n byteArray,\n 0,\n accountKeyIndexesLength,\n );\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = guardedSplice(\n byteArray,\n 0,\n writableIndexesLength,\n );\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(\n byteArray,\n 0,\n readonlyIndexesLength,\n );\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","export const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport default globalThis.fetch;\n","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\nimport {guardedShift, guardedSplice} from './utils/guarded-array-utils';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toBytes","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","sha256","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","blob","rustString","rsl","struct","u32","offset","_decode","bind","_encode","rslShim","str","chars","span","authorized","lockup","ns64","voteInit","u8","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","bytes","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","assert","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","END_OF_BUFFER_ERROR_MESSAGE","guardedShift","byteArray","guardedSplice","_args$","_len","args","_key","start","splice","Message","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","seq","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","accountCount","i","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","add","items","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","nu64","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","encodeDecode","bigInt","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","u64","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","number","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","fetchWithMiddleware","info","init","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","hash","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","u16","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","split","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAMO,IAAMA,kBAAkB,GAAGC,eAAO,CAACC,KAAK,CAACC,gBAAgB,CAAA;AACzD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAyB;EACnD,IAAMC,aAAa,GAAGJ,eAAO,CAACC,KAAK,CAACC,gBAAgB,EAAE,CAAA;AACtD,EAAA,IAAMG,SAAS,GAAGC,YAAY,CAACF,aAAa,CAAC,CAAA;AAC7C,EAAA,IAAMG,SAAS,GAAG,IAAIC,UAAU,CAAC,EAAE,CAAC,CAAA;AACpCD,EAAAA,SAAS,CAACE,GAAG,CAACL,aAAa,CAAC,CAAA;AAC5BG,EAAAA,SA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AA,MAAM,CAACha,GAAG,EAAA;AAAA3B,YAAAA,QAAA,CAAAE,IAAA,GAAA,EAAA,CAAA;AAAA,YAAA,MAAA;AAAA,WAAA;AAAA,UAAA,MACN,IAAI5C,KAAK,CAAA,kBAAA,CAAA4B,MAAA,CACM+D,SAAS,EAAA/D,WAAAA,CAAAA,CAAAA,MAAA,CAAY8V,IAAI,CAACC,SAAS,CAAC0G,MAAM,CAAC,MAChE,CAAC,CAAA;AAAA,QAAA,KAAA,EAAA;AAAA,UAAA,OAAA3b,QAAA,CAAAI,MAAA,CAAA,QAAA,EAGI6C,SAAS,CAAA,CAAA;AAAA,QAAA,KAAA,EAAA,CAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAjD,QAAA,CAAAK,IAAA,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA,EAAAZ,OAAA,CAAA,CAAA;GACjB,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAs+D,6BAAA,CAAAr9D,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA;;ACjFD;AACA;AACA;AACO,IAAMw9D,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[31]} -\ No newline at end of file -diff --git a/lib/index.browser.esm.js b/lib/index.browser.esm.js -index 0a32a9f00870b9e9444ada3202db6803e4c2ee76..d95f689084b92fe05c8a8803ee084077fb709b52 100644 ---- a/lib/index.browser.esm.js -+++ b/lib/index.browser.esm.js -@@ -932,6 +932,35 @@ var CompiledKeys = /*#__PURE__*/function () { - return CompiledKeys; - }(); - -+var END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly'; -+ -+/** -+ * Delegates to `Array#shift`, but throws if the array is zero-length. -+ */ -+function guardedShift(byteArray) { -+ if (byteArray.length === 0) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.shift(); -+} -+ -+/** -+ * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of -+ * the array. -+ */ -+function guardedSplice(byteArray) { -+ var _args$; -+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { -+ args[_key - 1] = arguments[_key]; -+ } -+ var start = args[0]; -+ if (args.length === 2 // Implies that `deleteCount` was supplied -+ ? start + ((_args$ = args[1]) !== null && _args$ !== void 0 ? _args$ : 0) > byteArray.length : start >= byteArray.length) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.splice.apply(byteArray, _toConsumableArray(args)); -+} -+ - /** - * An instruction to execute by a program - * -@@ -1115,32 +1144,28 @@ var Message = /*#__PURE__*/function () { - value: function from(buffer) { - // Slice up wire data - var byteArray = _toConsumableArray(buffer); -- var numRequiredSignatures = byteArray.shift(); -+ var numRequiredSignatures = guardedShift(byteArray); - if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) { - throw new Error('Versioned messages must be deserialized with VersionedMessage.deserialize()'); - } -- var numReadonlySignedAccounts = byteArray.shift(); -- var numReadonlyUnsignedAccounts = byteArray.shift(); -+ var numReadonlySignedAccounts = guardedShift(byteArray); -+ var numReadonlyUnsignedAccounts = guardedShift(byteArray); - var accountCount = decodeLength(byteArray); - var accountKeys = []; - for (var i = 0; i < accountCount; i++) { -- var account = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - accountKeys.push(new PublicKey(Buffer.from(account))); - } -- var recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - var instructionCount = decodeLength(byteArray); - var instructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var _accountCount = decodeLength(byteArray); -- var accounts = byteArray.slice(0, _accountCount); -- byteArray = byteArray.slice(_accountCount); -+ var accounts = guardedSplice(byteArray, 0, _accountCount); - var dataLength = decodeLength(byteArray); -- var dataSlice = byteArray.slice(0, dataLength); -+ var dataSlice = guardedSplice(byteArray, 0, dataLength); - var data = bs58.encode(Buffer.from(dataSlice)); -- byteArray = byteArray.slice(dataLength); - instructions.push({ - programIdIndex: programIdIndex, - accounts: accounts, -@@ -1451,30 +1476,30 @@ var MessageV0 = /*#__PURE__*/function () { - key: "deserialize", - value: function deserialize(serializedMessage) { - var byteArray = _toConsumableArray(serializedMessage); -- var prefix = byteArray.shift(); -+ var prefix = guardedShift(byteArray); - var maskedPrefix = prefix & VERSION_PREFIX_MASK; - assert(prefix !== maskedPrefix, "Expected versioned message but received legacy message"); - var version = maskedPrefix; - assert(version === 0, "Expected versioned message with version 0 but found version ".concat(version)); - var header = { -- numRequiredSignatures: byteArray.shift(), -- numReadonlySignedAccounts: byteArray.shift(), -- numReadonlyUnsignedAccounts: byteArray.shift() -+ numRequiredSignatures: guardedShift(byteArray), -+ numReadonlySignedAccounts: guardedShift(byteArray), -+ numReadonlyUnsignedAccounts: guardedShift(byteArray) - }; - var staticAccountKeys = []; - var staticAccountKeysLength = decodeLength(byteArray); - for (var i = 0; i < staticAccountKeysLength; i++) { -- staticAccountKeys.push(new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH))); -+ staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH))); - } -- var recentBlockhash = bs58.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var recentBlockhash = bs58.encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var instructionCount = decodeLength(byteArray); - var compiledInstructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var accountKeyIndexesLength = decodeLength(byteArray); -- var accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength); -+ var accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength); - var dataLength = decodeLength(byteArray); -- var data = new Uint8Array(byteArray.splice(0, dataLength)); -+ var data = new Uint8Array(guardedSplice(byteArray, 0, dataLength)); - compiledInstructions.push({ - programIdIndex: programIdIndex, - accountKeyIndexes: accountKeyIndexes, -@@ -1484,11 +1509,11 @@ var MessageV0 = /*#__PURE__*/function () { - var addressTableLookupsCount = decodeLength(byteArray); - var addressTableLookups = []; - for (var _i2 = 0; _i2 < addressTableLookupsCount; _i2++) { -- var accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var writableIndexesLength = decodeLength(byteArray); -- var writableIndexes = byteArray.splice(0, writableIndexesLength); -+ var writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength); - var readonlyIndexesLength = decodeLength(byteArray); -- var readonlyIndexes = byteArray.splice(0, readonlyIndexesLength); -+ var readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength); - addressTableLookups.push({ - accountKey: accountKey, - writableIndexes: writableIndexes, -@@ -2367,8 +2392,7 @@ var Transaction = /*#__PURE__*/function () { - var signatureCount = decodeLength(byteArray); - var signatures = []; - for (var i = 0; i < signatureCount; i++) { -- var signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES); -- byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES); -+ var signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES); - signatures.push(bs58.encode(Buffer.from(signature))); - } - return Transaction.populate(Message.from(byteArray), signatures); -@@ -2623,7 +2647,7 @@ var VersionedTransaction = /*#__PURE__*/function () { - var signatures = []; - var signaturesLength = decodeLength(byteArray); - for (var i = 0; i < signaturesLength; i++) { -- signatures.push(new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES))); -+ signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES))); - } - var message = VersionedMessage.deserialize(new Uint8Array(byteArray)); - return new VersionedTransaction(message, signatures); -@@ -5935,7 +5959,7 @@ var LogsNotificationResult = type({ - - /** @internal */ - var COMMON_HTTP_HEADERS = { -- 'solana-client': "js/".concat((_process$env$npm_pack = "0.0.0-development") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') -+ 'solana-client': "js/".concat((_process$env$npm_pack = "1.78.4") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') - }; - - /** -@@ -13248,10 +13272,8 @@ var ValidatorInfo = /*#__PURE__*/function () { - if (configKeyCount !== 2) return null; - var configKeys = []; - for (var i = 0; i < 2; i++) { -- var publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH)); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -- var isSigner = byteArray.slice(0, 1)[0] === 1; -- byteArray = byteArray.slice(1); -+ var publicKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); -+ var isSigner = guardedShift(byteArray) === 1; - configKeys.push({ - publicKey: publicKey, - isSigner: isSigner -diff --git a/lib/index.browser.esm.js.map b/lib/index.browser.esm.js.map -index 969fb763647d67ba6f385ab28facb834c3eaed9d..006e703f29b7a6dfae3763984b2a11f4c535d796 100644 ---- a/lib/index.browser.esm.js.map -+++ b/lib/index.browser.esm.js.map -@@ -1 +1 @@ --{"version":3,"file":"index.browser.esm.js","sources":["../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/__forks__/browser/fetch-impl.ts","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = byteArray.shift()!;\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = byteArray.shift()!;\n const numReadonlyUnsignedAccounts = byteArray.shift()!;\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift()!;\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = byteArray.slice(0, accountCount);\n byteArray = byteArray.slice(accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = byteArray.slice(0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n byteArray = byteArray.slice(dataLength);\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = byteArray.shift() as number;\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: byteArray.shift() as number,\n numReadonlySignedAccounts: byteArray.shift() as number,\n numReadonlyUnsignedAccounts: byteArray.shift() as number,\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift() as number;\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength);\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(byteArray.splice(0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = byteArray.splice(0, writableIndexesLength);\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = byteArray.splice(0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);\n byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","export const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport default globalThis.fetch;\n","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH));\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n const isSigner = byteArray.slice(0, 1)[0] === 1;\n byteArray = byteArray.slice(1);\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toBytes","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","sha256","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","blob","rustString","rsl","struct","u32","offset","_decode","bind","_encode","rslShim","str","chars","span","authorized","lockup","ns64","voteInit","u8","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","bytes","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","assert","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","Message","args","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","seq","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","byteArray","accountCount","i","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","splice","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","add","_len","items","_key","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","nu64","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","encodeDecode","bigInt","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","u64","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","number","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","fetchWithMiddleware","info","init","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","hash","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","u16","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","split","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAMO,IAAMA,kBAAkB,GAAGC,OAAO,CAACC,KAAK,CAACC,gBAAgB,CAAA;AACzD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAyB;EACnD,IAAMC,aAAa,GAAGJ,OAAO,CAACC,KAAK,CAACC,gBAAgB,EAAE,C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index.browser.esm.js","sources":["../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/utils/guarded-array-utils.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/__forks__/browser/fetch-impl.ts","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","const END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';\n\n/**\n * Delegates to `Array#shift`, but throws if the array is zero-length.\n */\nexport function guardedShift(byteArray: T[]): T {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift() as T;\n}\n\n/**\n * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of\n * the array.\n */\nexport function guardedSplice(\n byteArray: T[],\n ...args:\n | [start: number, deleteCount?: number]\n | [start: number, deleteCount: number, ...items: T[]]\n): T[] {\n const [start] = args;\n if (\n args.length === 2 // Implies that `deleteCount` was supplied\n ? start + (args[1] ?? 0) > byteArray.length\n : start >= byteArray.length\n ) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(\n ...(args as Parameters),\n );\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = guardedShift(byteArray);\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray),\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(\n byteArray,\n 0,\n accountKeyIndexesLength,\n );\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = guardedSplice(\n byteArray,\n 0,\n writableIndexesLength,\n );\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(\n byteArray,\n 0,\n readonlyIndexesLength,\n );\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","export const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport default globalThis.fetch;\n","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\nimport {guardedShift, guardedSplice} from './utils/guarded-array-utils';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toBytes","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","sha256","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","blob","rustString","rsl","struct","u32","offset","_decode","bind","_encode","rslShim","str","chars","span","authorized","lockup","ns64","voteInit","u8","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","bytes","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","assert","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","END_OF_BUFFER_ERROR_MESSAGE","guardedShift","byteArray","guardedSplice","_args$","_len","args","_key","start","splice","Message","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","seq","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","accountCount","i","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","add","items","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","nu64","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","encodeDecode","bigInt","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","u64","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","number","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","fetchWithMiddleware","info","init","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","hash","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","u16","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","split","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAMO,IAAMA,kBAAkB,GAAGC,OAAO,CAACC,KAAK,CAACC,gBAAgB,CAAA;AACzD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAyB;EACnD,IAAMC,aAAa,GAAGJ,OAAO,CAACC,KAAK,CAACC,gBAAgB,EAAE,CAAA;AACtD,EAAA,IAAMG,SAAS,GAAGC,YAAY,CAACF,aAAa,CAAC,CAAA;AAC7C,EAAA,IAAMG,SAAS,GAAG,IAAIC,UAAU,CAAC,EAAE,CAAC,CAAA;AACpCD,EAAAA,SAAS,CAACE,GAAG,CAACL,aAAa,CAAC,CAAA;AAC5BG,EAAAA,SAAS,CAACE,GAAG,CAACJ,SAAS,EAAE,EAAE,CAAC,CAAA;EAC5B,OAAO;AACLA,IAAAA,SAAS,EAATA,SA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AA3b,QAAA,CAAAI,MAAA,CAAA,QAAA,EAGI6C,SAAS,CAAA,CAAA;AAAA,QAAA,KAAA,EAAA,CAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAjD,QAAA,CAAAK,IAAA,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA,EAAAZ,OAAA,CAAA,CAAA;GACjB,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAs+D,6BAAA,CAAAr9D,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA;;ACjFD;AACA;AACA;AACO,IAAMw9D,gBAAgB,GAAG;;;;","x_google_ignoreList":[31]} -\ No newline at end of file -diff --git a/lib/index.cjs.js b/lib/index.cjs.js -index 10230e8abc99104dc07ad8b509e210f613edac96..52cca614f5a01af795ce060c0bc0cf808c38ebd4 100644 ---- a/lib/index.cjs.js -+++ b/lib/index.cjs.js -@@ -986,6 +986,35 @@ var CompiledKeys = /*#__PURE__*/function () { - return CompiledKeys; - }(); - -+var END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly'; -+ -+/** -+ * Delegates to `Array#shift`, but throws if the array is zero-length. -+ */ -+function guardedShift(byteArray) { -+ if (byteArray.length === 0) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.shift(); -+} -+ -+/** -+ * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of -+ * the array. -+ */ -+function guardedSplice(byteArray) { -+ var _args$; -+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { -+ args[_key - 1] = arguments[_key]; -+ } -+ var start = args[0]; -+ if (args.length === 2 // Implies that `deleteCount` was supplied -+ ? start + ((_args$ = args[1]) !== null && _args$ !== void 0 ? _args$ : 0) > byteArray.length : start >= byteArray.length) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.splice.apply(byteArray, _toConsumableArray__default.default(args)); -+} -+ - /** - * An instruction to execute by a program - * -@@ -1169,32 +1198,28 @@ var Message = /*#__PURE__*/function () { - value: function from(buffer$1) { - // Slice up wire data - var byteArray = _toConsumableArray__default.default(buffer$1); -- var numRequiredSignatures = byteArray.shift(); -+ var numRequiredSignatures = guardedShift(byteArray); - if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) { - throw new Error('Versioned messages must be deserialized with VersionedMessage.deserialize()'); - } -- var numReadonlySignedAccounts = byteArray.shift(); -- var numReadonlyUnsignedAccounts = byteArray.shift(); -+ var numReadonlySignedAccounts = guardedShift(byteArray); -+ var numReadonlyUnsignedAccounts = guardedShift(byteArray); - var accountCount = decodeLength(byteArray); - var accountKeys = []; - for (var i = 0; i < accountCount; i++) { -- var account = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - accountKeys.push(new PublicKey(buffer.Buffer.from(account))); - } -- var recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - var instructionCount = decodeLength(byteArray); - var instructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var _accountCount = decodeLength(byteArray); -- var accounts = byteArray.slice(0, _accountCount); -- byteArray = byteArray.slice(_accountCount); -+ var accounts = guardedSplice(byteArray, 0, _accountCount); - var dataLength = decodeLength(byteArray); -- var dataSlice = byteArray.slice(0, dataLength); -+ var dataSlice = guardedSplice(byteArray, 0, dataLength); - var data = bs58__default.default.encode(buffer.Buffer.from(dataSlice)); -- byteArray = byteArray.slice(dataLength); - instructions.push({ - programIdIndex: programIdIndex, - accounts: accounts, -@@ -1505,30 +1530,30 @@ var MessageV0 = /*#__PURE__*/function () { - key: "deserialize", - value: function deserialize(serializedMessage) { - var byteArray = _toConsumableArray__default.default(serializedMessage); -- var prefix = byteArray.shift(); -+ var prefix = guardedShift(byteArray); - var maskedPrefix = prefix & VERSION_PREFIX_MASK; - assert(prefix !== maskedPrefix, "Expected versioned message but received legacy message"); - var version = maskedPrefix; - assert(version === 0, "Expected versioned message with version 0 but found version ".concat(version)); - var header = { -- numRequiredSignatures: byteArray.shift(), -- numReadonlySignedAccounts: byteArray.shift(), -- numReadonlyUnsignedAccounts: byteArray.shift() -+ numRequiredSignatures: guardedShift(byteArray), -+ numReadonlySignedAccounts: guardedShift(byteArray), -+ numReadonlyUnsignedAccounts: guardedShift(byteArray) - }; - var staticAccountKeys = []; - var staticAccountKeysLength = decodeLength(byteArray); - for (var i = 0; i < staticAccountKeysLength; i++) { -- staticAccountKeys.push(new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH))); -+ staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH))); - } -- var recentBlockhash = bs58__default.default.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var recentBlockhash = bs58__default.default.encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var instructionCount = decodeLength(byteArray); - var compiledInstructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var accountKeyIndexesLength = decodeLength(byteArray); -- var accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength); -+ var accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength); - var dataLength = decodeLength(byteArray); -- var data = new Uint8Array(byteArray.splice(0, dataLength)); -+ var data = new Uint8Array(guardedSplice(byteArray, 0, dataLength)); - compiledInstructions.push({ - programIdIndex: programIdIndex, - accountKeyIndexes: accountKeyIndexes, -@@ -1538,11 +1563,11 @@ var MessageV0 = /*#__PURE__*/function () { - var addressTableLookupsCount = decodeLength(byteArray); - var addressTableLookups = []; - for (var _i2 = 0; _i2 < addressTableLookupsCount; _i2++) { -- var accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var writableIndexesLength = decodeLength(byteArray); -- var writableIndexes = byteArray.splice(0, writableIndexesLength); -+ var writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength); - var readonlyIndexesLength = decodeLength(byteArray); -- var readonlyIndexes = byteArray.splice(0, readonlyIndexesLength); -+ var readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength); - addressTableLookups.push({ - accountKey: accountKey, - writableIndexes: writableIndexes, -@@ -2421,8 +2446,7 @@ var Transaction = /*#__PURE__*/function () { - var signatureCount = decodeLength(byteArray); - var signatures = []; - for (var i = 0; i < signatureCount; i++) { -- var signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES); -- byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES); -+ var signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES); - signatures.push(bs58__default.default.encode(buffer.Buffer.from(signature))); - } - return Transaction.populate(Message.from(byteArray), signatures); -@@ -2677,7 +2701,7 @@ var VersionedTransaction = /*#__PURE__*/function () { - var signatures = []; - var signaturesLength = decodeLength(byteArray); - for (var i = 0; i < signaturesLength; i++) { -- signatures.push(new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES))); -+ signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES))); - } - var message = VersionedMessage.deserialize(new Uint8Array(byteArray)); - return new VersionedTransaction(message, signatures); -@@ -8288,7 +8312,7 @@ var LogsNotificationResult = superstruct.type({ - - /** @internal */ - var COMMON_HTTP_HEADERS = { -- 'solana-client': "js/".concat((_process$env$npm_pack = "0.0.0-development") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') -+ 'solana-client': "js/".concat((_process$env$npm_pack = "1.78.4") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') - }; - - /** -@@ -15601,10 +15625,8 @@ var ValidatorInfo = /*#__PURE__*/function () { - if (configKeyCount !== 2) return null; - var configKeys = []; - for (var i = 0; i < 2; i++) { -- var publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH)); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -- var isSigner = byteArray.slice(0, 1)[0] === 1; -- byteArray = byteArray.slice(1); -+ var publicKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); -+ var isSigner = guardedShift(byteArray) === 1; - configKeys.push({ - publicKey: publicKey, - isSigner: isSigner -diff --git a/lib/index.cjs.js.map b/lib/index.cjs.js.map -index 4d50b188bdd16b58ed94c24c9f5d5c239a72a469..37014697176c21a1c83ee4befda2e01be79fca91 100644 ---- a/lib/index.cjs.js.map -+++ b/lib/index.cjs.js.map -@@ -1 +1 @@ --{"version":3,"file":"index.cjs.js","sources":["../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../../../node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js","../../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js","../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js","../../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/constants.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/agent.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/https_agent.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/index.js","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/fetch-impl.ts","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = byteArray.shift()!;\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = byteArray.shift()!;\n const numReadonlyUnsignedAccounts = byteArray.shift()!;\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift()!;\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = byteArray.slice(0, accountCount);\n byteArray = byteArray.slice(accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = byteArray.slice(0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n byteArray = byteArray.slice(dataLength);\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = byteArray.shift() as number;\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: byteArray.shift() as number,\n numReadonlySignedAccounts: byteArray.shift() as number,\n numReadonlyUnsignedAccounts: byteArray.shift() as number,\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift() as number;\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength);\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(byteArray.splice(0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = byteArray.splice(0, writableIndexesLength);\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = byteArray.splice(0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);\n byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","/*!\n * humanize-ms - index.js\n * Copyright(c) 2014 dead_horse \n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module dependencies.\n */\n\nvar util = require('util');\nvar ms = require('ms');\n\nmodule.exports = function (t) {\n if (typeof t === 'number') return t;\n var r = ms(t);\n if (r === undefined) {\n var err = new Error(util.format('humanize-ms(%j) result undefined', t));\n console.warn(err.stack);\n }\n return r;\n};\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","/* eslint-env browser */\n'use strict';\n\nfunction getChromeVersion() {\n\tconst matches = /(Chrome|Chromium)\\/(?\\d+)\\./.exec(navigator.userAgent);\n\n\tif (!matches) {\n\t\treturn;\n\t}\n\n\treturn Number.parseInt(matches.groups.chromeVersion, 10);\n}\n\nconst colorSupport = getChromeVersion() >= 69 ? {\n\tlevel: 1,\n\thasBasic: true,\n\thas256: false,\n\thas16m: false\n} : false;\n\nmodule.exports = {\n\tstdout: colorSupport,\n\tstderr: colorSupport\n};\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.format(...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","/*!\n * depd\n * Copyright(c) 2014-2018 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\n\nvar relative = require('path').relative\n\n/**\n * Module exports.\n */\n\nmodule.exports = depd\n\n/**\n * Get the path to base files on.\n */\n\nvar basePath = process.cwd()\n\n/**\n * Determine if namespace is contained in the string.\n */\n\nfunction containsNamespace (str, namespace) {\n var vals = str.split(/[ ,]+/)\n var ns = String(namespace).toLowerCase()\n\n for (var i = 0; i < vals.length; i++) {\n var val = vals[i]\n\n // namespace contained\n if (val && (val === '*' || val.toLowerCase() === ns)) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * Convert a data descriptor to accessor descriptor.\n */\n\nfunction convertDataDescriptorToAccessor (obj, prop, message) {\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n var value = descriptor.value\n\n descriptor.get = function getter () { return value }\n\n if (descriptor.writable) {\n descriptor.set = function setter (val) { return (value = val) }\n }\n\n delete descriptor.value\n delete descriptor.writable\n\n Object.defineProperty(obj, prop, descriptor)\n\n return descriptor\n}\n\n/**\n * Create arguments string to keep arity.\n */\n\nfunction createArgumentsString (arity) {\n var str = ''\n\n for (var i = 0; i < arity; i++) {\n str += ', arg' + i\n }\n\n return str.substr(2)\n}\n\n/**\n * Create stack string from stack.\n */\n\nfunction createStackString (stack) {\n var str = this.name + ': ' + this.namespace\n\n if (this.message) {\n str += ' deprecated ' + this.message\n }\n\n for (var i = 0; i < stack.length; i++) {\n str += '\\n at ' + stack[i].toString()\n }\n\n return str\n}\n\n/**\n * Create deprecate for namespace in caller.\n */\n\nfunction depd (namespace) {\n if (!namespace) {\n throw new TypeError('argument namespace is required')\n }\n\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n var file = site[0]\n\n function deprecate (message) {\n // call to self as log\n log.call(deprecate, message)\n }\n\n deprecate._file = file\n deprecate._ignored = isignored(namespace)\n deprecate._namespace = namespace\n deprecate._traced = istraced(namespace)\n deprecate._warned = Object.create(null)\n\n deprecate.function = wrapfunction\n deprecate.property = wrapproperty\n\n return deprecate\n}\n\n/**\n * Determine if event emitter has listeners of a given type.\n *\n * The way to do this check is done three different ways in Node.js >= 0.8\n * so this consolidates them into a minimal set using instance methods.\n *\n * @param {EventEmitter} emitter\n * @param {string} type\n * @returns {boolean}\n * @private\n */\n\nfunction eehaslisteners (emitter, type) {\n var count = typeof emitter.listenerCount !== 'function'\n ? emitter.listeners(type).length\n : emitter.listenerCount(type)\n\n return count > 0\n}\n\n/**\n * Determine if namespace is ignored.\n */\n\nfunction isignored (namespace) {\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}\n\n/**\n * Determine if namespace is traced.\n */\n\nfunction istraced (namespace) {\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = process.env.TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}\n\n/**\n * Display deprecation message.\n */\n\nfunction log (message, site) {\n var haslisteners = eehaslisteners(process, 'deprecation')\n\n // abort early if no destination\n if (!haslisteners && this._ignored) {\n return\n }\n\n var caller\n var callFile\n var callSite\n var depSite\n var i = 0\n var seen = false\n var stack = getStack()\n var file = this._file\n\n if (site) {\n // provided site\n depSite = site\n callSite = callSiteLocation(stack[1])\n callSite.name = depSite.name\n file = callSite[0]\n } else {\n // get call site\n i = 2\n depSite = callSiteLocation(stack[i])\n callSite = depSite\n }\n\n // get caller of deprecated thing in relation to file\n for (; i < stack.length; i++) {\n caller = callSiteLocation(stack[i])\n callFile = caller[0]\n\n if (callFile === file) {\n seen = true\n } else if (callFile === this._file) {\n file = this._file\n } else if (seen) {\n break\n }\n }\n\n var key = caller\n ? depSite.join(':') + '__' + caller.join(':')\n : undefined\n\n if (key !== undefined && key in this._warned) {\n // already warned\n return\n }\n\n this._warned[key] = true\n\n // generate automatic message from call site\n var msg = message\n if (!msg) {\n msg = callSite === depSite || !callSite.name\n ? defaultMessage(depSite)\n : defaultMessage(callSite)\n }\n\n // emit deprecation if listeners exist\n if (haslisteners) {\n var err = DeprecationError(this._namespace, msg, stack.slice(i))\n process.emit('deprecation', err)\n return\n }\n\n // format and write message\n var format = process.stderr.isTTY\n ? formatColor\n : formatPlain\n var output = format.call(this, msg, caller, stack.slice(i))\n process.stderr.write(output + '\\n', 'utf8')\n}\n\n/**\n * Get call site location as array.\n */\n\nfunction callSiteLocation (callSite) {\n var file = callSite.getFileName() || ''\n var line = callSite.getLineNumber()\n var colm = callSite.getColumnNumber()\n\n if (callSite.isEval()) {\n file = callSite.getEvalOrigin() + ', ' + file\n }\n\n var site = [file, line, colm]\n\n site.callSite = callSite\n site.name = callSite.getFunctionName()\n\n return site\n}\n\n/**\n * Generate a default message from the site.\n */\n\nfunction defaultMessage (site) {\n var callSite = site.callSite\n var funcName = site.name\n\n // make useful anonymous name\n if (!funcName) {\n funcName = ''\n }\n\n var context = callSite.getThis()\n var typeName = context && callSite.getTypeName()\n\n // ignore useless type name\n if (typeName === 'Object') {\n typeName = undefined\n }\n\n // make useful type name\n if (typeName === 'Function') {\n typeName = context.name || typeName\n }\n\n return typeName && callSite.getMethodName()\n ? typeName + '.' + funcName\n : funcName\n}\n\n/**\n * Format deprecation message without color.\n */\n\nfunction formatPlain (msg, caller, stack) {\n var timestamp = new Date().toUTCString()\n\n var formatted = timestamp +\n ' ' + this._namespace +\n ' deprecated ' + msg\n\n // add stack trace\n if (this._traced) {\n for (var i = 0; i < stack.length; i++) {\n formatted += '\\n at ' + stack[i].toString()\n }\n\n return formatted\n }\n\n if (caller) {\n formatted += ' at ' + formatLocation(caller)\n }\n\n return formatted\n}\n\n/**\n * Format deprecation message with color.\n */\n\nfunction formatColor (msg, caller, stack) {\n var formatted = '\\x1b[36;1m' + this._namespace + '\\x1b[22;39m' + // bold cyan\n ' \\x1b[33;1mdeprecated\\x1b[22;39m' + // bold yellow\n ' \\x1b[0m' + msg + '\\x1b[39m' // reset\n\n // add stack trace\n if (this._traced) {\n for (var i = 0; i < stack.length; i++) {\n formatted += '\\n \\x1b[36mat ' + stack[i].toString() + '\\x1b[39m' // cyan\n }\n\n return formatted\n }\n\n if (caller) {\n formatted += ' \\x1b[36m' + formatLocation(caller) + '\\x1b[39m' // cyan\n }\n\n return formatted\n}\n\n/**\n * Format call site location.\n */\n\nfunction formatLocation (callSite) {\n return relative(basePath, callSite[0]) +\n ':' + callSite[1] +\n ':' + callSite[2]\n}\n\n/**\n * Get the stack as array of call sites.\n */\n\nfunction getStack () {\n var limit = Error.stackTraceLimit\n var obj = {}\n var prep = Error.prepareStackTrace\n\n Error.prepareStackTrace = prepareObjectStackTrace\n Error.stackTraceLimit = Math.max(10, limit)\n\n // capture the stack\n Error.captureStackTrace(obj)\n\n // slice this function off the top\n var stack = obj.stack.slice(1)\n\n Error.prepareStackTrace = prep\n Error.stackTraceLimit = limit\n\n return stack\n}\n\n/**\n * Capture call site stack from v8.\n */\n\nfunction prepareObjectStackTrace (obj, stack) {\n return stack\n}\n\n/**\n * Return a wrapped function in a deprecation message.\n */\n\nfunction wrapfunction (fn, message) {\n if (typeof fn !== 'function') {\n throw new TypeError('argument fn must be a function')\n }\n\n var args = createArgumentsString(fn.length)\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n site.name = fn.name\n\n // eslint-disable-next-line no-new-func\n var deprecatedfn = new Function('fn', 'log', 'deprecate', 'message', 'site',\n '\"use strict\"\\n' +\n 'return function (' + args + ') {' +\n 'log.call(deprecate, message, site)\\n' +\n 'return fn.apply(this, arguments)\\n' +\n '}')(fn, log, this, message, site)\n\n return deprecatedfn\n}\n\n/**\n * Wrap property in a deprecation message.\n */\n\nfunction wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}\n\n/**\n * Create DeprecationError for deprecation\n */\n\nfunction DeprecationError (namespace, message, stack) {\n var error = new Error()\n var stackString\n\n Object.defineProperty(error, 'constructor', {\n value: DeprecationError\n })\n\n Object.defineProperty(error, 'message', {\n configurable: true,\n enumerable: false,\n value: message,\n writable: true\n })\n\n Object.defineProperty(error, 'name', {\n enumerable: false,\n configurable: true,\n value: 'DeprecationError',\n writable: true\n })\n\n Object.defineProperty(error, 'namespace', {\n configurable: true,\n enumerable: false,\n value: namespace,\n writable: true\n })\n\n Object.defineProperty(error, 'stack', {\n configurable: true,\n enumerable: false,\n get: function () {\n if (stackString !== undefined) {\n return stackString\n }\n\n // prepare stack trace\n return (stackString = createStackString.call(this, stack))\n },\n set: function setter (val) {\n stackString = val\n }\n })\n\n return error\n}\n","'use strict';\n\nmodule.exports = {\n // agent\n CURRENT_ID: Symbol('agentkeepalive#currentId'),\n CREATE_ID: Symbol('agentkeepalive#createId'),\n INIT_SOCKET: Symbol('agentkeepalive#initSocket'),\n CREATE_HTTPS_CONNECTION: Symbol('agentkeepalive#createHttpsConnection'),\n // socket\n SOCKET_CREATED_TIME: Symbol('agentkeepalive#socketCreatedTime'),\n SOCKET_NAME: Symbol('agentkeepalive#socketName'),\n SOCKET_REQUEST_COUNT: Symbol('agentkeepalive#socketRequestCount'),\n SOCKET_REQUEST_FINISHED_COUNT: Symbol('agentkeepalive#socketRequestFinishedCount'),\n};\n","'use strict';\n\nconst OriginalAgent = require('http').Agent;\nconst ms = require('humanize-ms');\nconst debug = require('debug')('agentkeepalive');\nconst deprecate = require('depd')('agentkeepalive');\nconst {\n INIT_SOCKET,\n CURRENT_ID,\n CREATE_ID,\n SOCKET_CREATED_TIME,\n SOCKET_NAME,\n SOCKET_REQUEST_COUNT,\n SOCKET_REQUEST_FINISHED_COUNT,\n} = require('./constants');\n\n// OriginalAgent come from\n// - https://github.com/nodejs/node/blob/v8.12.0/lib/_http_agent.js\n// - https://github.com/nodejs/node/blob/v10.12.0/lib/_http_agent.js\n\n// node <= 10\nlet defaultTimeoutListenerCount = 1;\nconst majorVersion = parseInt(process.version.split('.', 1)[0].substring(1));\nif (majorVersion >= 11 && majorVersion <= 12) {\n defaultTimeoutListenerCount = 2;\n} else if (majorVersion >= 13) {\n defaultTimeoutListenerCount = 3;\n}\n\nclass Agent extends OriginalAgent {\n constructor(options) {\n options = options || {};\n options.keepAlive = options.keepAlive !== false;\n // default is keep-alive and 4s free socket timeout\n // see https://medium.com/ssense-tech/reduce-networking-errors-in-nodejs-23b4eb9f2d83\n if (options.freeSocketTimeout === undefined) {\n options.freeSocketTimeout = 4000;\n }\n // Legacy API: keepAliveTimeout should be rename to `freeSocketTimeout`\n if (options.keepAliveTimeout) {\n deprecate('options.keepAliveTimeout is deprecated, please use options.freeSocketTimeout instead');\n options.freeSocketTimeout = options.keepAliveTimeout;\n delete options.keepAliveTimeout;\n }\n // Legacy API: freeSocketKeepAliveTimeout should be rename to `freeSocketTimeout`\n if (options.freeSocketKeepAliveTimeout) {\n deprecate('options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead');\n options.freeSocketTimeout = options.freeSocketKeepAliveTimeout;\n delete options.freeSocketKeepAliveTimeout;\n }\n\n // Sets the socket to timeout after timeout milliseconds of inactivity on the socket.\n // By default is double free socket timeout.\n if (options.timeout === undefined) {\n // make sure socket default inactivity timeout >= 8s\n options.timeout = Math.max(options.freeSocketTimeout * 2, 8000);\n }\n\n // support humanize format\n options.timeout = ms(options.timeout);\n options.freeSocketTimeout = ms(options.freeSocketTimeout);\n options.socketActiveTTL = options.socketActiveTTL ? ms(options.socketActiveTTL) : 0;\n\n super(options);\n\n this[CURRENT_ID] = 0;\n\n // create socket success counter\n this.createSocketCount = 0;\n this.createSocketCountLastCheck = 0;\n\n this.createSocketErrorCount = 0;\n this.createSocketErrorCountLastCheck = 0;\n\n this.closeSocketCount = 0;\n this.closeSocketCountLastCheck = 0;\n\n // socket error event count\n this.errorSocketCount = 0;\n this.errorSocketCountLastCheck = 0;\n\n // request finished counter\n this.requestCount = 0;\n this.requestCountLastCheck = 0;\n\n // including free socket timeout counter\n this.timeoutSocketCount = 0;\n this.timeoutSocketCountLastCheck = 0;\n\n this.on('free', socket => {\n // https://github.com/nodejs/node/pull/32000\n // Node.js native agent will check socket timeout eqs agent.options.timeout.\n // Use the ttl or freeSocketTimeout to overwrite.\n const timeout = this.calcSocketTimeout(socket);\n if (timeout > 0 && socket.timeout !== timeout) {\n socket.setTimeout(timeout);\n }\n });\n }\n\n get freeSocketKeepAliveTimeout() {\n deprecate('agent.freeSocketKeepAliveTimeout is deprecated, please use agent.options.freeSocketTimeout instead');\n return this.options.freeSocketTimeout;\n }\n\n get timeout() {\n deprecate('agent.timeout is deprecated, please use agent.options.timeout instead');\n return this.options.timeout;\n }\n\n get socketActiveTTL() {\n deprecate('agent.socketActiveTTL is deprecated, please use agent.options.socketActiveTTL instead');\n return this.options.socketActiveTTL;\n }\n\n calcSocketTimeout(socket) {\n /**\n * return <= 0: should free socket\n * return > 0: should update socket timeout\n * return undefined: not find custom timeout\n */\n let freeSocketTimeout = this.options.freeSocketTimeout;\n const socketActiveTTL = this.options.socketActiveTTL;\n if (socketActiveTTL) {\n // check socketActiveTTL\n const aliveTime = Date.now() - socket[SOCKET_CREATED_TIME];\n const diff = socketActiveTTL - aliveTime;\n if (diff <= 0) {\n return diff;\n }\n if (freeSocketTimeout && diff < freeSocketTimeout) {\n freeSocketTimeout = diff;\n }\n }\n // set freeSocketTimeout\n if (freeSocketTimeout) {\n // set free keepalive timer\n // try to use socket custom freeSocketTimeout first, support headers['keep-alive']\n // https://github.com/node-modules/urllib/blob/b76053020923f4d99a1c93cf2e16e0c5ba10bacf/lib/urllib.js#L498\n const customFreeSocketTimeout = socket.freeSocketTimeout || socket.freeSocketKeepAliveTimeout;\n return customFreeSocketTimeout || freeSocketTimeout;\n }\n }\n\n keepSocketAlive(socket) {\n const result = super.keepSocketAlive(socket);\n // should not keepAlive, do nothing\n if (!result) return result;\n\n const customTimeout = this.calcSocketTimeout(socket);\n if (typeof customTimeout === 'undefined') {\n return true;\n }\n if (customTimeout <= 0) {\n debug('%s(requests: %s, finished: %s) free but need to destroy by TTL, request count %s, diff is %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], customTimeout);\n return false;\n }\n if (socket.timeout !== customTimeout) {\n socket.setTimeout(customTimeout);\n }\n return true;\n }\n\n // only call on addRequest\n reuseSocket(...args) {\n // reuseSocket(socket, req)\n super.reuseSocket(...args);\n const socket = args[0];\n const req = args[1];\n req.reusedSocket = true;\n const agentTimeout = this.options.timeout;\n if (getSocketTimeout(socket) !== agentTimeout) {\n // reset timeout before use\n socket.setTimeout(agentTimeout);\n debug('%s reset timeout to %sms', socket[SOCKET_NAME], agentTimeout);\n }\n socket[SOCKET_REQUEST_COUNT]++;\n debug('%s(requests: %s, finished: %s) reuse on addRequest, timeout %sms',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n getSocketTimeout(socket));\n }\n\n [CREATE_ID]() {\n const id = this[CURRENT_ID]++;\n if (this[CURRENT_ID] === Number.MAX_SAFE_INTEGER) this[CURRENT_ID] = 0;\n return id;\n }\n\n [INIT_SOCKET](socket, options) {\n // bugfix here.\n // https on node 8, 10 won't set agent.options.timeout by default\n // TODO: need to fix on node itself\n if (options.timeout) {\n const timeout = getSocketTimeout(socket);\n if (!timeout) {\n socket.setTimeout(options.timeout);\n }\n }\n\n if (this.options.keepAlive) {\n // Disable Nagle's algorithm: http://blog.caustik.com/2012/04/08/scaling-node-js-to-100k-concurrent-connections/\n // https://fengmk2.com/benchmark/nagle-algorithm-delayed-ack-mock.html\n socket.setNoDelay(true);\n }\n this.createSocketCount++;\n if (this.options.socketActiveTTL) {\n socket[SOCKET_CREATED_TIME] = Date.now();\n }\n // don't show the hole '-----BEGIN CERTIFICATE----' key string\n socket[SOCKET_NAME] = `sock[${this[CREATE_ID]()}#${options._agentKey}]`.split('-----BEGIN', 1)[0];\n socket[SOCKET_REQUEST_COUNT] = 1;\n socket[SOCKET_REQUEST_FINISHED_COUNT] = 0;\n installListeners(this, socket, options);\n }\n\n createConnection(options, oncreate) {\n let called = false;\n const onNewCreate = (err, socket) => {\n if (called) return;\n called = true;\n\n if (err) {\n this.createSocketErrorCount++;\n return oncreate(err);\n }\n this[INIT_SOCKET](socket, options);\n oncreate(err, socket);\n };\n\n const newSocket = super.createConnection(options, onNewCreate);\n if (newSocket) onNewCreate(null, newSocket);\n }\n\n get statusChanged() {\n const changed = this.createSocketCount !== this.createSocketCountLastCheck ||\n this.createSocketErrorCount !== this.createSocketErrorCountLastCheck ||\n this.closeSocketCount !== this.closeSocketCountLastCheck ||\n this.errorSocketCount !== this.errorSocketCountLastCheck ||\n this.timeoutSocketCount !== this.timeoutSocketCountLastCheck ||\n this.requestCount !== this.requestCountLastCheck;\n if (changed) {\n this.createSocketCountLastCheck = this.createSocketCount;\n this.createSocketErrorCountLastCheck = this.createSocketErrorCount;\n this.closeSocketCountLastCheck = this.closeSocketCount;\n this.errorSocketCountLastCheck = this.errorSocketCount;\n this.timeoutSocketCountLastCheck = this.timeoutSocketCount;\n this.requestCountLastCheck = this.requestCount;\n }\n return changed;\n }\n\n getCurrentStatus() {\n return {\n createSocketCount: this.createSocketCount,\n createSocketErrorCount: this.createSocketErrorCount,\n closeSocketCount: this.closeSocketCount,\n errorSocketCount: this.errorSocketCount,\n timeoutSocketCount: this.timeoutSocketCount,\n requestCount: this.requestCount,\n freeSockets: inspect(this.freeSockets),\n sockets: inspect(this.sockets),\n requests: inspect(this.requests),\n };\n }\n}\n\n// node 8 don't has timeout attribute on socket\n// https://github.com/nodejs/node/pull/21204/files#diff-e6ef024c3775d787c38487a6309e491dR408\nfunction getSocketTimeout(socket) {\n return socket.timeout || socket._idleTimeout;\n}\n\nfunction installListeners(agent, socket, options) {\n debug('%s create, timeout %sms', socket[SOCKET_NAME], getSocketTimeout(socket));\n\n // listener socket events: close, timeout, error, free\n function onFree() {\n // create and socket.emit('free') logic\n // https://github.com/nodejs/node/blob/master/lib/_http_agent.js#L311\n // no req on the socket, it should be the new socket\n if (!socket._httpMessage && socket[SOCKET_REQUEST_COUNT] === 1) return;\n\n socket[SOCKET_REQUEST_FINISHED_COUNT]++;\n agent.requestCount++;\n debug('%s(requests: %s, finished: %s) free',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n\n // should reuse on pedding requests?\n const name = agent.getName(options);\n if (socket.writable && agent.requests[name] && agent.requests[name].length) {\n // will be reuse on agent free listener\n socket[SOCKET_REQUEST_COUNT]++;\n debug('%s(requests: %s, finished: %s) will be reuse on agent free event',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n }\n }\n socket.on('free', onFree);\n\n function onClose(isError) {\n debug('%s(requests: %s, finished: %s) close, isError: %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], isError);\n agent.closeSocketCount++;\n }\n socket.on('close', onClose);\n\n // start socket timeout handler\n function onTimeout() {\n // onTimeout and emitRequestTimeout(_http_client.js)\n // https://github.com/nodejs/node/blob/v12.x/lib/_http_client.js#L711\n const listenerCount = socket.listeners('timeout').length;\n // node <= 10, default listenerCount is 1, onTimeout\n // 11 < node <= 12, default listenerCount is 2, onTimeout and emitRequestTimeout\n // node >= 13, default listenerCount is 3, onTimeout,\n // onTimeout(https://github.com/nodejs/node/pull/32000/files#diff-5f7fb0850412c6be189faeddea6c5359R333)\n // and emitRequestTimeout\n const timeout = getSocketTimeout(socket);\n const req = socket._httpMessage;\n const reqTimeoutListenerCount = req && req.listeners('timeout').length || 0;\n debug('%s(requests: %s, finished: %s) timeout after %sms, listeners %s, defaultTimeoutListenerCount %s, hasHttpRequest %s, HttpRequest timeoutListenerCount %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n timeout, listenerCount, defaultTimeoutListenerCount, !!req, reqTimeoutListenerCount);\n if (debug.enabled) {\n debug('timeout listeners: %s', socket.listeners('timeout').map(f => f.name).join(', '));\n }\n agent.timeoutSocketCount++;\n const name = agent.getName(options);\n if (agent.freeSockets[name] && agent.freeSockets[name].indexOf(socket) !== -1) {\n // free socket timeout, destroy quietly\n socket.destroy();\n // Remove it from freeSockets list immediately to prevent new requests\n // from being sent through this socket.\n agent.removeSocket(socket, options);\n debug('%s is free, destroy quietly', socket[SOCKET_NAME]);\n } else {\n // if there is no any request socket timeout handler,\n // agent need to handle socket timeout itself.\n //\n // custom request socket timeout handle logic must follow these rules:\n // 1. Destroy socket first\n // 2. Must emit socket 'agentRemove' event tell agent remove socket\n // from freeSockets list immediately.\n // Otherise you may be get 'socket hang up' error when reuse\n // free socket and timeout happen in the same time.\n if (reqTimeoutListenerCount === 0) {\n const error = new Error('Socket timeout');\n error.code = 'ERR_SOCKET_TIMEOUT';\n error.timeout = timeout;\n // must manually call socket.end() or socket.destroy() to end the connection.\n // https://nodejs.org/dist/latest-v10.x/docs/api/net.html#net_socket_settimeout_timeout_callback\n socket.destroy(error);\n agent.removeSocket(socket, options);\n debug('%s destroy with timeout error', socket[SOCKET_NAME]);\n }\n }\n }\n socket.on('timeout', onTimeout);\n\n function onError(err) {\n const listenerCount = socket.listeners('error').length;\n debug('%s(requests: %s, finished: %s) error: %s, listenerCount: %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n err, listenerCount);\n agent.errorSocketCount++;\n if (listenerCount === 1) {\n // if socket don't contain error event handler, don't catch it, emit it again\n debug('%s emit uncaught error event', socket[SOCKET_NAME]);\n socket.removeListener('error', onError);\n socket.emit('error', err);\n }\n }\n socket.on('error', onError);\n\n function onRemove() {\n debug('%s(requests: %s, finished: %s) agentRemove',\n socket[SOCKET_NAME],\n socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n // We need this function for cases like HTTP 'upgrade'\n // (defined by WebSockets) where we need to remove a socket from the\n // pool because it'll be locked up indefinitely\n socket.removeListener('close', onClose);\n socket.removeListener('error', onError);\n socket.removeListener('free', onFree);\n socket.removeListener('timeout', onTimeout);\n socket.removeListener('agentRemove', onRemove);\n }\n socket.on('agentRemove', onRemove);\n}\n\nmodule.exports = Agent;\n\nfunction inspect(obj) {\n const res = {};\n for (const key in obj) {\n res[key] = obj[key].length;\n }\n return res;\n}\n","'use strict';\n\nconst OriginalHttpsAgent = require('https').Agent;\nconst HttpAgent = require('./agent');\nconst {\n INIT_SOCKET,\n CREATE_HTTPS_CONNECTION,\n} = require('./constants');\n\nclass HttpsAgent extends HttpAgent {\n constructor(options) {\n super(options);\n\n this.defaultPort = 443;\n this.protocol = 'https:';\n this.maxCachedSessions = this.options.maxCachedSessions;\n /* istanbul ignore next */\n if (this.maxCachedSessions === undefined) {\n this.maxCachedSessions = 100;\n }\n\n this._sessionCache = {\n map: {},\n list: [],\n };\n }\n\n createConnection(options) {\n const socket = this[CREATE_HTTPS_CONNECTION](options);\n this[INIT_SOCKET](socket, options);\n return socket;\n }\n}\n\n// https://github.com/nodejs/node/blob/master/lib/https.js#L89\nHttpsAgent.prototype[CREATE_HTTPS_CONNECTION] = OriginalHttpsAgent.prototype.createConnection;\n\n[\n 'getName',\n '_getSession',\n '_cacheSession',\n // https://github.com/nodejs/node/pull/4982\n '_evictSession',\n].forEach(function(method) {\n /* istanbul ignore next */\n if (typeof OriginalHttpsAgent.prototype[method] === 'function') {\n HttpsAgent.prototype[method] = OriginalHttpsAgent.prototype[method];\n }\n});\n\nmodule.exports = HttpsAgent;\n","'use strict';\n\nmodule.exports = require('./lib/agent');\nmodule.exports.HttpsAgent = require('./lib/https_agent');\nmodule.exports.constants = require('./lib/constants');\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","import * as nodeFetch from 'node-fetch';\n\nexport default (typeof globalThis.fetch === 'function'\n ? // The Fetch API is supported experimentally in Node 17.5+ and natively in Node 18+.\n globalThis.fetch\n : // Otherwise use the polyfill.\n async function (\n input: nodeFetch.RequestInfo,\n init?: nodeFetch.RequestInit,\n ): Promise {\n const processedInput =\n typeof input === 'string' && input.slice(0, 2) === '//'\n ? 'https:' + input\n : input;\n return await nodeFetch.default(processedInput, init);\n }) as typeof globalThis.fetch;\n","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH));\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n const isSigner = byteArray.slice(0, 1)[0] === 1;\n byteArray = byteArray.slice(1);\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toBytes","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","sha256","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","blob","rustString","rsl","struct","u32","offset","_decode","bind","_encode","rslShim","str","chars","span","authorized","lockup","ns64","voteInit","u8","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","bytes","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","assert","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","Message","args","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","seq","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","byteArray","accountCount","i","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","splice","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","add","_len","items","_key","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","nu64","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","encodeDecode","bigInt","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","u64","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","require$$0","require$$1","require$$2","require$$3","srcModule","INIT_SOCKET","require$$4","HttpsAgent","agentkeepaliveModule","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","input","init","processedInput","nodeFetch","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","number","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","agentOptions","freeSocketTimeout","keepAlive","maxSockets","HttpsKeepAliveAgent","HttpKeepAliveAgent","isHttps","NodeHttpsAgent","fetchWithMiddleware","info","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","hash","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","u16","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","split","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAMO,IAAMA,kBAAkB,GAAGC,eAAO,CAACC,KAAK,CAACC,gBAAgB,CAAA;AACzD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAyB;EACnD,IAAMC,aAAa,GAAGJ,eAAO,CAACC,KAAK,CAACC,gBAAgB,EAAE,CAAA;AACtD,EAAA,IAAMG,SAAS,GAAGC,YAAY,CAACF,aAAa,CAAC,CAAA;AAC7C,EAAA,IAAMG,SAAS,GAAG,IAAIC,UAAU,CAAC,EAAE,CAAC,CAAA;AACpCD,EAAAA,SAAS,CAACE,GAAG,CAACL,aAAa,CAAC,CAAA;AAC5BG,EAAAA,SAAS,CAACE,GAAG,CAACJ,SAAS,EAAE,EAAE,CAAC,CAAA;EAC5B,OAAO;AACLA,IAAAA,SAAS,EAATA,SAAS;AACTE,IAAAA,SAAS,EAATA,SAAAA;GACD,CAAA;AACH,CAAC,CAAA;AACM,IAAMD,YAAY,GAAGN,eAAO,CAACM,YAAY,CAAA;AACzC,SAASI,SAASA,CAACL,SAAqB,EAAW;EACxD,IAAI;AACFL,IAAAA,eAAO,CAACW,aAAa,CAACC,OAAO,CAACP,SAAS,CAAC,CAAA;AACxC,IAAA,OAAO,IAAI,CAAA;GACZ,CAAC,OAAAQ,OAAA,EAAM;AACN,IAAA,OAAO,KAAK,CAAA;AACd,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KAAA,EAAA,CAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAjD,QAAA,CAAAK,IAAA,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA,EAAAZ,OAAA,CAAA,CAAA;GACjB,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAq/D,6BAAA,CAAAp+D,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA;;ACjFD;AACA;AACA;AACO,IAAMu+D,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[30,31,32,33,34,35,36,37,38,39,40,41,42,43]} -\ No newline at end of file -+{"version":3,"file":"index.cjs.js","sources":["../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/utils/guarded-array-utils.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../../../node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js","../../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js","../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js","../../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/constants.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/agent.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/https_agent.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/index.js","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/fetch-impl.ts","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","const END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';\n\n/**\n * Delegates to `Array#shift`, but throws if the array is zero-length.\n */\nexport function guardedShift(byteArray: T[]): T {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift() as T;\n}\n\n/**\n * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of\n * the array.\n */\nexport function guardedSplice(\n byteArray: T[],\n ...args:\n | [start: number, deleteCount?: number]\n | [start: number, deleteCount: number, ...items: T[]]\n): T[] {\n const [start] = args;\n if (\n args.length === 2 // Implies that `deleteCount` was supplied\n ? start + (args[1] ?? 0) > byteArray.length\n : start >= byteArray.length\n ) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(\n ...(args as Parameters),\n );\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = guardedShift(byteArray);\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray),\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(\n byteArray,\n 0,\n accountKeyIndexesLength,\n );\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = guardedSplice(\n byteArray,\n 0,\n writableIndexesLength,\n );\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(\n byteArray,\n 0,\n readonlyIndexesLength,\n );\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","/*!\n * humanize-ms - index.js\n * Copyright(c) 2014 dead_horse \n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module dependencies.\n */\n\nvar util = require('util');\nvar ms = require('ms');\n\nmodule.exports = function (t) {\n if (typeof t === 'number') return t;\n var r = ms(t);\n if (r === undefined) {\n var err = new Error(util.format('humanize-ms(%j) result undefined', t));\n console.warn(err.stack);\n }\n return r;\n};\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","/* eslint-env browser */\n'use strict';\n\nfunction getChromeVersion() {\n\tconst matches = /(Chrome|Chromium)\\/(?\\d+)\\./.exec(navigator.userAgent);\n\n\tif (!matches) {\n\t\treturn;\n\t}\n\n\treturn Number.parseInt(matches.groups.chromeVersion, 10);\n}\n\nconst colorSupport = getChromeVersion() >= 69 ? {\n\tlevel: 1,\n\thasBasic: true,\n\thas256: false,\n\thas16m: false\n} : false;\n\nmodule.exports = {\n\tstdout: colorSupport,\n\tstderr: colorSupport\n};\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.format(...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","/*!\n * depd\n * Copyright(c) 2014-2018 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\n\nvar relative = require('path').relative\n\n/**\n * Module exports.\n */\n\nmodule.exports = depd\n\n/**\n * Get the path to base files on.\n */\n\nvar basePath = process.cwd()\n\n/**\n * Determine if namespace is contained in the string.\n */\n\nfunction containsNamespace (str, namespace) {\n var vals = str.split(/[ ,]+/)\n var ns = String(namespace).toLowerCase()\n\n for (var i = 0; i < vals.length; i++) {\n var val = vals[i]\n\n // namespace contained\n if (val && (val === '*' || val.toLowerCase() === ns)) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * Convert a data descriptor to accessor descriptor.\n */\n\nfunction convertDataDescriptorToAccessor (obj, prop, message) {\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n var value = descriptor.value\n\n descriptor.get = function getter () { return value }\n\n if (descriptor.writable) {\n descriptor.set = function setter (val) { return (value = val) }\n }\n\n delete descriptor.value\n delete descriptor.writable\n\n Object.defineProperty(obj, prop, descriptor)\n\n return descriptor\n}\n\n/**\n * Create arguments string to keep arity.\n */\n\nfunction createArgumentsString (arity) {\n var str = ''\n\n for (var i = 0; i < arity; i++) {\n str += ', arg' + i\n }\n\n return str.substr(2)\n}\n\n/**\n * Create stack string from stack.\n */\n\nfunction createStackString (stack) {\n var str = this.name + ': ' + this.namespace\n\n if (this.message) {\n str += ' deprecated ' + this.message\n }\n\n for (var i = 0; i < stack.length; i++) {\n str += '\\n at ' + stack[i].toString()\n }\n\n return str\n}\n\n/**\n * Create deprecate for namespace in caller.\n */\n\nfunction depd (namespace) {\n if (!namespace) {\n throw new TypeError('argument namespace is required')\n }\n\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n var file = site[0]\n\n function deprecate (message) {\n // call to self as log\n log.call(deprecate, message)\n }\n\n deprecate._file = file\n deprecate._ignored = isignored(namespace)\n deprecate._namespace = namespace\n deprecate._traced = istraced(namespace)\n deprecate._warned = Object.create(null)\n\n deprecate.function = wrapfunction\n deprecate.property = wrapproperty\n\n return deprecate\n}\n\n/**\n * Determine if event emitter has listeners of a given type.\n *\n * The way to do this check is done three different ways in Node.js >= 0.8\n * so this consolidates them into a minimal set using instance methods.\n *\n * @param {EventEmitter} emitter\n * @param {string} type\n * @returns {boolean}\n * @private\n */\n\nfunction eehaslisteners (emitter, type) {\n var count = typeof emitter.listenerCount !== 'function'\n ? emitter.listeners(type).length\n : emitter.listenerCount(type)\n\n return count > 0\n}\n\n/**\n * Determine if namespace is ignored.\n */\n\nfunction isignored (namespace) {\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}\n\n/**\n * Determine if namespace is traced.\n */\n\nfunction istraced (namespace) {\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = process.env.TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}\n\n/**\n * Display deprecation message.\n */\n\nfunction log (message, site) {\n var haslisteners = eehaslisteners(process, 'deprecation')\n\n // abort early if no destination\n if (!haslisteners && this._ignored) {\n return\n }\n\n var caller\n var callFile\n var callSite\n var depSite\n var i = 0\n var seen = false\n var stack = getStack()\n var file = this._file\n\n if (site) {\n // provided site\n depSite = site\n callSite = callSiteLocation(stack[1])\n callSite.name = depSite.name\n file = callSite[0]\n } else {\n // get call site\n i = 2\n depSite = callSiteLocation(stack[i])\n callSite = depSite\n }\n\n // get caller of deprecated thing in relation to file\n for (; i < stack.length; i++) {\n caller = callSiteLocation(stack[i])\n callFile = caller[0]\n\n if (callFile === file) {\n seen = true\n } else if (callFile === this._file) {\n file = this._file\n } else if (seen) {\n break\n }\n }\n\n var key = caller\n ? depSite.join(':') + '__' + caller.join(':')\n : undefined\n\n if (key !== undefined && key in this._warned) {\n // already warned\n return\n }\n\n this._warned[key] = true\n\n // generate automatic message from call site\n var msg = message\n if (!msg) {\n msg = callSite === depSite || !callSite.name\n ? defaultMessage(depSite)\n : defaultMessage(callSite)\n }\n\n // emit deprecation if listeners exist\n if (haslisteners) {\n var err = DeprecationError(this._namespace, msg, stack.slice(i))\n process.emit('deprecation', err)\n return\n }\n\n // format and write message\n var format = process.stderr.isTTY\n ? formatColor\n : formatPlain\n var output = format.call(this, msg, caller, stack.slice(i))\n process.stderr.write(output + '\\n', 'utf8')\n}\n\n/**\n * Get call site location as array.\n */\n\nfunction callSiteLocation (callSite) {\n var file = callSite.getFileName() || ''\n var line = callSite.getLineNumber()\n var colm = callSite.getColumnNumber()\n\n if (callSite.isEval()) {\n file = callSite.getEvalOrigin() + ', ' + file\n }\n\n var site = [file, line, colm]\n\n site.callSite = callSite\n site.name = callSite.getFunctionName()\n\n return site\n}\n\n/**\n * Generate a default message from the site.\n */\n\nfunction defaultMessage (site) {\n var callSite = site.callSite\n var funcName = site.name\n\n // make useful anonymous name\n if (!funcName) {\n funcName = ''\n }\n\n var context = callSite.getThis()\n var typeName = context && callSite.getTypeName()\n\n // ignore useless type name\n if (typeName === 'Object') {\n typeName = undefined\n }\n\n // make useful type name\n if (typeName === 'Function') {\n typeName = context.name || typeName\n }\n\n return typeName && callSite.getMethodName()\n ? typeName + '.' + funcName\n : funcName\n}\n\n/**\n * Format deprecation message without color.\n */\n\nfunction formatPlain (msg, caller, stack) {\n var timestamp = new Date().toUTCString()\n\n var formatted = timestamp +\n ' ' + this._namespace +\n ' deprecated ' + msg\n\n // add stack trace\n if (this._traced) {\n for (var i = 0; i < stack.length; i++) {\n formatted += '\\n at ' + stack[i].toString()\n }\n\n return formatted\n }\n\n if (caller) {\n formatted += ' at ' + formatLocation(caller)\n }\n\n return formatted\n}\n\n/**\n * Format deprecation message with color.\n */\n\nfunction formatColor (msg, caller, stack) {\n var formatted = '\\x1b[36;1m' + this._namespace + '\\x1b[22;39m' + // bold cyan\n ' \\x1b[33;1mdeprecated\\x1b[22;39m' + // bold yellow\n ' \\x1b[0m' + msg + '\\x1b[39m' // reset\n\n // add stack trace\n if (this._traced) {\n for (var i = 0; i < stack.length; i++) {\n formatted += '\\n \\x1b[36mat ' + stack[i].toString() + '\\x1b[39m' // cyan\n }\n\n return formatted\n }\n\n if (caller) {\n formatted += ' \\x1b[36m' + formatLocation(caller) + '\\x1b[39m' // cyan\n }\n\n return formatted\n}\n\n/**\n * Format call site location.\n */\n\nfunction formatLocation (callSite) {\n return relative(basePath, callSite[0]) +\n ':' + callSite[1] +\n ':' + callSite[2]\n}\n\n/**\n * Get the stack as array of call sites.\n */\n\nfunction getStack () {\n var limit = Error.stackTraceLimit\n var obj = {}\n var prep = Error.prepareStackTrace\n\n Error.prepareStackTrace = prepareObjectStackTrace\n Error.stackTraceLimit = Math.max(10, limit)\n\n // capture the stack\n Error.captureStackTrace(obj)\n\n // slice this function off the top\n var stack = obj.stack.slice(1)\n\n Error.prepareStackTrace = prep\n Error.stackTraceLimit = limit\n\n return stack\n}\n\n/**\n * Capture call site stack from v8.\n */\n\nfunction prepareObjectStackTrace (obj, stack) {\n return stack\n}\n\n/**\n * Return a wrapped function in a deprecation message.\n */\n\nfunction wrapfunction (fn, message) {\n if (typeof fn !== 'function') {\n throw new TypeError('argument fn must be a function')\n }\n\n var args = createArgumentsString(fn.length)\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n site.name = fn.name\n\n // eslint-disable-next-line no-new-func\n var deprecatedfn = new Function('fn', 'log', 'deprecate', 'message', 'site',\n '\"use strict\"\\n' +\n 'return function (' + args + ') {' +\n 'log.call(deprecate, message, site)\\n' +\n 'return fn.apply(this, arguments)\\n' +\n '}')(fn, log, this, message, site)\n\n return deprecatedfn\n}\n\n/**\n * Wrap property in a deprecation message.\n */\n\nfunction wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}\n\n/**\n * Create DeprecationError for deprecation\n */\n\nfunction DeprecationError (namespace, message, stack) {\n var error = new Error()\n var stackString\n\n Object.defineProperty(error, 'constructor', {\n value: DeprecationError\n })\n\n Object.defineProperty(error, 'message', {\n configurable: true,\n enumerable: false,\n value: message,\n writable: true\n })\n\n Object.defineProperty(error, 'name', {\n enumerable: false,\n configurable: true,\n value: 'DeprecationError',\n writable: true\n })\n\n Object.defineProperty(error, 'namespace', {\n configurable: true,\n enumerable: false,\n value: namespace,\n writable: true\n })\n\n Object.defineProperty(error, 'stack', {\n configurable: true,\n enumerable: false,\n get: function () {\n if (stackString !== undefined) {\n return stackString\n }\n\n // prepare stack trace\n return (stackString = createStackString.call(this, stack))\n },\n set: function setter (val) {\n stackString = val\n }\n })\n\n return error\n}\n","'use strict';\n\nmodule.exports = {\n // agent\n CURRENT_ID: Symbol('agentkeepalive#currentId'),\n CREATE_ID: Symbol('agentkeepalive#createId'),\n INIT_SOCKET: Symbol('agentkeepalive#initSocket'),\n CREATE_HTTPS_CONNECTION: Symbol('agentkeepalive#createHttpsConnection'),\n // socket\n SOCKET_CREATED_TIME: Symbol('agentkeepalive#socketCreatedTime'),\n SOCKET_NAME: Symbol('agentkeepalive#socketName'),\n SOCKET_REQUEST_COUNT: Symbol('agentkeepalive#socketRequestCount'),\n SOCKET_REQUEST_FINISHED_COUNT: Symbol('agentkeepalive#socketRequestFinishedCount'),\n};\n","'use strict';\n\nconst OriginalAgent = require('http').Agent;\nconst ms = require('humanize-ms');\nconst debug = require('debug')('agentkeepalive');\nconst deprecate = require('depd')('agentkeepalive');\nconst {\n INIT_SOCKET,\n CURRENT_ID,\n CREATE_ID,\n SOCKET_CREATED_TIME,\n SOCKET_NAME,\n SOCKET_REQUEST_COUNT,\n SOCKET_REQUEST_FINISHED_COUNT,\n} = require('./constants');\n\n// OriginalAgent come from\n// - https://github.com/nodejs/node/blob/v8.12.0/lib/_http_agent.js\n// - https://github.com/nodejs/node/blob/v10.12.0/lib/_http_agent.js\n\n// node <= 10\nlet defaultTimeoutListenerCount = 1;\nconst majorVersion = parseInt(process.version.split('.', 1)[0].substring(1));\nif (majorVersion >= 11 && majorVersion <= 12) {\n defaultTimeoutListenerCount = 2;\n} else if (majorVersion >= 13) {\n defaultTimeoutListenerCount = 3;\n}\n\nclass Agent extends OriginalAgent {\n constructor(options) {\n options = options || {};\n options.keepAlive = options.keepAlive !== false;\n // default is keep-alive and 4s free socket timeout\n // see https://medium.com/ssense-tech/reduce-networking-errors-in-nodejs-23b4eb9f2d83\n if (options.freeSocketTimeout === undefined) {\n options.freeSocketTimeout = 4000;\n }\n // Legacy API: keepAliveTimeout should be rename to `freeSocketTimeout`\n if (options.keepAliveTimeout) {\n deprecate('options.keepAliveTimeout is deprecated, please use options.freeSocketTimeout instead');\n options.freeSocketTimeout = options.keepAliveTimeout;\n delete options.keepAliveTimeout;\n }\n // Legacy API: freeSocketKeepAliveTimeout should be rename to `freeSocketTimeout`\n if (options.freeSocketKeepAliveTimeout) {\n deprecate('options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead');\n options.freeSocketTimeout = options.freeSocketKeepAliveTimeout;\n delete options.freeSocketKeepAliveTimeout;\n }\n\n // Sets the socket to timeout after timeout milliseconds of inactivity on the socket.\n // By default is double free socket timeout.\n if (options.timeout === undefined) {\n // make sure socket default inactivity timeout >= 8s\n options.timeout = Math.max(options.freeSocketTimeout * 2, 8000);\n }\n\n // support humanize format\n options.timeout = ms(options.timeout);\n options.freeSocketTimeout = ms(options.freeSocketTimeout);\n options.socketActiveTTL = options.socketActiveTTL ? ms(options.socketActiveTTL) : 0;\n\n super(options);\n\n this[CURRENT_ID] = 0;\n\n // create socket success counter\n this.createSocketCount = 0;\n this.createSocketCountLastCheck = 0;\n\n this.createSocketErrorCount = 0;\n this.createSocketErrorCountLastCheck = 0;\n\n this.closeSocketCount = 0;\n this.closeSocketCountLastCheck = 0;\n\n // socket error event count\n this.errorSocketCount = 0;\n this.errorSocketCountLastCheck = 0;\n\n // request finished counter\n this.requestCount = 0;\n this.requestCountLastCheck = 0;\n\n // including free socket timeout counter\n this.timeoutSocketCount = 0;\n this.timeoutSocketCountLastCheck = 0;\n\n this.on('free', socket => {\n // https://github.com/nodejs/node/pull/32000\n // Node.js native agent will check socket timeout eqs agent.options.timeout.\n // Use the ttl or freeSocketTimeout to overwrite.\n const timeout = this.calcSocketTimeout(socket);\n if (timeout > 0 && socket.timeout !== timeout) {\n socket.setTimeout(timeout);\n }\n });\n }\n\n get freeSocketKeepAliveTimeout() {\n deprecate('agent.freeSocketKeepAliveTimeout is deprecated, please use agent.options.freeSocketTimeout instead');\n return this.options.freeSocketTimeout;\n }\n\n get timeout() {\n deprecate('agent.timeout is deprecated, please use agent.options.timeout instead');\n return this.options.timeout;\n }\n\n get socketActiveTTL() {\n deprecate('agent.socketActiveTTL is deprecated, please use agent.options.socketActiveTTL instead');\n return this.options.socketActiveTTL;\n }\n\n calcSocketTimeout(socket) {\n /**\n * return <= 0: should free socket\n * return > 0: should update socket timeout\n * return undefined: not find custom timeout\n */\n let freeSocketTimeout = this.options.freeSocketTimeout;\n const socketActiveTTL = this.options.socketActiveTTL;\n if (socketActiveTTL) {\n // check socketActiveTTL\n const aliveTime = Date.now() - socket[SOCKET_CREATED_TIME];\n const diff = socketActiveTTL - aliveTime;\n if (diff <= 0) {\n return diff;\n }\n if (freeSocketTimeout && diff < freeSocketTimeout) {\n freeSocketTimeout = diff;\n }\n }\n // set freeSocketTimeout\n if (freeSocketTimeout) {\n // set free keepalive timer\n // try to use socket custom freeSocketTimeout first, support headers['keep-alive']\n // https://github.com/node-modules/urllib/blob/b76053020923f4d99a1c93cf2e16e0c5ba10bacf/lib/urllib.js#L498\n const customFreeSocketTimeout = socket.freeSocketTimeout || socket.freeSocketKeepAliveTimeout;\n return customFreeSocketTimeout || freeSocketTimeout;\n }\n }\n\n keepSocketAlive(socket) {\n const result = super.keepSocketAlive(socket);\n // should not keepAlive, do nothing\n if (!result) return result;\n\n const customTimeout = this.calcSocketTimeout(socket);\n if (typeof customTimeout === 'undefined') {\n return true;\n }\n if (customTimeout <= 0) {\n debug('%s(requests: %s, finished: %s) free but need to destroy by TTL, request count %s, diff is %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], customTimeout);\n return false;\n }\n if (socket.timeout !== customTimeout) {\n socket.setTimeout(customTimeout);\n }\n return true;\n }\n\n // only call on addRequest\n reuseSocket(...args) {\n // reuseSocket(socket, req)\n super.reuseSocket(...args);\n const socket = args[0];\n const req = args[1];\n req.reusedSocket = true;\n const agentTimeout = this.options.timeout;\n if (getSocketTimeout(socket) !== agentTimeout) {\n // reset timeout before use\n socket.setTimeout(agentTimeout);\n debug('%s reset timeout to %sms', socket[SOCKET_NAME], agentTimeout);\n }\n socket[SOCKET_REQUEST_COUNT]++;\n debug('%s(requests: %s, finished: %s) reuse on addRequest, timeout %sms',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n getSocketTimeout(socket));\n }\n\n [CREATE_ID]() {\n const id = this[CURRENT_ID]++;\n if (this[CURRENT_ID] === Number.MAX_SAFE_INTEGER) this[CURRENT_ID] = 0;\n return id;\n }\n\n [INIT_SOCKET](socket, options) {\n // bugfix here.\n // https on node 8, 10 won't set agent.options.timeout by default\n // TODO: need to fix on node itself\n if (options.timeout) {\n const timeout = getSocketTimeout(socket);\n if (!timeout) {\n socket.setTimeout(options.timeout);\n }\n }\n\n if (this.options.keepAlive) {\n // Disable Nagle's algorithm: http://blog.caustik.com/2012/04/08/scaling-node-js-to-100k-concurrent-connections/\n // https://fengmk2.com/benchmark/nagle-algorithm-delayed-ack-mock.html\n socket.setNoDelay(true);\n }\n this.createSocketCount++;\n if (this.options.socketActiveTTL) {\n socket[SOCKET_CREATED_TIME] = Date.now();\n }\n // don't show the hole '-----BEGIN CERTIFICATE----' key string\n socket[SOCKET_NAME] = `sock[${this[CREATE_ID]()}#${options._agentKey}]`.split('-----BEGIN', 1)[0];\n socket[SOCKET_REQUEST_COUNT] = 1;\n socket[SOCKET_REQUEST_FINISHED_COUNT] = 0;\n installListeners(this, socket, options);\n }\n\n createConnection(options, oncreate) {\n let called = false;\n const onNewCreate = (err, socket) => {\n if (called) return;\n called = true;\n\n if (err) {\n this.createSocketErrorCount++;\n return oncreate(err);\n }\n this[INIT_SOCKET](socket, options);\n oncreate(err, socket);\n };\n\n const newSocket = super.createConnection(options, onNewCreate);\n if (newSocket) onNewCreate(null, newSocket);\n }\n\n get statusChanged() {\n const changed = this.createSocketCount !== this.createSocketCountLastCheck ||\n this.createSocketErrorCount !== this.createSocketErrorCountLastCheck ||\n this.closeSocketCount !== this.closeSocketCountLastCheck ||\n this.errorSocketCount !== this.errorSocketCountLastCheck ||\n this.timeoutSocketCount !== this.timeoutSocketCountLastCheck ||\n this.requestCount !== this.requestCountLastCheck;\n if (changed) {\n this.createSocketCountLastCheck = this.createSocketCount;\n this.createSocketErrorCountLastCheck = this.createSocketErrorCount;\n this.closeSocketCountLastCheck = this.closeSocketCount;\n this.errorSocketCountLastCheck = this.errorSocketCount;\n this.timeoutSocketCountLastCheck = this.timeoutSocketCount;\n this.requestCountLastCheck = this.requestCount;\n }\n return changed;\n }\n\n getCurrentStatus() {\n return {\n createSocketCount: this.createSocketCount,\n createSocketErrorCount: this.createSocketErrorCount,\n closeSocketCount: this.closeSocketCount,\n errorSocketCount: this.errorSocketCount,\n timeoutSocketCount: this.timeoutSocketCount,\n requestCount: this.requestCount,\n freeSockets: inspect(this.freeSockets),\n sockets: inspect(this.sockets),\n requests: inspect(this.requests),\n };\n }\n}\n\n// node 8 don't has timeout attribute on socket\n// https://github.com/nodejs/node/pull/21204/files#diff-e6ef024c3775d787c38487a6309e491dR408\nfunction getSocketTimeout(socket) {\n return socket.timeout || socket._idleTimeout;\n}\n\nfunction installListeners(agent, socket, options) {\n debug('%s create, timeout %sms', socket[SOCKET_NAME], getSocketTimeout(socket));\n\n // listener socket events: close, timeout, error, free\n function onFree() {\n // create and socket.emit('free') logic\n // https://github.com/nodejs/node/blob/master/lib/_http_agent.js#L311\n // no req on the socket, it should be the new socket\n if (!socket._httpMessage && socket[SOCKET_REQUEST_COUNT] === 1) return;\n\n socket[SOCKET_REQUEST_FINISHED_COUNT]++;\n agent.requestCount++;\n debug('%s(requests: %s, finished: %s) free',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n\n // should reuse on pedding requests?\n const name = agent.getName(options);\n if (socket.writable && agent.requests[name] && agent.requests[name].length) {\n // will be reuse on agent free listener\n socket[SOCKET_REQUEST_COUNT]++;\n debug('%s(requests: %s, finished: %s) will be reuse on agent free event',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n }\n }\n socket.on('free', onFree);\n\n function onClose(isError) {\n debug('%s(requests: %s, finished: %s) close, isError: %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], isError);\n agent.closeSocketCount++;\n }\n socket.on('close', onClose);\n\n // start socket timeout handler\n function onTimeout() {\n // onTimeout and emitRequestTimeout(_http_client.js)\n // https://github.com/nodejs/node/blob/v12.x/lib/_http_client.js#L711\n const listenerCount = socket.listeners('timeout').length;\n // node <= 10, default listenerCount is 1, onTimeout\n // 11 < node <= 12, default listenerCount is 2, onTimeout and emitRequestTimeout\n // node >= 13, default listenerCount is 3, onTimeout,\n // onTimeout(https://github.com/nodejs/node/pull/32000/files#diff-5f7fb0850412c6be189faeddea6c5359R333)\n // and emitRequestTimeout\n const timeout = getSocketTimeout(socket);\n const req = socket._httpMessage;\n const reqTimeoutListenerCount = req && req.listeners('timeout').length || 0;\n debug('%s(requests: %s, finished: %s) timeout after %sms, listeners %s, defaultTimeoutListenerCount %s, hasHttpRequest %s, HttpRequest timeoutListenerCount %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n timeout, listenerCount, defaultTimeoutListenerCount, !!req, reqTimeoutListenerCount);\n if (debug.enabled) {\n debug('timeout listeners: %s', socket.listeners('timeout').map(f => f.name).join(', '));\n }\n agent.timeoutSocketCount++;\n const name = agent.getName(options);\n if (agent.freeSockets[name] && agent.freeSockets[name].indexOf(socket) !== -1) {\n // free socket timeout, destroy quietly\n socket.destroy();\n // Remove it from freeSockets list immediately to prevent new requests\n // from being sent through this socket.\n agent.removeSocket(socket, options);\n debug('%s is free, destroy quietly', socket[SOCKET_NAME]);\n } else {\n // if there is no any request socket timeout handler,\n // agent need to handle socket timeout itself.\n //\n // custom request socket timeout handle logic must follow these rules:\n // 1. Destroy socket first\n // 2. Must emit socket 'agentRemove' event tell agent remove socket\n // from freeSockets list immediately.\n // Otherise you may be get 'socket hang up' error when reuse\n // free socket and timeout happen in the same time.\n if (reqTimeoutListenerCount === 0) {\n const error = new Error('Socket timeout');\n error.code = 'ERR_SOCKET_TIMEOUT';\n error.timeout = timeout;\n // must manually call socket.end() or socket.destroy() to end the connection.\n // https://nodejs.org/dist/latest-v10.x/docs/api/net.html#net_socket_settimeout_timeout_callback\n socket.destroy(error);\n agent.removeSocket(socket, options);\n debug('%s destroy with timeout error', socket[SOCKET_NAME]);\n }\n }\n }\n socket.on('timeout', onTimeout);\n\n function onError(err) {\n const listenerCount = socket.listeners('error').length;\n debug('%s(requests: %s, finished: %s) error: %s, listenerCount: %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n err, listenerCount);\n agent.errorSocketCount++;\n if (listenerCount === 1) {\n // if socket don't contain error event handler, don't catch it, emit it again\n debug('%s emit uncaught error event', socket[SOCKET_NAME]);\n socket.removeListener('error', onError);\n socket.emit('error', err);\n }\n }\n socket.on('error', onError);\n\n function onRemove() {\n debug('%s(requests: %s, finished: %s) agentRemove',\n socket[SOCKET_NAME],\n socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n // We need this function for cases like HTTP 'upgrade'\n // (defined by WebSockets) where we need to remove a socket from the\n // pool because it'll be locked up indefinitely\n socket.removeListener('close', onClose);\n socket.removeListener('error', onError);\n socket.removeListener('free', onFree);\n socket.removeListener('timeout', onTimeout);\n socket.removeListener('agentRemove', onRemove);\n }\n socket.on('agentRemove', onRemove);\n}\n\nmodule.exports = Agent;\n\nfunction inspect(obj) {\n const res = {};\n for (const key in obj) {\n res[key] = obj[key].length;\n }\n return res;\n}\n","'use strict';\n\nconst OriginalHttpsAgent = require('https').Agent;\nconst HttpAgent = require('./agent');\nconst {\n INIT_SOCKET,\n CREATE_HTTPS_CONNECTION,\n} = require('./constants');\n\nclass HttpsAgent extends HttpAgent {\n constructor(options) {\n super(options);\n\n this.defaultPort = 443;\n this.protocol = 'https:';\n this.maxCachedSessions = this.options.maxCachedSessions;\n /* istanbul ignore next */\n if (this.maxCachedSessions === undefined) {\n this.maxCachedSessions = 100;\n }\n\n this._sessionCache = {\n map: {},\n list: [],\n };\n }\n\n createConnection(options) {\n const socket = this[CREATE_HTTPS_CONNECTION](options);\n this[INIT_SOCKET](socket, options);\n return socket;\n }\n}\n\n// https://github.com/nodejs/node/blob/master/lib/https.js#L89\nHttpsAgent.prototype[CREATE_HTTPS_CONNECTION] = OriginalHttpsAgent.prototype.createConnection;\n\n[\n 'getName',\n '_getSession',\n '_cacheSession',\n // https://github.com/nodejs/node/pull/4982\n '_evictSession',\n].forEach(function(method) {\n /* istanbul ignore next */\n if (typeof OriginalHttpsAgent.prototype[method] === 'function') {\n HttpsAgent.prototype[method] = OriginalHttpsAgent.prototype[method];\n }\n});\n\nmodule.exports = HttpsAgent;\n","'use strict';\n\nmodule.exports = require('./lib/agent');\nmodule.exports.HttpsAgent = require('./lib/https_agent');\nmodule.exports.constants = require('./lib/constants');\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","import * as nodeFetch from 'node-fetch';\n\nexport default (typeof globalThis.fetch === 'function'\n ? // The Fetch API is supported experimentally in Node 17.5+ and natively in Node 18+.\n globalThis.fetch\n : // Otherwise use the polyfill.\n async function (\n input: nodeFetch.RequestInfo,\n init?: nodeFetch.RequestInit,\n ): Promise {\n const processedInput =\n typeof input === 'string' && input.slice(0, 2) === '//'\n ? 'https:' + input\n : input;\n return await nodeFetch.default(processedInput, init);\n }) as typeof globalThis.fetch;\n","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\nimport {guardedShift, guardedSplice} from './utils/guarded-array-utils';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toBytes","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","sha256","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","blob","rustString","rsl","struct","u32","offset","_decode","bind","_encode","rslShim","str","chars","span","authorized","lockup","ns64","voteInit","u8","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","bytes","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","assert","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","END_OF_BUFFER_ERROR_MESSAGE","guardedShift","byteArray","guardedSplice","_args$","_len","args","_key","start","splice","Message","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","seq","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","accountCount","i","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","add","items","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","nu64","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","encodeDecode","bigInt","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","u64","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","require$$0","require$$1","require$$2","require$$3","srcModule","INIT_SOCKET","require$$4","HttpsAgent","agentkeepaliveModule","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","input","init","processedInput","nodeFetch","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","number","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","agentOptions","freeSocketTimeout","keepAlive","maxSockets","HttpsKeepAliveAgent","HttpKeepAliveAgent","isHttps","NodeHttpsAgent","fetchWithMiddleware","info","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","hash","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","u16","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","split","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAMO,IAAMA,kBAAkB,GAAGC,eAAO,CAACC,KAAK,CAACC,gBAAgB,CAAA;AACzD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAyB;EACnD,IAAMC,aAAa,GAAGJ,eAAO,CAACC,KAAK,CAACC,gBAAgB,EAAE,CAAA;AACtD,EAAA,IAAMG,SAAS,GAAGC,YAAY,CAACF,aAAa,CAAC,CAAA;AAC7C,EAAA,IAAMG,SAAS,GAA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A,GAAA,EAAA,CAAA;AAAA,YAAA,MAAA;AAAA,WAAA;AAAA,UAAA,MACN,IAAI5C,KAAK,CAAA,kBAAA,CAAA4B,MAAA,CACM+D,SAAS,EAAA/D,WAAAA,CAAAA,CAAAA,MAAA,CAAY8V,IAAI,CAACC,SAAS,CAAC0G,MAAM,CAAC,MAChE,CAAC,CAAA;AAAA,QAAA,KAAA,EAAA;AAAA,UAAA,OAAA3b,QAAA,CAAAI,MAAA,CAAA,QAAA,EAGI6C,SAAS,CAAA,CAAA;AAAA,QAAA,KAAA,EAAA,CAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAjD,QAAA,CAAAK,IAAA,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA,EAAAZ,OAAA,CAAA,CAAA;GACjB,CAAA,CAAA,CAAA;AAAA,EAAA,OAAA0/D,6BAAA,CAAAz+D,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA;;ACjFD;AACA;AACA;AACO,IAAM4+D,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[31,32,33,34,35,36,37,38,39,40,41,42,43,44]} -\ No newline at end of file -diff --git a/lib/index.esm.js b/lib/index.esm.js -index 150b1bf5dc51134b47d22d87b9cab13c4331bc32..451dc3ef0945cfc2cbcd78a644d41037d873bf73 100644 ---- a/lib/index.esm.js -+++ b/lib/index.esm.js -@@ -938,6 +938,35 @@ var CompiledKeys = /*#__PURE__*/function () { - return CompiledKeys; - }(); - -+var END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly'; -+ -+/** -+ * Delegates to `Array#shift`, but throws if the array is zero-length. -+ */ -+function guardedShift(byteArray) { -+ if (byteArray.length === 0) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.shift(); -+} -+ -+/** -+ * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of -+ * the array. -+ */ -+function guardedSplice(byteArray) { -+ var _args$; -+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { -+ args[_key - 1] = arguments[_key]; -+ } -+ var start = args[0]; -+ if (args.length === 2 // Implies that `deleteCount` was supplied -+ ? start + ((_args$ = args[1]) !== null && _args$ !== void 0 ? _args$ : 0) > byteArray.length : start >= byteArray.length) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.splice.apply(byteArray, _toConsumableArray(args)); -+} -+ - /** - * An instruction to execute by a program - * -@@ -1121,32 +1150,28 @@ var Message = /*#__PURE__*/function () { - value: function from(buffer) { - // Slice up wire data - var byteArray = _toConsumableArray(buffer); -- var numRequiredSignatures = byteArray.shift(); -+ var numRequiredSignatures = guardedShift(byteArray); - if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) { - throw new Error('Versioned messages must be deserialized with VersionedMessage.deserialize()'); - } -- var numReadonlySignedAccounts = byteArray.shift(); -- var numReadonlyUnsignedAccounts = byteArray.shift(); -+ var numReadonlySignedAccounts = guardedShift(byteArray); -+ var numReadonlyUnsignedAccounts = guardedShift(byteArray); - var accountCount = decodeLength(byteArray); - var accountKeys = []; - for (var i = 0; i < accountCount; i++) { -- var account = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - accountKeys.push(new PublicKey(Buffer.from(account))); - } -- var recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - var instructionCount = decodeLength(byteArray); - var instructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var _accountCount = decodeLength(byteArray); -- var accounts = byteArray.slice(0, _accountCount); -- byteArray = byteArray.slice(_accountCount); -+ var accounts = guardedSplice(byteArray, 0, _accountCount); - var dataLength = decodeLength(byteArray); -- var dataSlice = byteArray.slice(0, dataLength); -+ var dataSlice = guardedSplice(byteArray, 0, dataLength); - var data = bs58.encode(Buffer.from(dataSlice)); -- byteArray = byteArray.slice(dataLength); - instructions.push({ - programIdIndex: programIdIndex, - accounts: accounts, -@@ -1457,30 +1482,30 @@ var MessageV0 = /*#__PURE__*/function () { - key: "deserialize", - value: function deserialize(serializedMessage) { - var byteArray = _toConsumableArray(serializedMessage); -- var prefix = byteArray.shift(); -+ var prefix = guardedShift(byteArray); - var maskedPrefix = prefix & VERSION_PREFIX_MASK; - assert(prefix !== maskedPrefix, "Expected versioned message but received legacy message"); - var version = maskedPrefix; - assert(version === 0, "Expected versioned message with version 0 but found version ".concat(version)); - var header = { -- numRequiredSignatures: byteArray.shift(), -- numReadonlySignedAccounts: byteArray.shift(), -- numReadonlyUnsignedAccounts: byteArray.shift() -+ numRequiredSignatures: guardedShift(byteArray), -+ numReadonlySignedAccounts: guardedShift(byteArray), -+ numReadonlyUnsignedAccounts: guardedShift(byteArray) - }; - var staticAccountKeys = []; - var staticAccountKeysLength = decodeLength(byteArray); - for (var i = 0; i < staticAccountKeysLength; i++) { -- staticAccountKeys.push(new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH))); -+ staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH))); - } -- var recentBlockhash = bs58.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var recentBlockhash = bs58.encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var instructionCount = decodeLength(byteArray); - var compiledInstructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var accountKeyIndexesLength = decodeLength(byteArray); -- var accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength); -+ var accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength); - var dataLength = decodeLength(byteArray); -- var data = new Uint8Array(byteArray.splice(0, dataLength)); -+ var data = new Uint8Array(guardedSplice(byteArray, 0, dataLength)); - compiledInstructions.push({ - programIdIndex: programIdIndex, - accountKeyIndexes: accountKeyIndexes, -@@ -1490,11 +1515,11 @@ var MessageV0 = /*#__PURE__*/function () { - var addressTableLookupsCount = decodeLength(byteArray); - var addressTableLookups = []; - for (var _i2 = 0; _i2 < addressTableLookupsCount; _i2++) { -- var accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var writableIndexesLength = decodeLength(byteArray); -- var writableIndexes = byteArray.splice(0, writableIndexesLength); -+ var writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength); - var readonlyIndexesLength = decodeLength(byteArray); -- var readonlyIndexes = byteArray.splice(0, readonlyIndexesLength); -+ var readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength); - addressTableLookups.push({ - accountKey: accountKey, - writableIndexes: writableIndexes, -@@ -2373,8 +2398,7 @@ var Transaction = /*#__PURE__*/function () { - var signatureCount = decodeLength(byteArray); - var signatures = []; - for (var i = 0; i < signatureCount; i++) { -- var signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES); -- byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES); -+ var signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES); - signatures.push(bs58.encode(Buffer.from(signature))); - } - return Transaction.populate(Message.from(byteArray), signatures); -@@ -2629,7 +2653,7 @@ var VersionedTransaction = /*#__PURE__*/function () { - var signatures = []; - var signaturesLength = decodeLength(byteArray); - for (var i = 0; i < signaturesLength; i++) { -- signatures.push(new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES))); -+ signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES))); - } - var message = VersionedMessage.deserialize(new Uint8Array(byteArray)); - return new VersionedTransaction(message, signatures); -@@ -8240,7 +8264,7 @@ var LogsNotificationResult = type({ - - /** @internal */ - var COMMON_HTTP_HEADERS = { -- 'solana-client': "js/".concat((_process$env$npm_pack = "0.0.0-development") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') -+ 'solana-client': "js/".concat((_process$env$npm_pack = "1.78.4") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') - }; - - /** -@@ -15553,10 +15577,8 @@ var ValidatorInfo = /*#__PURE__*/function () { - if (configKeyCount !== 2) return null; - var configKeys = []; - for (var i = 0; i < 2; i++) { -- var publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH)); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -- var isSigner = byteArray.slice(0, 1)[0] === 1; -- byteArray = byteArray.slice(1); -+ var publicKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); -+ var isSigner = guardedShift(byteArray) === 1; - configKeys.push({ - publicKey: publicKey, - isSigner: isSigner -diff --git a/lib/index.esm.js.map b/lib/index.esm.js.map -index b4fb8210f0799dc44bde23a5868d57f551724e46..3e946c73a7c72a066d77072dcf8847b060211fb6 100644 ---- a/lib/index.esm.js.map -+++ b/lib/index.esm.js.map -@@ -1 +1 @@ --{"version":3,"file":"index.esm.js","sources":["../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../../../node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js","../../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js","../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js","../../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/constants.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/agent.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/https_agent.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/index.js","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/fetch-impl.ts","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = byteArray.shift()!;\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = byteArray.shift()!;\n const numReadonlyUnsignedAccounts = byteArray.shift()!;\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift()!;\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = byteArray.slice(0, accountCount);\n byteArray = byteArray.slice(accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = byteArray.slice(0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n byteArray = byteArray.slice(dataLength);\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = byteArray.shift() as number;\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: byteArray.shift() as number,\n numReadonlySignedAccounts: byteArray.shift() as number,\n numReadonlyUnsignedAccounts: byteArray.shift() as number,\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift() as number;\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength);\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(byteArray.splice(0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = byteArray.splice(0, writableIndexesLength);\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = byteArray.splice(0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);\n byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","/*!\n * humanize-ms - index.js\n * Copyright(c) 2014 dead_horse \n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module dependencies.\n */\n\nvar util = require('util');\nvar ms = require('ms');\n\nmodule.exports = function (t) {\n if (typeof t === 'number') return t;\n var r = ms(t);\n if (r === undefined) {\n var err = new Error(util.format('humanize-ms(%j) result undefined', t));\n console.warn(err.stack);\n }\n return r;\n};\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","/* eslint-env browser */\n'use strict';\n\nfunction getChromeVersion() {\n\tconst matches = /(Chrome|Chromium)\\/(?\\d+)\\./.exec(navigator.userAgent);\n\n\tif (!matches) {\n\t\treturn;\n\t}\n\n\treturn Number.parseInt(matches.groups.chromeVersion, 10);\n}\n\nconst colorSupport = getChromeVersion() >= 69 ? {\n\tlevel: 1,\n\thasBasic: true,\n\thas256: false,\n\thas16m: false\n} : false;\n\nmodule.exports = {\n\tstdout: colorSupport,\n\tstderr: colorSupport\n};\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.format(...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","/*!\n * depd\n * Copyright(c) 2014-2018 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\n\nvar relative = require('path').relative\n\n/**\n * Module exports.\n */\n\nmodule.exports = depd\n\n/**\n * Get the path to base files on.\n */\n\nvar basePath = process.cwd()\n\n/**\n * Determine if namespace is contained in the string.\n */\n\nfunction containsNamespace (str, namespace) {\n var vals = str.split(/[ ,]+/)\n var ns = String(namespace).toLowerCase()\n\n for (var i = 0; i < vals.length; i++) {\n var val = vals[i]\n\n // namespace contained\n if (val && (val === '*' || val.toLowerCase() === ns)) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * Convert a data descriptor to accessor descriptor.\n */\n\nfunction convertDataDescriptorToAccessor (obj, prop, message) {\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n var value = descriptor.value\n\n descriptor.get = function getter () { return value }\n\n if (descriptor.writable) {\n descriptor.set = function setter (val) { return (value = val) }\n }\n\n delete descriptor.value\n delete descriptor.writable\n\n Object.defineProperty(obj, prop, descriptor)\n\n return descriptor\n}\n\n/**\n * Create arguments string to keep arity.\n */\n\nfunction createArgumentsString (arity) {\n var str = ''\n\n for (var i = 0; i < arity; i++) {\n str += ', arg' + i\n }\n\n return str.substr(2)\n}\n\n/**\n * Create stack string from stack.\n */\n\nfunction createStackString (stack) {\n var str = this.name + ': ' + this.namespace\n\n if (this.message) {\n str += ' deprecated ' + this.message\n }\n\n for (var i = 0; i < stack.length; i++) {\n str += '\\n at ' + stack[i].toString()\n }\n\n return str\n}\n\n/**\n * Create deprecate for namespace in caller.\n */\n\nfunction depd (namespace) {\n if (!namespace) {\n throw new TypeError('argument namespace is required')\n }\n\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n var file = site[0]\n\n function deprecate (message) {\n // call to self as log\n log.call(deprecate, message)\n }\n\n deprecate._file = file\n deprecate._ignored = isignored(namespace)\n deprecate._namespace = namespace\n deprecate._traced = istraced(namespace)\n deprecate._warned = Object.create(null)\n\n deprecate.function = wrapfunction\n deprecate.property = wrapproperty\n\n return deprecate\n}\n\n/**\n * Determine if event emitter has listeners of a given type.\n *\n * The way to do this check is done three different ways in Node.js >= 0.8\n * so this consolidates them into a minimal set using instance methods.\n *\n * @param {EventEmitter} emitter\n * @param {string} type\n * @returns {boolean}\n * @private\n */\n\nfunction eehaslisteners (emitter, type) {\n var count = typeof emitter.listenerCount !== 'function'\n ? emitter.listeners(type).length\n : emitter.listenerCount(type)\n\n return count > 0\n}\n\n/**\n * Determine if namespace is ignored.\n */\n\nfunction isignored (namespace) {\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}\n\n/**\n * Determine if namespace is traced.\n */\n\nfunction istraced (namespace) {\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = process.env.TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}\n\n/**\n * Display deprecation message.\n */\n\nfunction log (message, site) {\n var haslisteners = eehaslisteners(process, 'deprecation')\n\n // abort early if no destination\n if (!haslisteners && this._ignored) {\n return\n }\n\n var caller\n var callFile\n var callSite\n var depSite\n var i = 0\n var seen = false\n var stack = getStack()\n var file = this._file\n\n if (site) {\n // provided site\n depSite = site\n callSite = callSiteLocation(stack[1])\n callSite.name = depSite.name\n file = callSite[0]\n } else {\n // get call site\n i = 2\n depSite = callSiteLocation(stack[i])\n callSite = depSite\n }\n\n // get caller of deprecated thing in relation to file\n for (; i < stack.length; i++) {\n caller = callSiteLocation(stack[i])\n callFile = caller[0]\n\n if (callFile === file) {\n seen = true\n } else if (callFile === this._file) {\n file = this._file\n } else if (seen) {\n break\n }\n }\n\n var key = caller\n ? depSite.join(':') + '__' + caller.join(':')\n : undefined\n\n if (key !== undefined && key in this._warned) {\n // already warned\n return\n }\n\n this._warned[key] = true\n\n // generate automatic message from call site\n var msg = message\n if (!msg) {\n msg = callSite === depSite || !callSite.name\n ? defaultMessage(depSite)\n : defaultMessage(callSite)\n }\n\n // emit deprecation if listeners exist\n if (haslisteners) {\n var err = DeprecationError(this._namespace, msg, stack.slice(i))\n process.emit('deprecation', err)\n return\n }\n\n // format and write message\n var format = process.stderr.isTTY\n ? formatColor\n : formatPlain\n var output = format.call(this, msg, caller, stack.slice(i))\n process.stderr.write(output + '\\n', 'utf8')\n}\n\n/**\n * Get call site location as array.\n */\n\nfunction callSiteLocation (callSite) {\n var file = callSite.getFileName() || ''\n var line = callSite.getLineNumber()\n var colm = callSite.getColumnNumber()\n\n if (callSite.isEval()) {\n file = callSite.getEvalOrigin() + ', ' + file\n }\n\n var site = [file, line, colm]\n\n site.callSite = callSite\n site.name = callSite.getFunctionName()\n\n return site\n}\n\n/**\n * Generate a default message from the site.\n */\n\nfunction defaultMessage (site) {\n var callSite = site.callSite\n var funcName = site.name\n\n // make useful anonymous name\n if (!funcName) {\n funcName = ''\n }\n\n var context = callSite.getThis()\n var typeName = context && callSite.getTypeName()\n\n // ignore useless type name\n if (typeName === 'Object') {\n typeName = undefined\n }\n\n // make useful type name\n if (typeName === 'Function') {\n typeName = context.name || typeName\n }\n\n return typeName && callSite.getMethodName()\n ? typeName + '.' + funcName\n : funcName\n}\n\n/**\n * Format deprecation message without color.\n */\n\nfunction formatPlain (msg, caller, stack) {\n var timestamp = new Date().toUTCString()\n\n var formatted = timestamp +\n ' ' + this._namespace +\n ' deprecated ' + msg\n\n // add stack trace\n if (this._traced) {\n for (var i = 0; i < stack.length; i++) {\n formatted += '\\n at ' + stack[i].toString()\n }\n\n return formatted\n }\n\n if (caller) {\n formatted += ' at ' + formatLocation(caller)\n }\n\n return formatted\n}\n\n/**\n * Format deprecation message with color.\n */\n\nfunction formatColor (msg, caller, stack) {\n var formatted = '\\x1b[36;1m' + this._namespace + '\\x1b[22;39m' + // bold cyan\n ' \\x1b[33;1mdeprecated\\x1b[22;39m' + // bold yellow\n ' \\x1b[0m' + msg + '\\x1b[39m' // reset\n\n // add stack trace\n if (this._traced) {\n for (var i = 0; i < stack.length; i++) {\n formatted += '\\n \\x1b[36mat ' + stack[i].toString() + '\\x1b[39m' // cyan\n }\n\n return formatted\n }\n\n if (caller) {\n formatted += ' \\x1b[36m' + formatLocation(caller) + '\\x1b[39m' // cyan\n }\n\n return formatted\n}\n\n/**\n * Format call site location.\n */\n\nfunction formatLocation (callSite) {\n return relative(basePath, callSite[0]) +\n ':' + callSite[1] +\n ':' + callSite[2]\n}\n\n/**\n * Get the stack as array of call sites.\n */\n\nfunction getStack () {\n var limit = Error.stackTraceLimit\n var obj = {}\n var prep = Error.prepareStackTrace\n\n Error.prepareStackTrace = prepareObjectStackTrace\n Error.stackTraceLimit = Math.max(10, limit)\n\n // capture the stack\n Error.captureStackTrace(obj)\n\n // slice this function off the top\n var stack = obj.stack.slice(1)\n\n Error.prepareStackTrace = prep\n Error.stackTraceLimit = limit\n\n return stack\n}\n\n/**\n * Capture call site stack from v8.\n */\n\nfunction prepareObjectStackTrace (obj, stack) {\n return stack\n}\n\n/**\n * Return a wrapped function in a deprecation message.\n */\n\nfunction wrapfunction (fn, message) {\n if (typeof fn !== 'function') {\n throw new TypeError('argument fn must be a function')\n }\n\n var args = createArgumentsString(fn.length)\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n site.name = fn.name\n\n // eslint-disable-next-line no-new-func\n var deprecatedfn = new Function('fn', 'log', 'deprecate', 'message', 'site',\n '\"use strict\"\\n' +\n 'return function (' + args + ') {' +\n 'log.call(deprecate, message, site)\\n' +\n 'return fn.apply(this, arguments)\\n' +\n '}')(fn, log, this, message, site)\n\n return deprecatedfn\n}\n\n/**\n * Wrap property in a deprecation message.\n */\n\nfunction wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}\n\n/**\n * Create DeprecationError for deprecation\n */\n\nfunction DeprecationError (namespace, message, stack) {\n var error = new Error()\n var stackString\n\n Object.defineProperty(error, 'constructor', {\n value: DeprecationError\n })\n\n Object.defineProperty(error, 'message', {\n configurable: true,\n enumerable: false,\n value: message,\n writable: true\n })\n\n Object.defineProperty(error, 'name', {\n enumerable: false,\n configurable: true,\n value: 'DeprecationError',\n writable: true\n })\n\n Object.defineProperty(error, 'namespace', {\n configurable: true,\n enumerable: false,\n value: namespace,\n writable: true\n })\n\n Object.defineProperty(error, 'stack', {\n configurable: true,\n enumerable: false,\n get: function () {\n if (stackString !== undefined) {\n return stackString\n }\n\n // prepare stack trace\n return (stackString = createStackString.call(this, stack))\n },\n set: function setter (val) {\n stackString = val\n }\n })\n\n return error\n}\n","'use strict';\n\nmodule.exports = {\n // agent\n CURRENT_ID: Symbol('agentkeepalive#currentId'),\n CREATE_ID: Symbol('agentkeepalive#createId'),\n INIT_SOCKET: Symbol('agentkeepalive#initSocket'),\n CREATE_HTTPS_CONNECTION: Symbol('agentkeepalive#createHttpsConnection'),\n // socket\n SOCKET_CREATED_TIME: Symbol('agentkeepalive#socketCreatedTime'),\n SOCKET_NAME: Symbol('agentkeepalive#socketName'),\n SOCKET_REQUEST_COUNT: Symbol('agentkeepalive#socketRequestCount'),\n SOCKET_REQUEST_FINISHED_COUNT: Symbol('agentkeepalive#socketRequestFinishedCount'),\n};\n","'use strict';\n\nconst OriginalAgent = require('http').Agent;\nconst ms = require('humanize-ms');\nconst debug = require('debug')('agentkeepalive');\nconst deprecate = require('depd')('agentkeepalive');\nconst {\n INIT_SOCKET,\n CURRENT_ID,\n CREATE_ID,\n SOCKET_CREATED_TIME,\n SOCKET_NAME,\n SOCKET_REQUEST_COUNT,\n SOCKET_REQUEST_FINISHED_COUNT,\n} = require('./constants');\n\n// OriginalAgent come from\n// - https://github.com/nodejs/node/blob/v8.12.0/lib/_http_agent.js\n// - https://github.com/nodejs/node/blob/v10.12.0/lib/_http_agent.js\n\n// node <= 10\nlet defaultTimeoutListenerCount = 1;\nconst majorVersion = parseInt(process.version.split('.', 1)[0].substring(1));\nif (majorVersion >= 11 && majorVersion <= 12) {\n defaultTimeoutListenerCount = 2;\n} else if (majorVersion >= 13) {\n defaultTimeoutListenerCount = 3;\n}\n\nclass Agent extends OriginalAgent {\n constructor(options) {\n options = options || {};\n options.keepAlive = options.keepAlive !== false;\n // default is keep-alive and 4s free socket timeout\n // see https://medium.com/ssense-tech/reduce-networking-errors-in-nodejs-23b4eb9f2d83\n if (options.freeSocketTimeout === undefined) {\n options.freeSocketTimeout = 4000;\n }\n // Legacy API: keepAliveTimeout should be rename to `freeSocketTimeout`\n if (options.keepAliveTimeout) {\n deprecate('options.keepAliveTimeout is deprecated, please use options.freeSocketTimeout instead');\n options.freeSocketTimeout = options.keepAliveTimeout;\n delete options.keepAliveTimeout;\n }\n // Legacy API: freeSocketKeepAliveTimeout should be rename to `freeSocketTimeout`\n if (options.freeSocketKeepAliveTimeout) {\n deprecate('options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead');\n options.freeSocketTimeout = options.freeSocketKeepAliveTimeout;\n delete options.freeSocketKeepAliveTimeout;\n }\n\n // Sets the socket to timeout after timeout milliseconds of inactivity on the socket.\n // By default is double free socket timeout.\n if (options.timeout === undefined) {\n // make sure socket default inactivity timeout >= 8s\n options.timeout = Math.max(options.freeSocketTimeout * 2, 8000);\n }\n\n // support humanize format\n options.timeout = ms(options.timeout);\n options.freeSocketTimeout = ms(options.freeSocketTimeout);\n options.socketActiveTTL = options.socketActiveTTL ? ms(options.socketActiveTTL) : 0;\n\n super(options);\n\n this[CURRENT_ID] = 0;\n\n // create socket success counter\n this.createSocketCount = 0;\n this.createSocketCountLastCheck = 0;\n\n this.createSocketErrorCount = 0;\n this.createSocketErrorCountLastCheck = 0;\n\n this.closeSocketCount = 0;\n this.closeSocketCountLastCheck = 0;\n\n // socket error event count\n this.errorSocketCount = 0;\n this.errorSocketCountLastCheck = 0;\n\n // request finished counter\n this.requestCount = 0;\n this.requestCountLastCheck = 0;\n\n // including free socket timeout counter\n this.timeoutSocketCount = 0;\n this.timeoutSocketCountLastCheck = 0;\n\n this.on('free', socket => {\n // https://github.com/nodejs/node/pull/32000\n // Node.js native agent will check socket timeout eqs agent.options.timeout.\n // Use the ttl or freeSocketTimeout to overwrite.\n const timeout = this.calcSocketTimeout(socket);\n if (timeout > 0 && socket.timeout !== timeout) {\n socket.setTimeout(timeout);\n }\n });\n }\n\n get freeSocketKeepAliveTimeout() {\n deprecate('agent.freeSocketKeepAliveTimeout is deprecated, please use agent.options.freeSocketTimeout instead');\n return this.options.freeSocketTimeout;\n }\n\n get timeout() {\n deprecate('agent.timeout is deprecated, please use agent.options.timeout instead');\n return this.options.timeout;\n }\n\n get socketActiveTTL() {\n deprecate('agent.socketActiveTTL is deprecated, please use agent.options.socketActiveTTL instead');\n return this.options.socketActiveTTL;\n }\n\n calcSocketTimeout(socket) {\n /**\n * return <= 0: should free socket\n * return > 0: should update socket timeout\n * return undefined: not find custom timeout\n */\n let freeSocketTimeout = this.options.freeSocketTimeout;\n const socketActiveTTL = this.options.socketActiveTTL;\n if (socketActiveTTL) {\n // check socketActiveTTL\n const aliveTime = Date.now() - socket[SOCKET_CREATED_TIME];\n const diff = socketActiveTTL - aliveTime;\n if (diff <= 0) {\n return diff;\n }\n if (freeSocketTimeout && diff < freeSocketTimeout) {\n freeSocketTimeout = diff;\n }\n }\n // set freeSocketTimeout\n if (freeSocketTimeout) {\n // set free keepalive timer\n // try to use socket custom freeSocketTimeout first, support headers['keep-alive']\n // https://github.com/node-modules/urllib/blob/b76053020923f4d99a1c93cf2e16e0c5ba10bacf/lib/urllib.js#L498\n const customFreeSocketTimeout = socket.freeSocketTimeout || socket.freeSocketKeepAliveTimeout;\n return customFreeSocketTimeout || freeSocketTimeout;\n }\n }\n\n keepSocketAlive(socket) {\n const result = super.keepSocketAlive(socket);\n // should not keepAlive, do nothing\n if (!result) return result;\n\n const customTimeout = this.calcSocketTimeout(socket);\n if (typeof customTimeout === 'undefined') {\n return true;\n }\n if (customTimeout <= 0) {\n debug('%s(requests: %s, finished: %s) free but need to destroy by TTL, request count %s, diff is %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], customTimeout);\n return false;\n }\n if (socket.timeout !== customTimeout) {\n socket.setTimeout(customTimeout);\n }\n return true;\n }\n\n // only call on addRequest\n reuseSocket(...args) {\n // reuseSocket(socket, req)\n super.reuseSocket(...args);\n const socket = args[0];\n const req = args[1];\n req.reusedSocket = true;\n const agentTimeout = this.options.timeout;\n if (getSocketTimeout(socket) !== agentTimeout) {\n // reset timeout before use\n socket.setTimeout(agentTimeout);\n debug('%s reset timeout to %sms', socket[SOCKET_NAME], agentTimeout);\n }\n socket[SOCKET_REQUEST_COUNT]++;\n debug('%s(requests: %s, finished: %s) reuse on addRequest, timeout %sms',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n getSocketTimeout(socket));\n }\n\n [CREATE_ID]() {\n const id = this[CURRENT_ID]++;\n if (this[CURRENT_ID] === Number.MAX_SAFE_INTEGER) this[CURRENT_ID] = 0;\n return id;\n }\n\n [INIT_SOCKET](socket, options) {\n // bugfix here.\n // https on node 8, 10 won't set agent.options.timeout by default\n // TODO: need to fix on node itself\n if (options.timeout) {\n const timeout = getSocketTimeout(socket);\n if (!timeout) {\n socket.setTimeout(options.timeout);\n }\n }\n\n if (this.options.keepAlive) {\n // Disable Nagle's algorithm: http://blog.caustik.com/2012/04/08/scaling-node-js-to-100k-concurrent-connections/\n // https://fengmk2.com/benchmark/nagle-algorithm-delayed-ack-mock.html\n socket.setNoDelay(true);\n }\n this.createSocketCount++;\n if (this.options.socketActiveTTL) {\n socket[SOCKET_CREATED_TIME] = Date.now();\n }\n // don't show the hole '-----BEGIN CERTIFICATE----' key string\n socket[SOCKET_NAME] = `sock[${this[CREATE_ID]()}#${options._agentKey}]`.split('-----BEGIN', 1)[0];\n socket[SOCKET_REQUEST_COUNT] = 1;\n socket[SOCKET_REQUEST_FINISHED_COUNT] = 0;\n installListeners(this, socket, options);\n }\n\n createConnection(options, oncreate) {\n let called = false;\n const onNewCreate = (err, socket) => {\n if (called) return;\n called = true;\n\n if (err) {\n this.createSocketErrorCount++;\n return oncreate(err);\n }\n this[INIT_SOCKET](socket, options);\n oncreate(err, socket);\n };\n\n const newSocket = super.createConnection(options, onNewCreate);\n if (newSocket) onNewCreate(null, newSocket);\n }\n\n get statusChanged() {\n const changed = this.createSocketCount !== this.createSocketCountLastCheck ||\n this.createSocketErrorCount !== this.createSocketErrorCountLastCheck ||\n this.closeSocketCount !== this.closeSocketCountLastCheck ||\n this.errorSocketCount !== this.errorSocketCountLastCheck ||\n this.timeoutSocketCount !== this.timeoutSocketCountLastCheck ||\n this.requestCount !== this.requestCountLastCheck;\n if (changed) {\n this.createSocketCountLastCheck = this.createSocketCount;\n this.createSocketErrorCountLastCheck = this.createSocketErrorCount;\n this.closeSocketCountLastCheck = this.closeSocketCount;\n this.errorSocketCountLastCheck = this.errorSocketCount;\n this.timeoutSocketCountLastCheck = this.timeoutSocketCount;\n this.requestCountLastCheck = this.requestCount;\n }\n return changed;\n }\n\n getCurrentStatus() {\n return {\n createSocketCount: this.createSocketCount,\n createSocketErrorCount: this.createSocketErrorCount,\n closeSocketCount: this.closeSocketCount,\n errorSocketCount: this.errorSocketCount,\n timeoutSocketCount: this.timeoutSocketCount,\n requestCount: this.requestCount,\n freeSockets: inspect(this.freeSockets),\n sockets: inspect(this.sockets),\n requests: inspect(this.requests),\n };\n }\n}\n\n// node 8 don't has timeout attribute on socket\n// https://github.com/nodejs/node/pull/21204/files#diff-e6ef024c3775d787c38487a6309e491dR408\nfunction getSocketTimeout(socket) {\n return socket.timeout || socket._idleTimeout;\n}\n\nfunction installListeners(agent, socket, options) {\n debug('%s create, timeout %sms', socket[SOCKET_NAME], getSocketTimeout(socket));\n\n // listener socket events: close, timeout, error, free\n function onFree() {\n // create and socket.emit('free') logic\n // https://github.com/nodejs/node/blob/master/lib/_http_agent.js#L311\n // no req on the socket, it should be the new socket\n if (!socket._httpMessage && socket[SOCKET_REQUEST_COUNT] === 1) return;\n\n socket[SOCKET_REQUEST_FINISHED_COUNT]++;\n agent.requestCount++;\n debug('%s(requests: %s, finished: %s) free',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n\n // should reuse on pedding requests?\n const name = agent.getName(options);\n if (socket.writable && agent.requests[name] && agent.requests[name].length) {\n // will be reuse on agent free listener\n socket[SOCKET_REQUEST_COUNT]++;\n debug('%s(requests: %s, finished: %s) will be reuse on agent free event',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n }\n }\n socket.on('free', onFree);\n\n function onClose(isError) {\n debug('%s(requests: %s, finished: %s) close, isError: %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], isError);\n agent.closeSocketCount++;\n }\n socket.on('close', onClose);\n\n // start socket timeout handler\n function onTimeout() {\n // onTimeout and emitRequestTimeout(_http_client.js)\n // https://github.com/nodejs/node/blob/v12.x/lib/_http_client.js#L711\n const listenerCount = socket.listeners('timeout').length;\n // node <= 10, default listenerCount is 1, onTimeout\n // 11 < node <= 12, default listenerCount is 2, onTimeout and emitRequestTimeout\n // node >= 13, default listenerCount is 3, onTimeout,\n // onTimeout(https://github.com/nodejs/node/pull/32000/files#diff-5f7fb0850412c6be189faeddea6c5359R333)\n // and emitRequestTimeout\n const timeout = getSocketTimeout(socket);\n const req = socket._httpMessage;\n const reqTimeoutListenerCount = req && req.listeners('timeout').length || 0;\n debug('%s(requests: %s, finished: %s) timeout after %sms, listeners %s, defaultTimeoutListenerCount %s, hasHttpRequest %s, HttpRequest timeoutListenerCount %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n timeout, listenerCount, defaultTimeoutListenerCount, !!req, reqTimeoutListenerCount);\n if (debug.enabled) {\n debug('timeout listeners: %s', socket.listeners('timeout').map(f => f.name).join(', '));\n }\n agent.timeoutSocketCount++;\n const name = agent.getName(options);\n if (agent.freeSockets[name] && agent.freeSockets[name].indexOf(socket) !== -1) {\n // free socket timeout, destroy quietly\n socket.destroy();\n // Remove it from freeSockets list immediately to prevent new requests\n // from being sent through this socket.\n agent.removeSocket(socket, options);\n debug('%s is free, destroy quietly', socket[SOCKET_NAME]);\n } else {\n // if there is no any request socket timeout handler,\n // agent need to handle socket timeout itself.\n //\n // custom request socket timeout handle logic must follow these rules:\n // 1. Destroy socket first\n // 2. Must emit socket 'agentRemove' event tell agent remove socket\n // from freeSockets list immediately.\n // Otherise you may be get 'socket hang up' error when reuse\n // free socket and timeout happen in the same time.\n if (reqTimeoutListenerCount === 0) {\n const error = new Error('Socket timeout');\n error.code = 'ERR_SOCKET_TIMEOUT';\n error.timeout = timeout;\n // must manually call socket.end() or socket.destroy() to end the connection.\n // https://nodejs.org/dist/latest-v10.x/docs/api/net.html#net_socket_settimeout_timeout_callback\n socket.destroy(error);\n agent.removeSocket(socket, options);\n debug('%s destroy with timeout error', socket[SOCKET_NAME]);\n }\n }\n }\n socket.on('timeout', onTimeout);\n\n function onError(err) {\n const listenerCount = socket.listeners('error').length;\n debug('%s(requests: %s, finished: %s) error: %s, listenerCount: %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n err, listenerCount);\n agent.errorSocketCount++;\n if (listenerCount === 1) {\n // if socket don't contain error event handler, don't catch it, emit it again\n debug('%s emit uncaught error event', socket[SOCKET_NAME]);\n socket.removeListener('error', onError);\n socket.emit('error', err);\n }\n }\n socket.on('error', onError);\n\n function onRemove() {\n debug('%s(requests: %s, finished: %s) agentRemove',\n socket[SOCKET_NAME],\n socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n // We need this function for cases like HTTP 'upgrade'\n // (defined by WebSockets) where we need to remove a socket from the\n // pool because it'll be locked up indefinitely\n socket.removeListener('close', onClose);\n socket.removeListener('error', onError);\n socket.removeListener('free', onFree);\n socket.removeListener('timeout', onTimeout);\n socket.removeListener('agentRemove', onRemove);\n }\n socket.on('agentRemove', onRemove);\n}\n\nmodule.exports = Agent;\n\nfunction inspect(obj) {\n const res = {};\n for (const key in obj) {\n res[key] = obj[key].length;\n }\n return res;\n}\n","'use strict';\n\nconst OriginalHttpsAgent = require('https').Agent;\nconst HttpAgent = require('./agent');\nconst {\n INIT_SOCKET,\n CREATE_HTTPS_CONNECTION,\n} = require('./constants');\n\nclass HttpsAgent extends HttpAgent {\n constructor(options) {\n super(options);\n\n this.defaultPort = 443;\n this.protocol = 'https:';\n this.maxCachedSessions = this.options.maxCachedSessions;\n /* istanbul ignore next */\n if (this.maxCachedSessions === undefined) {\n this.maxCachedSessions = 100;\n }\n\n this._sessionCache = {\n map: {},\n list: [],\n };\n }\n\n createConnection(options) {\n const socket = this[CREATE_HTTPS_CONNECTION](options);\n this[INIT_SOCKET](socket, options);\n return socket;\n }\n}\n\n// https://github.com/nodejs/node/blob/master/lib/https.js#L89\nHttpsAgent.prototype[CREATE_HTTPS_CONNECTION] = OriginalHttpsAgent.prototype.createConnection;\n\n[\n 'getName',\n '_getSession',\n '_cacheSession',\n // https://github.com/nodejs/node/pull/4982\n '_evictSession',\n].forEach(function(method) {\n /* istanbul ignore next */\n if (typeof OriginalHttpsAgent.prototype[method] === 'function') {\n HttpsAgent.prototype[method] = OriginalHttpsAgent.prototype[method];\n }\n});\n\nmodule.exports = HttpsAgent;\n","'use strict';\n\nmodule.exports = require('./lib/agent');\nmodule.exports.HttpsAgent = require('./lib/https_agent');\nmodule.exports.constants = require('./lib/constants');\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","import * as nodeFetch from 'node-fetch';\n\nexport default (typeof globalThis.fetch === 'function'\n ? // The Fetch API is supported experimentally in Node 17.5+ and natively in Node 18+.\n globalThis.fetch\n : // Otherwise use the polyfill.\n async function (\n input: nodeFetch.RequestInfo,\n init?: nodeFetch.RequestInit,\n ): Promise {\n const processedInput =\n typeof input === 'string' && input.slice(0, 2) === '//'\n ? 'https:' + input\n : input;\n return await nodeFetch.default(processedInput, init);\n }) as typeof globalThis.fetch;\n","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH));\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n const isSigner = byteArray.slice(0, 1)[0] === 1;\n byteArray = byteArray.slice(1);\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toBytes","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","sha256","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","blob","rustString","rsl","struct","u32","offset","_decode","bind","_encode","rslShim","str","chars","span","authorized","lockup","ns64","voteInit","u8","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","bytes","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","assert","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","Message","args","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","seq","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","byteArray","accountCount","i","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","splice","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","add","_len","items","_key","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","nu64","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","encodeDecode","bigInt","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","u64","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","require$$1","require$$0","require$$2","require$$3","srcModule","INIT_SOCKET","require$$4","HttpsAgent","agentkeepaliveModule","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","input","init","processedInput","nodeFetch","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","number","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","agentOptions","freeSocketTimeout","keepAlive","maxSockets","HttpsKeepAliveAgent","HttpKeepAliveAgent","isHttps","NodeHttpsAgent","fetchWithMiddleware","info","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","hash","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","u16","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","split","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAMO,IAAMA,kBAAkB,GAAGC,OAAO,CAACC,KAAK,CAACC,gBAAgB,CAAA;AACzD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAyB;EACnD,IAAMC,aAAa,GAAGJ,OAAO,CAACC,KAAK,CAACC,gBAAgB,EAAE,CAAA;AACtD,EAAA,IAAMG,SAAS,GAAGC,YAAY,CAACF,aAAa,CAAC,CAAA;AAC7C,EAAA,IAAMG,SAAS,GAAG,IAAIC,UAAU,CAAC,EAAE,CAAC,CAAA;AACpCD,EAAAA,SAAS,CAACE,GAAG,CAACL,aAAa,CAAC,CAAA;AAC5BG,EAAAA,SAAS,CAACE,GAAG,CAACJ,SAAS,EAAE,EAAE,CAAC,CAAA;EAC5B,OAAO;AACLA,IAAAA,SAAS,EAATA,SAAS;AACTE,IAAAA,SAAS,EAATA,SAAAA;GACD,CAAA;AACH,CAAC,CAAA;AACM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CAAAA,MAAA,CAAYyV,IAAI,CAACC,SAAS,CAAC0G,MAAM,CAAC,MAChE,CAAC,CAAA;AAAA,QAAA,KAAA,EAAA;AAAA,UAAA,OAAAtb,QAAA,CAAAI,MAAA,CAAA,QAAA,EAGI6C,SAAS,CAAA,CAAA;AAAA,QAAA,KAAA,EAAA,CAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAjD,QAAA,CAAAK,IAAA,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA,EAAAZ,OAAA,CAAA,CAAA;GACjB,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAq/D,6BAAA,CAAAp+D,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA;;ACjFD;AACA;AACA;AACO,IAAMu+D,gBAAgB,GAAG;;;;","x_google_ignoreList":[30,31,32,33,34,35,36,37,38,39,40,41,42,43]} -\ No newline at end of file -+{"version":3,"file":"index.esm.js","sources":["../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/utils/guarded-array-utils.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../../../node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js","../../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js","../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js","../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js","../../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/constants.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/agent.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/lib/https_agent.js","../../../node_modules/.pnpm/agentkeepalive@4.3.0/node_modules/agentkeepalive/index.js","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/fetch-impl.ts","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","const END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';\n\n/**\n * Delegates to `Array#shift`, but throws if the array is zero-length.\n */\nexport function guardedShift(byteArray: T[]): T {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift() as T;\n}\n\n/**\n * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of\n * the array.\n */\nexport function guardedSplice(\n byteArray: T[],\n ...args:\n | [start: number, deleteCount?: number]\n | [start: number, deleteCount: number, ...items: T[]]\n): T[] {\n const [start] = args;\n if (\n args.length === 2 // Implies that `deleteCount` was supplied\n ? start + (args[1] ?? 0) > byteArray.length\n : start >= byteArray.length\n ) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(\n ...(args as Parameters),\n );\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = guardedShift(byteArray);\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray),\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(\n byteArray,\n 0,\n accountKeyIndexesLength,\n );\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = guardedSplice(\n byteArray,\n 0,\n writableIndexesLength,\n );\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(\n byteArray,\n 0,\n readonlyIndexesLength,\n );\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","/*!\n * humanize-ms - index.js\n * Copyright(c) 2014 dead_horse \n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module dependencies.\n */\n\nvar util = require('util');\nvar ms = require('ms');\n\nmodule.exports = function (t) {\n if (typeof t === 'number') return t;\n var r = ms(t);\n if (r === undefined) {\n var err = new Error(util.format('humanize-ms(%j) result undefined', t));\n console.warn(err.stack);\n }\n return r;\n};\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","/* eslint-env browser */\n'use strict';\n\nfunction getChromeVersion() {\n\tconst matches = /(Chrome|Chromium)\\/(?\\d+)\\./.exec(navigator.userAgent);\n\n\tif (!matches) {\n\t\treturn;\n\t}\n\n\treturn Number.parseInt(matches.groups.chromeVersion, 10);\n}\n\nconst colorSupport = getChromeVersion() >= 69 ? {\n\tlevel: 1,\n\thasBasic: true,\n\thas256: false,\n\thas16m: false\n} : false;\n\nmodule.exports = {\n\tstdout: colorSupport,\n\tstderr: colorSupport\n};\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.format(...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","/*!\n * depd\n * Copyright(c) 2014-2018 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\n\nvar relative = require('path').relative\n\n/**\n * Module exports.\n */\n\nmodule.exports = depd\n\n/**\n * Get the path to base files on.\n */\n\nvar basePath = process.cwd()\n\n/**\n * Determine if namespace is contained in the string.\n */\n\nfunction containsNamespace (str, namespace) {\n var vals = str.split(/[ ,]+/)\n var ns = String(namespace).toLowerCase()\n\n for (var i = 0; i < vals.length; i++) {\n var val = vals[i]\n\n // namespace contained\n if (val && (val === '*' || val.toLowerCase() === ns)) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * Convert a data descriptor to accessor descriptor.\n */\n\nfunction convertDataDescriptorToAccessor (obj, prop, message) {\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n var value = descriptor.value\n\n descriptor.get = function getter () { return value }\n\n if (descriptor.writable) {\n descriptor.set = function setter (val) { return (value = val) }\n }\n\n delete descriptor.value\n delete descriptor.writable\n\n Object.defineProperty(obj, prop, descriptor)\n\n return descriptor\n}\n\n/**\n * Create arguments string to keep arity.\n */\n\nfunction createArgumentsString (arity) {\n var str = ''\n\n for (var i = 0; i < arity; i++) {\n str += ', arg' + i\n }\n\n return str.substr(2)\n}\n\n/**\n * Create stack string from stack.\n */\n\nfunction createStackString (stack) {\n var str = this.name + ': ' + this.namespace\n\n if (this.message) {\n str += ' deprecated ' + this.message\n }\n\n for (var i = 0; i < stack.length; i++) {\n str += '\\n at ' + stack[i].toString()\n }\n\n return str\n}\n\n/**\n * Create deprecate for namespace in caller.\n */\n\nfunction depd (namespace) {\n if (!namespace) {\n throw new TypeError('argument namespace is required')\n }\n\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n var file = site[0]\n\n function deprecate (message) {\n // call to self as log\n log.call(deprecate, message)\n }\n\n deprecate._file = file\n deprecate._ignored = isignored(namespace)\n deprecate._namespace = namespace\n deprecate._traced = istraced(namespace)\n deprecate._warned = Object.create(null)\n\n deprecate.function = wrapfunction\n deprecate.property = wrapproperty\n\n return deprecate\n}\n\n/**\n * Determine if event emitter has listeners of a given type.\n *\n * The way to do this check is done three different ways in Node.js >= 0.8\n * so this consolidates them into a minimal set using instance methods.\n *\n * @param {EventEmitter} emitter\n * @param {string} type\n * @returns {boolean}\n * @private\n */\n\nfunction eehaslisteners (emitter, type) {\n var count = typeof emitter.listenerCount !== 'function'\n ? emitter.listeners(type).length\n : emitter.listenerCount(type)\n\n return count > 0\n}\n\n/**\n * Determine if namespace is ignored.\n */\n\nfunction isignored (namespace) {\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}\n\n/**\n * Determine if namespace is traced.\n */\n\nfunction istraced (namespace) {\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = process.env.TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}\n\n/**\n * Display deprecation message.\n */\n\nfunction log (message, site) {\n var haslisteners = eehaslisteners(process, 'deprecation')\n\n // abort early if no destination\n if (!haslisteners && this._ignored) {\n return\n }\n\n var caller\n var callFile\n var callSite\n var depSite\n var i = 0\n var seen = false\n var stack = getStack()\n var file = this._file\n\n if (site) {\n // provided site\n depSite = site\n callSite = callSiteLocation(stack[1])\n callSite.name = depSite.name\n file = callSite[0]\n } else {\n // get call site\n i = 2\n depSite = callSiteLocation(stack[i])\n callSite = depSite\n }\n\n // get caller of deprecated thing in relation to file\n for (; i < stack.length; i++) {\n caller = callSiteLocation(stack[i])\n callFile = caller[0]\n\n if (callFile === file) {\n seen = true\n } else if (callFile === this._file) {\n file = this._file\n } else if (seen) {\n break\n }\n }\n\n var key = caller\n ? depSite.join(':') + '__' + caller.join(':')\n : undefined\n\n if (key !== undefined && key in this._warned) {\n // already warned\n return\n }\n\n this._warned[key] = true\n\n // generate automatic message from call site\n var msg = message\n if (!msg) {\n msg = callSite === depSite || !callSite.name\n ? defaultMessage(depSite)\n : defaultMessage(callSite)\n }\n\n // emit deprecation if listeners exist\n if (haslisteners) {\n var err = DeprecationError(this._namespace, msg, stack.slice(i))\n process.emit('deprecation', err)\n return\n }\n\n // format and write message\n var format = process.stderr.isTTY\n ? formatColor\n : formatPlain\n var output = format.call(this, msg, caller, stack.slice(i))\n process.stderr.write(output + '\\n', 'utf8')\n}\n\n/**\n * Get call site location as array.\n */\n\nfunction callSiteLocation (callSite) {\n var file = callSite.getFileName() || ''\n var line = callSite.getLineNumber()\n var colm = callSite.getColumnNumber()\n\n if (callSite.isEval()) {\n file = callSite.getEvalOrigin() + ', ' + file\n }\n\n var site = [file, line, colm]\n\n site.callSite = callSite\n site.name = callSite.getFunctionName()\n\n return site\n}\n\n/**\n * Generate a default message from the site.\n */\n\nfunction defaultMessage (site) {\n var callSite = site.callSite\n var funcName = site.name\n\n // make useful anonymous name\n if (!funcName) {\n funcName = ''\n }\n\n var context = callSite.getThis()\n var typeName = context && callSite.getTypeName()\n\n // ignore useless type name\n if (typeName === 'Object') {\n typeName = undefined\n }\n\n // make useful type name\n if (typeName === 'Function') {\n typeName = context.name || typeName\n }\n\n return typeName && callSite.getMethodName()\n ? typeName + '.' + funcName\n : funcName\n}\n\n/**\n * Format deprecation message without color.\n */\n\nfunction formatPlain (msg, caller, stack) {\n var timestamp = new Date().toUTCString()\n\n var formatted = timestamp +\n ' ' + this._namespace +\n ' deprecated ' + msg\n\n // add stack trace\n if (this._traced) {\n for (var i = 0; i < stack.length; i++) {\n formatted += '\\n at ' + stack[i].toString()\n }\n\n return formatted\n }\n\n if (caller) {\n formatted += ' at ' + formatLocation(caller)\n }\n\n return formatted\n}\n\n/**\n * Format deprecation message with color.\n */\n\nfunction formatColor (msg, caller, stack) {\n var formatted = '\\x1b[36;1m' + this._namespace + '\\x1b[22;39m' + // bold cyan\n ' \\x1b[33;1mdeprecated\\x1b[22;39m' + // bold yellow\n ' \\x1b[0m' + msg + '\\x1b[39m' // reset\n\n // add stack trace\n if (this._traced) {\n for (var i = 0; i < stack.length; i++) {\n formatted += '\\n \\x1b[36mat ' + stack[i].toString() + '\\x1b[39m' // cyan\n }\n\n return formatted\n }\n\n if (caller) {\n formatted += ' \\x1b[36m' + formatLocation(caller) + '\\x1b[39m' // cyan\n }\n\n return formatted\n}\n\n/**\n * Format call site location.\n */\n\nfunction formatLocation (callSite) {\n return relative(basePath, callSite[0]) +\n ':' + callSite[1] +\n ':' + callSite[2]\n}\n\n/**\n * Get the stack as array of call sites.\n */\n\nfunction getStack () {\n var limit = Error.stackTraceLimit\n var obj = {}\n var prep = Error.prepareStackTrace\n\n Error.prepareStackTrace = prepareObjectStackTrace\n Error.stackTraceLimit = Math.max(10, limit)\n\n // capture the stack\n Error.captureStackTrace(obj)\n\n // slice this function off the top\n var stack = obj.stack.slice(1)\n\n Error.prepareStackTrace = prep\n Error.stackTraceLimit = limit\n\n return stack\n}\n\n/**\n * Capture call site stack from v8.\n */\n\nfunction prepareObjectStackTrace (obj, stack) {\n return stack\n}\n\n/**\n * Return a wrapped function in a deprecation message.\n */\n\nfunction wrapfunction (fn, message) {\n if (typeof fn !== 'function') {\n throw new TypeError('argument fn must be a function')\n }\n\n var args = createArgumentsString(fn.length)\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n site.name = fn.name\n\n // eslint-disable-next-line no-new-func\n var deprecatedfn = new Function('fn', 'log', 'deprecate', 'message', 'site',\n '\"use strict\"\\n' +\n 'return function (' + args + ') {' +\n 'log.call(deprecate, message, site)\\n' +\n 'return fn.apply(this, arguments)\\n' +\n '}')(fn, log, this, message, site)\n\n return deprecatedfn\n}\n\n/**\n * Wrap property in a deprecation message.\n */\n\nfunction wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}\n\n/**\n * Create DeprecationError for deprecation\n */\n\nfunction DeprecationError (namespace, message, stack) {\n var error = new Error()\n var stackString\n\n Object.defineProperty(error, 'constructor', {\n value: DeprecationError\n })\n\n Object.defineProperty(error, 'message', {\n configurable: true,\n enumerable: false,\n value: message,\n writable: true\n })\n\n Object.defineProperty(error, 'name', {\n enumerable: false,\n configurable: true,\n value: 'DeprecationError',\n writable: true\n })\n\n Object.defineProperty(error, 'namespace', {\n configurable: true,\n enumerable: false,\n value: namespace,\n writable: true\n })\n\n Object.defineProperty(error, 'stack', {\n configurable: true,\n enumerable: false,\n get: function () {\n if (stackString !== undefined) {\n return stackString\n }\n\n // prepare stack trace\n return (stackString = createStackString.call(this, stack))\n },\n set: function setter (val) {\n stackString = val\n }\n })\n\n return error\n}\n","'use strict';\n\nmodule.exports = {\n // agent\n CURRENT_ID: Symbol('agentkeepalive#currentId'),\n CREATE_ID: Symbol('agentkeepalive#createId'),\n INIT_SOCKET: Symbol('agentkeepalive#initSocket'),\n CREATE_HTTPS_CONNECTION: Symbol('agentkeepalive#createHttpsConnection'),\n // socket\n SOCKET_CREATED_TIME: Symbol('agentkeepalive#socketCreatedTime'),\n SOCKET_NAME: Symbol('agentkeepalive#socketName'),\n SOCKET_REQUEST_COUNT: Symbol('agentkeepalive#socketRequestCount'),\n SOCKET_REQUEST_FINISHED_COUNT: Symbol('agentkeepalive#socketRequestFinishedCount'),\n};\n","'use strict';\n\nconst OriginalAgent = require('http').Agent;\nconst ms = require('humanize-ms');\nconst debug = require('debug')('agentkeepalive');\nconst deprecate = require('depd')('agentkeepalive');\nconst {\n INIT_SOCKET,\n CURRENT_ID,\n CREATE_ID,\n SOCKET_CREATED_TIME,\n SOCKET_NAME,\n SOCKET_REQUEST_COUNT,\n SOCKET_REQUEST_FINISHED_COUNT,\n} = require('./constants');\n\n// OriginalAgent come from\n// - https://github.com/nodejs/node/blob/v8.12.0/lib/_http_agent.js\n// - https://github.com/nodejs/node/blob/v10.12.0/lib/_http_agent.js\n\n// node <= 10\nlet defaultTimeoutListenerCount = 1;\nconst majorVersion = parseInt(process.version.split('.', 1)[0].substring(1));\nif (majorVersion >= 11 && majorVersion <= 12) {\n defaultTimeoutListenerCount = 2;\n} else if (majorVersion >= 13) {\n defaultTimeoutListenerCount = 3;\n}\n\nclass Agent extends OriginalAgent {\n constructor(options) {\n options = options || {};\n options.keepAlive = options.keepAlive !== false;\n // default is keep-alive and 4s free socket timeout\n // see https://medium.com/ssense-tech/reduce-networking-errors-in-nodejs-23b4eb9f2d83\n if (options.freeSocketTimeout === undefined) {\n options.freeSocketTimeout = 4000;\n }\n // Legacy API: keepAliveTimeout should be rename to `freeSocketTimeout`\n if (options.keepAliveTimeout) {\n deprecate('options.keepAliveTimeout is deprecated, please use options.freeSocketTimeout instead');\n options.freeSocketTimeout = options.keepAliveTimeout;\n delete options.keepAliveTimeout;\n }\n // Legacy API: freeSocketKeepAliveTimeout should be rename to `freeSocketTimeout`\n if (options.freeSocketKeepAliveTimeout) {\n deprecate('options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead');\n options.freeSocketTimeout = options.freeSocketKeepAliveTimeout;\n delete options.freeSocketKeepAliveTimeout;\n }\n\n // Sets the socket to timeout after timeout milliseconds of inactivity on the socket.\n // By default is double free socket timeout.\n if (options.timeout === undefined) {\n // make sure socket default inactivity timeout >= 8s\n options.timeout = Math.max(options.freeSocketTimeout * 2, 8000);\n }\n\n // support humanize format\n options.timeout = ms(options.timeout);\n options.freeSocketTimeout = ms(options.freeSocketTimeout);\n options.socketActiveTTL = options.socketActiveTTL ? ms(options.socketActiveTTL) : 0;\n\n super(options);\n\n this[CURRENT_ID] = 0;\n\n // create socket success counter\n this.createSocketCount = 0;\n this.createSocketCountLastCheck = 0;\n\n this.createSocketErrorCount = 0;\n this.createSocketErrorCountLastCheck = 0;\n\n this.closeSocketCount = 0;\n this.closeSocketCountLastCheck = 0;\n\n // socket error event count\n this.errorSocketCount = 0;\n this.errorSocketCountLastCheck = 0;\n\n // request finished counter\n this.requestCount = 0;\n this.requestCountLastCheck = 0;\n\n // including free socket timeout counter\n this.timeoutSocketCount = 0;\n this.timeoutSocketCountLastCheck = 0;\n\n this.on('free', socket => {\n // https://github.com/nodejs/node/pull/32000\n // Node.js native agent will check socket timeout eqs agent.options.timeout.\n // Use the ttl or freeSocketTimeout to overwrite.\n const timeout = this.calcSocketTimeout(socket);\n if (timeout > 0 && socket.timeout !== timeout) {\n socket.setTimeout(timeout);\n }\n });\n }\n\n get freeSocketKeepAliveTimeout() {\n deprecate('agent.freeSocketKeepAliveTimeout is deprecated, please use agent.options.freeSocketTimeout instead');\n return this.options.freeSocketTimeout;\n }\n\n get timeout() {\n deprecate('agent.timeout is deprecated, please use agent.options.timeout instead');\n return this.options.timeout;\n }\n\n get socketActiveTTL() {\n deprecate('agent.socketActiveTTL is deprecated, please use agent.options.socketActiveTTL instead');\n return this.options.socketActiveTTL;\n }\n\n calcSocketTimeout(socket) {\n /**\n * return <= 0: should free socket\n * return > 0: should update socket timeout\n * return undefined: not find custom timeout\n */\n let freeSocketTimeout = this.options.freeSocketTimeout;\n const socketActiveTTL = this.options.socketActiveTTL;\n if (socketActiveTTL) {\n // check socketActiveTTL\n const aliveTime = Date.now() - socket[SOCKET_CREATED_TIME];\n const diff = socketActiveTTL - aliveTime;\n if (diff <= 0) {\n return diff;\n }\n if (freeSocketTimeout && diff < freeSocketTimeout) {\n freeSocketTimeout = diff;\n }\n }\n // set freeSocketTimeout\n if (freeSocketTimeout) {\n // set free keepalive timer\n // try to use socket custom freeSocketTimeout first, support headers['keep-alive']\n // https://github.com/node-modules/urllib/blob/b76053020923f4d99a1c93cf2e16e0c5ba10bacf/lib/urllib.js#L498\n const customFreeSocketTimeout = socket.freeSocketTimeout || socket.freeSocketKeepAliveTimeout;\n return customFreeSocketTimeout || freeSocketTimeout;\n }\n }\n\n keepSocketAlive(socket) {\n const result = super.keepSocketAlive(socket);\n // should not keepAlive, do nothing\n if (!result) return result;\n\n const customTimeout = this.calcSocketTimeout(socket);\n if (typeof customTimeout === 'undefined') {\n return true;\n }\n if (customTimeout <= 0) {\n debug('%s(requests: %s, finished: %s) free but need to destroy by TTL, request count %s, diff is %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], customTimeout);\n return false;\n }\n if (socket.timeout !== customTimeout) {\n socket.setTimeout(customTimeout);\n }\n return true;\n }\n\n // only call on addRequest\n reuseSocket(...args) {\n // reuseSocket(socket, req)\n super.reuseSocket(...args);\n const socket = args[0];\n const req = args[1];\n req.reusedSocket = true;\n const agentTimeout = this.options.timeout;\n if (getSocketTimeout(socket) !== agentTimeout) {\n // reset timeout before use\n socket.setTimeout(agentTimeout);\n debug('%s reset timeout to %sms', socket[SOCKET_NAME], agentTimeout);\n }\n socket[SOCKET_REQUEST_COUNT]++;\n debug('%s(requests: %s, finished: %s) reuse on addRequest, timeout %sms',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n getSocketTimeout(socket));\n }\n\n [CREATE_ID]() {\n const id = this[CURRENT_ID]++;\n if (this[CURRENT_ID] === Number.MAX_SAFE_INTEGER) this[CURRENT_ID] = 0;\n return id;\n }\n\n [INIT_SOCKET](socket, options) {\n // bugfix here.\n // https on node 8, 10 won't set agent.options.timeout by default\n // TODO: need to fix on node itself\n if (options.timeout) {\n const timeout = getSocketTimeout(socket);\n if (!timeout) {\n socket.setTimeout(options.timeout);\n }\n }\n\n if (this.options.keepAlive) {\n // Disable Nagle's algorithm: http://blog.caustik.com/2012/04/08/scaling-node-js-to-100k-concurrent-connections/\n // https://fengmk2.com/benchmark/nagle-algorithm-delayed-ack-mock.html\n socket.setNoDelay(true);\n }\n this.createSocketCount++;\n if (this.options.socketActiveTTL) {\n socket[SOCKET_CREATED_TIME] = Date.now();\n }\n // don't show the hole '-----BEGIN CERTIFICATE----' key string\n socket[SOCKET_NAME] = `sock[${this[CREATE_ID]()}#${options._agentKey}]`.split('-----BEGIN', 1)[0];\n socket[SOCKET_REQUEST_COUNT] = 1;\n socket[SOCKET_REQUEST_FINISHED_COUNT] = 0;\n installListeners(this, socket, options);\n }\n\n createConnection(options, oncreate) {\n let called = false;\n const onNewCreate = (err, socket) => {\n if (called) return;\n called = true;\n\n if (err) {\n this.createSocketErrorCount++;\n return oncreate(err);\n }\n this[INIT_SOCKET](socket, options);\n oncreate(err, socket);\n };\n\n const newSocket = super.createConnection(options, onNewCreate);\n if (newSocket) onNewCreate(null, newSocket);\n }\n\n get statusChanged() {\n const changed = this.createSocketCount !== this.createSocketCountLastCheck ||\n this.createSocketErrorCount !== this.createSocketErrorCountLastCheck ||\n this.closeSocketCount !== this.closeSocketCountLastCheck ||\n this.errorSocketCount !== this.errorSocketCountLastCheck ||\n this.timeoutSocketCount !== this.timeoutSocketCountLastCheck ||\n this.requestCount !== this.requestCountLastCheck;\n if (changed) {\n this.createSocketCountLastCheck = this.createSocketCount;\n this.createSocketErrorCountLastCheck = this.createSocketErrorCount;\n this.closeSocketCountLastCheck = this.closeSocketCount;\n this.errorSocketCountLastCheck = this.errorSocketCount;\n this.timeoutSocketCountLastCheck = this.timeoutSocketCount;\n this.requestCountLastCheck = this.requestCount;\n }\n return changed;\n }\n\n getCurrentStatus() {\n return {\n createSocketCount: this.createSocketCount,\n createSocketErrorCount: this.createSocketErrorCount,\n closeSocketCount: this.closeSocketCount,\n errorSocketCount: this.errorSocketCount,\n timeoutSocketCount: this.timeoutSocketCount,\n requestCount: this.requestCount,\n freeSockets: inspect(this.freeSockets),\n sockets: inspect(this.sockets),\n requests: inspect(this.requests),\n };\n }\n}\n\n// node 8 don't has timeout attribute on socket\n// https://github.com/nodejs/node/pull/21204/files#diff-e6ef024c3775d787c38487a6309e491dR408\nfunction getSocketTimeout(socket) {\n return socket.timeout || socket._idleTimeout;\n}\n\nfunction installListeners(agent, socket, options) {\n debug('%s create, timeout %sms', socket[SOCKET_NAME], getSocketTimeout(socket));\n\n // listener socket events: close, timeout, error, free\n function onFree() {\n // create and socket.emit('free') logic\n // https://github.com/nodejs/node/blob/master/lib/_http_agent.js#L311\n // no req on the socket, it should be the new socket\n if (!socket._httpMessage && socket[SOCKET_REQUEST_COUNT] === 1) return;\n\n socket[SOCKET_REQUEST_FINISHED_COUNT]++;\n agent.requestCount++;\n debug('%s(requests: %s, finished: %s) free',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n\n // should reuse on pedding requests?\n const name = agent.getName(options);\n if (socket.writable && agent.requests[name] && agent.requests[name].length) {\n // will be reuse on agent free listener\n socket[SOCKET_REQUEST_COUNT]++;\n debug('%s(requests: %s, finished: %s) will be reuse on agent free event',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n }\n }\n socket.on('free', onFree);\n\n function onClose(isError) {\n debug('%s(requests: %s, finished: %s) close, isError: %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], isError);\n agent.closeSocketCount++;\n }\n socket.on('close', onClose);\n\n // start socket timeout handler\n function onTimeout() {\n // onTimeout and emitRequestTimeout(_http_client.js)\n // https://github.com/nodejs/node/blob/v12.x/lib/_http_client.js#L711\n const listenerCount = socket.listeners('timeout').length;\n // node <= 10, default listenerCount is 1, onTimeout\n // 11 < node <= 12, default listenerCount is 2, onTimeout and emitRequestTimeout\n // node >= 13, default listenerCount is 3, onTimeout,\n // onTimeout(https://github.com/nodejs/node/pull/32000/files#diff-5f7fb0850412c6be189faeddea6c5359R333)\n // and emitRequestTimeout\n const timeout = getSocketTimeout(socket);\n const req = socket._httpMessage;\n const reqTimeoutListenerCount = req && req.listeners('timeout').length || 0;\n debug('%s(requests: %s, finished: %s) timeout after %sms, listeners %s, defaultTimeoutListenerCount %s, hasHttpRequest %s, HttpRequest timeoutListenerCount %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n timeout, listenerCount, defaultTimeoutListenerCount, !!req, reqTimeoutListenerCount);\n if (debug.enabled) {\n debug('timeout listeners: %s', socket.listeners('timeout').map(f => f.name).join(', '));\n }\n agent.timeoutSocketCount++;\n const name = agent.getName(options);\n if (agent.freeSockets[name] && agent.freeSockets[name].indexOf(socket) !== -1) {\n // free socket timeout, destroy quietly\n socket.destroy();\n // Remove it from freeSockets list immediately to prevent new requests\n // from being sent through this socket.\n agent.removeSocket(socket, options);\n debug('%s is free, destroy quietly', socket[SOCKET_NAME]);\n } else {\n // if there is no any request socket timeout handler,\n // agent need to handle socket timeout itself.\n //\n // custom request socket timeout handle logic must follow these rules:\n // 1. Destroy socket first\n // 2. Must emit socket 'agentRemove' event tell agent remove socket\n // from freeSockets list immediately.\n // Otherise you may be get 'socket hang up' error when reuse\n // free socket and timeout happen in the same time.\n if (reqTimeoutListenerCount === 0) {\n const error = new Error('Socket timeout');\n error.code = 'ERR_SOCKET_TIMEOUT';\n error.timeout = timeout;\n // must manually call socket.end() or socket.destroy() to end the connection.\n // https://nodejs.org/dist/latest-v10.x/docs/api/net.html#net_socket_settimeout_timeout_callback\n socket.destroy(error);\n agent.removeSocket(socket, options);\n debug('%s destroy with timeout error', socket[SOCKET_NAME]);\n }\n }\n }\n socket.on('timeout', onTimeout);\n\n function onError(err) {\n const listenerCount = socket.listeners('error').length;\n debug('%s(requests: %s, finished: %s) error: %s, listenerCount: %s',\n socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],\n err, listenerCount);\n agent.errorSocketCount++;\n if (listenerCount === 1) {\n // if socket don't contain error event handler, don't catch it, emit it again\n debug('%s emit uncaught error event', socket[SOCKET_NAME]);\n socket.removeListener('error', onError);\n socket.emit('error', err);\n }\n }\n socket.on('error', onError);\n\n function onRemove() {\n debug('%s(requests: %s, finished: %s) agentRemove',\n socket[SOCKET_NAME],\n socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);\n // We need this function for cases like HTTP 'upgrade'\n // (defined by WebSockets) where we need to remove a socket from the\n // pool because it'll be locked up indefinitely\n socket.removeListener('close', onClose);\n socket.removeListener('error', onError);\n socket.removeListener('free', onFree);\n socket.removeListener('timeout', onTimeout);\n socket.removeListener('agentRemove', onRemove);\n }\n socket.on('agentRemove', onRemove);\n}\n\nmodule.exports = Agent;\n\nfunction inspect(obj) {\n const res = {};\n for (const key in obj) {\n res[key] = obj[key].length;\n }\n return res;\n}\n","'use strict';\n\nconst OriginalHttpsAgent = require('https').Agent;\nconst HttpAgent = require('./agent');\nconst {\n INIT_SOCKET,\n CREATE_HTTPS_CONNECTION,\n} = require('./constants');\n\nclass HttpsAgent extends HttpAgent {\n constructor(options) {\n super(options);\n\n this.defaultPort = 443;\n this.protocol = 'https:';\n this.maxCachedSessions = this.options.maxCachedSessions;\n /* istanbul ignore next */\n if (this.maxCachedSessions === undefined) {\n this.maxCachedSessions = 100;\n }\n\n this._sessionCache = {\n map: {},\n list: [],\n };\n }\n\n createConnection(options) {\n const socket = this[CREATE_HTTPS_CONNECTION](options);\n this[INIT_SOCKET](socket, options);\n return socket;\n }\n}\n\n// https://github.com/nodejs/node/blob/master/lib/https.js#L89\nHttpsAgent.prototype[CREATE_HTTPS_CONNECTION] = OriginalHttpsAgent.prototype.createConnection;\n\n[\n 'getName',\n '_getSession',\n '_cacheSession',\n // https://github.com/nodejs/node/pull/4982\n '_evictSession',\n].forEach(function(method) {\n /* istanbul ignore next */\n if (typeof OriginalHttpsAgent.prototype[method] === 'function') {\n HttpsAgent.prototype[method] = OriginalHttpsAgent.prototype[method];\n }\n});\n\nmodule.exports = HttpsAgent;\n","'use strict';\n\nmodule.exports = require('./lib/agent');\nmodule.exports.HttpsAgent = require('./lib/https_agent');\nmodule.exports.constants = require('./lib/constants');\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","import * as nodeFetch from 'node-fetch';\n\nexport default (typeof globalThis.fetch === 'function'\n ? // The Fetch API is supported experimentally in Node 17.5+ and natively in Node 18+.\n globalThis.fetch\n : // Otherwise use the polyfill.\n async function (\n input: nodeFetch.RequestInfo,\n init?: nodeFetch.RequestInit,\n ): Promise {\n const processedInput =\n typeof input === 'string' && input.slice(0, 2) === '//'\n ? 'https:' + input\n : input;\n return await nodeFetch.default(processedInput, init);\n }) as typeof globalThis.fetch;\n","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\nimport {guardedShift, guardedSplice} from './utils/guarded-array-utils';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toBytes","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","sha256","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","blob","rustString","rsl","struct","u32","offset","_decode","bind","_encode","rslShim","str","chars","span","authorized","lockup","ns64","voteInit","u8","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","bytes","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","assert","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","END_OF_BUFFER_ERROR_MESSAGE","guardedShift","byteArray","guardedSplice","_args$","_len","args","_key","start","splice","Message","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","seq","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","accountCount","i","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","add","items","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","nu64","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","encodeDecode","bigInt","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","u64","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","require$$1","require$$0","require$$2","require$$3","srcModule","INIT_SOCKET","require$$4","HttpsAgent","agentkeepaliveModule","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","input","init","processedInput","nodeFetch","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","number","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","agentOptions","freeSocketTimeout","keepAlive","maxSockets","HttpsKeepAliveAgent","HttpKeepAliveAgent","isHttps","NodeHttpsAgent","fetchWithMiddleware","info","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","hash","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","u16","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","split","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAMO,IAAMA,kBAAkB,GAAGC,OAAO,CAACC,KAAK,CAACC,gBAAgB,CAAA;AACzD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAyB;EACnD,IAAMC,aAAa,GAAGJ,OAAO,CAACC,KAAK,CAACC,gBAAgB,EAAE,CAAA;AACtD,EAAA,IAAMG,SAAS,GAAGC,YAAY,CAACF,aAAa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QAAA,KAAA,KAAA;UAAA,OAAAjD,QAAA,CAAAK,IAAA,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA,EAAAZ,OAAA,CAAA,CAAA;GACjB,CAAA,CAAA,CAAA;AAAA,EAAA,OAAA0/D,6BAAA,CAAAz+D,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA;;ACjFD;AACA;AACA;AACO,IAAM4+D,gBAAgB,GAAG;;;;","x_google_ignoreList":[31,32,33,34,35,36,37,38,39,40,41,42,43,44]} -\ No newline at end of file -diff --git a/lib/index.iife.js b/lib/index.iife.js -index 9d141a74907b1b99029a31024edc0f44b19c2be8..3e99f3f4fab20dee43c990c149d0eb1ecfa42d6a 100644 ---- a/lib/index.iife.js -+++ b/lib/index.iife.js -@@ -13568,6 +13568,35 @@ var solanaWeb3 = (function (exports) { - return CompiledKeys; - }(); - -+ var END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly'; -+ -+ /** -+ * Delegates to `Array#shift`, but throws if the array is zero-length. -+ */ -+ function guardedShift(byteArray) { -+ if (byteArray.length === 0) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.shift(); -+ } -+ -+ /** -+ * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of -+ * the array. -+ */ -+ function guardedSplice(byteArray) { -+ var _args$; -+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { -+ args[_key - 1] = arguments[_key]; -+ } -+ var start = args[0]; -+ if (args.length === 2 // Implies that `deleteCount` was supplied -+ ? start + ((_args$ = args[1]) !== null && _args$ !== void 0 ? _args$ : 0) > byteArray.length : start >= byteArray.length) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.splice.apply(byteArray, _toConsumableArray(args)); -+ } -+ - /** - * An instruction to execute by a program - * -@@ -13751,32 +13780,28 @@ var solanaWeb3 = (function (exports) { - value: function from(buffer$1) { - // Slice up wire data - var byteArray = _toConsumableArray(buffer$1); -- var numRequiredSignatures = byteArray.shift(); -+ var numRequiredSignatures = guardedShift(byteArray); - if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) { - throw new Error('Versioned messages must be deserialized with VersionedMessage.deserialize()'); - } -- var numReadonlySignedAccounts = byteArray.shift(); -- var numReadonlyUnsignedAccounts = byteArray.shift(); -+ var numReadonlySignedAccounts = guardedShift(byteArray); -+ var numReadonlyUnsignedAccounts = guardedShift(byteArray); - var accountCount = decodeLength(byteArray); - var accountKeys = []; - for (var i = 0; i < accountCount; i++) { -- var account = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - accountKeys.push(new PublicKey(buffer.Buffer.from(account))); - } -- var recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - var instructionCount = decodeLength(byteArray); - var instructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var _accountCount = decodeLength(byteArray); -- var accounts = byteArray.slice(0, _accountCount); -- byteArray = byteArray.slice(_accountCount); -+ var accounts = guardedSplice(byteArray, 0, _accountCount); - var dataLength = decodeLength(byteArray); -- var dataSlice = byteArray.slice(0, dataLength); -+ var dataSlice = guardedSplice(byteArray, 0, dataLength); - var data = bs58$1.encode(buffer.Buffer.from(dataSlice)); -- byteArray = byteArray.slice(dataLength); - instructions.push({ - programIdIndex: programIdIndex, - accounts: accounts, -@@ -14083,30 +14108,30 @@ var solanaWeb3 = (function (exports) { - key: "deserialize", - value: function deserialize(serializedMessage) { - var byteArray = _toConsumableArray(serializedMessage); -- var prefix = byteArray.shift(); -+ var prefix = guardedShift(byteArray); - var maskedPrefix = prefix & VERSION_PREFIX_MASK; - assert$1(prefix !== maskedPrefix, "Expected versioned message but received legacy message"); - var version = maskedPrefix; - assert$1(version === 0, "Expected versioned message with version 0 but found version ".concat(version)); - var header = { -- numRequiredSignatures: byteArray.shift(), -- numReadonlySignedAccounts: byteArray.shift(), -- numReadonlyUnsignedAccounts: byteArray.shift() -+ numRequiredSignatures: guardedShift(byteArray), -+ numReadonlySignedAccounts: guardedShift(byteArray), -+ numReadonlyUnsignedAccounts: guardedShift(byteArray) - }; - var staticAccountKeys = []; - var staticAccountKeysLength = decodeLength(byteArray); - for (var i = 0; i < staticAccountKeysLength; i++) { -- staticAccountKeys.push(new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH))); -+ staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH))); - } -- var recentBlockhash = bs58$1.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var recentBlockhash = bs58$1.encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var instructionCount = decodeLength(byteArray); - var compiledInstructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var accountKeyIndexesLength = decodeLength(byteArray); -- var accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength); -+ var accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength); - var dataLength = decodeLength(byteArray); -- var data = new Uint8Array(byteArray.splice(0, dataLength)); -+ var data = new Uint8Array(guardedSplice(byteArray, 0, dataLength)); - compiledInstructions.push({ - programIdIndex: programIdIndex, - accountKeyIndexes: accountKeyIndexes, -@@ -14116,11 +14141,11 @@ var solanaWeb3 = (function (exports) { - var addressTableLookupsCount = decodeLength(byteArray); - var addressTableLookups = []; - for (var _i2 = 0; _i2 < addressTableLookupsCount; _i2++) { -- var accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var writableIndexesLength = decodeLength(byteArray); -- var writableIndexes = byteArray.splice(0, writableIndexesLength); -+ var writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength); - var readonlyIndexesLength = decodeLength(byteArray); -- var readonlyIndexes = byteArray.splice(0, readonlyIndexesLength); -+ var readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength); - addressTableLookups.push({ - accountKey: accountKey, - writableIndexes: writableIndexes, -@@ -14993,8 +15018,7 @@ var solanaWeb3 = (function (exports) { - var signatureCount = decodeLength(byteArray); - var signatures = []; - for (var i = 0; i < signatureCount; i++) { -- var signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES); -- byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES); -+ var signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES); - signatures.push(bs58$1.encode(buffer.Buffer.from(signature))); - } - return Transaction.populate(Message.from(byteArray), signatures); -@@ -15243,7 +15267,7 @@ var solanaWeb3 = (function (exports) { - var signatures = []; - var signaturesLength = decodeLength(byteArray); - for (var i = 0; i < signaturesLength; i++) { -- signatures.push(new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES))); -+ signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES))); - } - var message = VersionedMessage.deserialize(new Uint8Array(byteArray)); - return new VersionedTransaction(message, signatures); -@@ -21628,7 +21652,7 @@ var solanaWeb3 = (function (exports) { - - /** @internal */ - var COMMON_HTTP_HEADERS = { -- 'solana-client': "js/".concat((_process$env$npm_pack = "0.0.0-development") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') -+ 'solana-client': "js/".concat((_process$env$npm_pack = "1.78.4") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') - }; - - /** -@@ -30695,10 +30719,8 @@ var solanaWeb3 = (function (exports) { - if (configKeyCount !== 2) return null; - var configKeys = []; - for (var i = 0; i < 2; i++) { -- var publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH)); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -- var isSigner = byteArray.slice(0, 1)[0] === 1; -- byteArray = byteArray.slice(1); -+ var publicKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); -+ var isSigner = guardedShift(byteArray) === 1; - configKeys.push({ - publicKey: publicKey, - isSigner: isSigner -diff --git a/lib/index.iife.js.map b/lib/index.iife.js.map -index 2c6362283297c23c86882a80c623d562ef9fb127..f17ba9e5eb4153d6440a077db5483f57deb870f5 100644 ---- a/lib/index.iife.js.map -+++ b/lib/index.iife.js.map -@@ -1 +1 @@ --{"version":3,"file":"index.iife.js","sources":["../../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js","../../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js","../../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/utils.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_sha2.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_u64.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/sha512.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/edwards.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/montgomery.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/hash-to-curve.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/ed25519.js","../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js","../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js","../../../node_modules/.pnpm/base-x@3.0.9/node_modules/base-x/src/index.js","../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/utils.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.js","../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js","../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../../../node_modules/.pnpm/@solana+buffer-layout@4.0.0/node_modules/@solana/buffer-layout/lib/Layout.js","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../../../node_modules/.pnpm/bigint-buffer@1.1.5/node_modules/bigint-buffer/dist/browser.js","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../../../node_modules/.pnpm/superstruct@0.14.2/node_modules/superstruct/lib/index.es.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js","../../../node_modules/.pnpm/jayson@4.1.0/node_modules/jayson/lib/generateRequest.js","../../../node_modules/.pnpm/jayson@4.1.0/node_modules/jayson/lib/client/browser/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/__forks__/browser/fetch-impl.ts","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/typeof.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/regeneratorRuntime.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/regenerator/index.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/asyncToGenerator.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/classCallCheck.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/toPrimitive.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/toPropertyKey.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/createClass.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/setPrototypeOf.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/inherits.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/assertThisInitialized.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/getPrototypeOf.js","../../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js","../../../node_modules/.pnpm/rpc-websockets@7.5.1/node_modules/rpc-websockets/dist/lib/client.js","../../../node_modules/.pnpm/rpc-websockets@7.5.1/node_modules/rpc-websockets/dist/lib/client/websocket.browser.js","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_u64.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/sha3.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/sha256.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/secp256k1.js","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new TypeError('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new TypeError(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map","export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use `globalThis.crypto`, but node.js versions earlier than v19 don't\n// declare it in global scope. For node.js, package.json#exports field mapping\n// rewrites import from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xde, 0xad, 0xbe, 0xef])) // 'deadbeef'\n */\nexport function bytesToHex(uint8a) {\n // pre-caching improves the speed 6x\n if (!(uint8a instanceof Uint8Array))\n throw new Error('Uint8Array expected');\n let hex = '';\n for (let i = 0; i < uint8a.length; i++) {\n hex += hexes[uint8a[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('deadbeef') // Uint8Array.from([0xde, 0xad, 0xbe, 0xef])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string') {\n throw new TypeError('hexToBytes: expected string, got ' + typeof hex);\n }\n if (hex.length % 2)\n throw new Error('hexToBytes: received invalid unpadded hex');\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string') {\n throw new TypeError(`utf8ToBytes expected string, got ${typeof str}`);\n }\n return new TextEncoder().encode(str);\n}\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!(data instanceof Uint8Array))\n throw new TypeError(`Expected input type is Uint8Array (got ${typeof data})`);\n return data;\n}\n/**\n * Concats Uint8Array-s into one; like `Buffer.concat([buf1, buf2])`\n * @example concatBytes(buf1, buf2)\n */\nexport function concatBytes(...arrays) {\n if (!arrays.every((a) => a instanceof Uint8Array))\n throw new Error('Uint8Array list expected');\n if (arrays.length === 1)\n return arrays[0];\n const length = arrays.reduce((a, arr) => a + arr.length, 0);\n const result = new Uint8Array(length);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const arr = arrays[i];\n result.set(arr, pad);\n pad += arr.length;\n }\n return result;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))\n throw new TypeError('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashConstructor) {\n const hashC = (message) => hashConstructor().update(toBytes(message)).digest();\n const tmp = hashConstructor();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashConstructor();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `globalThis.crypto` or node.js crypto module.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import assert from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n assert.exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map","const U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nexport function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nexport function split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nexport const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (h, l) => l;\nconst rotr32L = (h, l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\n// Removing \"export\" has 5% perf penalty -_-\nexport function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import { SHA2 } from './_sha2.js';\nimport u64 from './_u64.js';\nimport { wrapConstructor } from './utils.js';\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n)));\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = new Uint32Array(80);\nconst SHA512_W_L = new Uint32Array(80);\nexport class SHA512 extends SHA2 {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x1f83d9ab | 0;\n this.Gl = 0xfb41bd6b | 0;\n this.Hh = 0x5be0cd19 | 0;\n this.Hl = 0x137e2179 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H.fill(0);\n SHA512_W_L.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\nclass SHA512_224 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x8c3d37c8 | 0;\n this.Al = 0x19544da2 | 0;\n this.Bh = 0x73e19966 | 0;\n this.Bl = 0x89dcd4d6 | 0;\n this.Ch = 0x1dfab7ae | 0;\n this.Cl = 0x32ff9c82 | 0;\n this.Dh = 0x679dd514 | 0;\n this.Dl = 0x582f9fcf | 0;\n this.Eh = 0x0f6d2b69 | 0;\n this.El = 0x7bd44da8 | 0;\n this.Fh = 0x77e36f73 | 0;\n this.Fl = 0x04c48942 | 0;\n this.Gh = 0x3f9d85a8 | 0;\n this.Gl = 0x6a1d36c8 | 0;\n this.Hh = 0x1112e6ad | 0;\n this.Hl = 0x91d692a1 | 0;\n this.outputLen = 28;\n }\n}\nclass SHA512_256 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x22312194 | 0;\n this.Al = 0xfc2bf72c | 0;\n this.Bh = 0x9f555fa3 | 0;\n this.Bl = 0xc84c64c2 | 0;\n this.Ch = 0x2393b86b | 0;\n this.Cl = 0x6f53b151 | 0;\n this.Dh = 0x96387719 | 0;\n this.Dl = 0x5940eabd | 0;\n this.Eh = 0x96283ee2 | 0;\n this.El = 0xa88effe3 | 0;\n this.Fh = 0xbe5e1e25 | 0;\n this.Fl = 0x53863992 | 0;\n this.Gh = 0x2b0199fc | 0;\n this.Gl = 0x2c85b8aa | 0;\n this.Hh = 0x0eb72ddc | 0;\n this.Hl = 0x81c52ca2 | 0;\n this.outputLen = 32;\n }\n}\nclass SHA384 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0xcbbb9d5d | 0;\n this.Al = 0xc1059ed8 | 0;\n this.Bh = 0x629a292a | 0;\n this.Bl = 0x367cd507 | 0;\n this.Ch = 0x9159015a | 0;\n this.Cl = 0x3070dd17 | 0;\n this.Dh = 0x152fecd8 | 0;\n this.Dl = 0xf70e5939 | 0;\n this.Eh = 0x67332667 | 0;\n this.El = 0xffc00b31 | 0;\n this.Fh = 0x8eb44a87 | 0;\n this.Fl = 0x68581511 | 0;\n this.Gh = 0xdb0c2e0d | 0;\n this.Gl = 0x64f98fa7 | 0;\n this.Hh = 0x47b5481d | 0;\n this.Hl = 0xbefa4fa4 | 0;\n this.outputLen = 48;\n }\n}\nexport const sha512 = wrapConstructor(() => new SHA512());\nexport const sha512_224 = wrapConstructor(() => new SHA512_224());\nexport const sha512_256 = wrapConstructor(() => new SHA512_256());\nexport const sha384 = wrapConstructor(() => new SHA384());\n//# sourceMappingURL=sha512.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst u8a = (a) => a instanceof Uint8Array;\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // Big Endian\n return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n// Caching slows it down 2-3x\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n if (hex.length % 2)\n throw new Error('hex string is invalid: unpadded ' + hex.length);\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// Big Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport const numberToBytesBE = (n, len) => hexToBytes(n.toString(16).padStart(len * 2, '0'));\nexport const numberToBytesLE = (n, len) => numberToBytesBE(n, len).reverse();\n// Returns variable number bytes (minimal bigint encoding?)\nexport const numberToVarBytesBE = (n) => hexToBytes(numberToHexUnpadded(n));\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n }\n }\n else if (u8a(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(`${title} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n return res;\n}\n// Copies several Uint8Arrays into one.\nexport function concatBytes(...arrs) {\n const r = new Uint8Array(arrs.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrs.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\nexport function equalBytes(b1, b2) {\n // We don't care about timing attacks here\n if (b1.length !== b2.length)\n return false;\n for (let i = 0; i < b1.length; i++)\n if (b1[i] !== b2[i])\n return false;\n return true;\n}\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string') {\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n }\n return new TextEncoder().encode(str);\n}\n// Bit operations\n// Amount of bits inside bigint (Same as n.toString(2).length)\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n// Gets single bit at position. NOTE: first bit position is 0 (same as arrays)\n// Same as !!+Array.from(n.toString(2)).reverse()[pos]\nexport const bitGet = (n, pos) => (n >> BigInt(pos)) & _1n;\n// Sets single bit at position\nexport const bitSet = (n, pos, value) => n | ((value ? _1n : _0n) << BigInt(pos));\n// Return mask for N bits (Same as BigInt(`0b${Array(i).fill('1').join('')}`))\n// Not using ** operator with bigints for old engines.\nexport const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n()) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\nimport { bitMask, numberToBytesBE, numberToBytesLE, bytesToNumberBE, bytesToNumberLE, ensureBytes, validateObject, } from './utils.js';\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently exponentiate num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * powMod(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nexport function pow(num, power, modulo) {\n if (modulo <= _0n || power < _0n)\n throw new Error('Expected power/modulo > 0');\n if (modulo === _1n)\n return _0n;\n let res = _1n;\n while (power > _0n) {\n if (power & _1n)\n res = (res * num) % modulo;\n num = (num * num) % modulo;\n power >>= _1n;\n }\n return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nexport function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= modulo;\n }\n return res;\n}\n// Inverses number over modulo\nexport function invert(number, modulo) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n // Eucledian GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n let a = mod(number, modulo);\n let b = modulo;\n // prettier-ignore\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n // JIT applies optimization if those two lines follow each other\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n // prettier-ignore\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\n// Tonelli-Shanks algorithm\n// Paper 1: https://eprint.iacr.org/2012/685.pdf (page 12)\n// Paper 2: Square Roots from 1; 24, 51, 10 to Dan Shanks\nexport function tonelliShanks(P) {\n // Legendre constant: used to calculate Legendre symbol (a | p),\n // which denotes the value of a^((p-1)/2) (mod p).\n // (a | p) ≡ 1 if a is a square (mod p)\n // (a | p) ≡ -1 if a is not a square (mod p)\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreC = (P - _1n) / _2n;\n let Q, S, Z;\n // Step 1: By factoring out powers of 2 from p - 1,\n // find q and s such that p - 1 = q*(2^s) with q odd\n for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++)\n ;\n // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++)\n ;\n // Fast-path\n if (S === 1) {\n const p1div4 = (P + _1n) / _4n;\n return function tonelliFast(Fp, n) {\n const root = Fp.pow(n, p1div4);\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Slow-path\n const Q1div2 = (Q + _1n) / _2n;\n return function tonelliSlow(Fp, n) {\n // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n throw new Error('Cannot find square root');\n let r = S;\n // TODO: will fail at Fp2/etc\n let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n let x = Fp.pow(n, Q1div2); // first guess at the square root\n let b = Fp.pow(n, Q); // first guess at the fudge factor\n while (!Fp.eql(b, Fp.ONE)) {\n if (Fp.eql(b, Fp.ZERO))\n return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n // Find m such b^(2^m)==1\n let m = 1;\n for (let t2 = Fp.sqr(b); m < r; m++) {\n if (Fp.eql(t2, Fp.ONE))\n break;\n t2 = Fp.sqr(t2); // t2 *= t2\n }\n // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n const ge = Fp.pow(g, _1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n g = Fp.sqr(ge); // g = ge * ge\n x = Fp.mul(x, ge); // x *= ge\n b = Fp.mul(b, g); // b *= g\n r = m;\n }\n return x;\n };\n}\nexport function FpSqrt(P) {\n // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n // P ≡ 3 (mod 4)\n // √n = n^((P+1)/4)\n if (P % _4n === _3n) {\n // Not all roots possible!\n // const ORDER =\n // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n // const NUM = 72057594037927816n;\n const p1div4 = (P + _1n) / _4n;\n return function sqrt3mod4(Fp, n) {\n const root = Fp.pow(n, p1div4);\n // Throw if root**2 != n\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n if (P % _8n === _5n) {\n const c1 = (P - _5n) / _8n;\n return function sqrt5mod8(Fp, n) {\n const n2 = Fp.mul(n, _2n);\n const v = Fp.pow(n2, c1);\n const nv = Fp.mul(n, v);\n const i = Fp.mul(Fp.mul(nv, _2n), v);\n const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // P ≡ 9 (mod 16)\n if (P % _16n === _9n) {\n // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n // Means we cannot use sqrt for constants at all!\n //\n // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n // const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n // const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n // const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic\n // sqrt = (x) => {\n // let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4\n // let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1\n // const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1\n // let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1\n // const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x\n // const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x\n // tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x\n // tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x\n // const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x\n // return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2\n // }\n }\n // Other cases: Tonelli-Shanks algorithm\n return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n 'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n 'eql', 'add', 'sub', 'mul', 'pow', 'div',\n 'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n const initial = {\n ORDER: 'bigint',\n MASK: 'bigint',\n BYTES: 'isSafeInteger',\n BITS: 'isSafeInteger',\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = 'function';\n return map;\n }, initial);\n return validateObject(field, opts);\n}\n// Generic field functions\nexport function FpPow(f, num, power) {\n // Should have same speed as pow for bigints\n // TODO: benchmark!\n if (power < _0n)\n throw new Error('Expected power > 0');\n if (power === _0n)\n return f.ONE;\n if (power === _1n)\n return num;\n let p = f.ONE;\n let d = num;\n while (power > _0n) {\n if (power & _1n)\n p = f.mul(p, d);\n d = f.sqr(d);\n power >>= _1n;\n }\n return p;\n}\n// 0 is non-invertible: non-batched version will throw on 0\nexport function FpInvertBatch(f, nums) {\n const tmp = new Array(nums.length);\n // Walk from first to last, multiply them by each other MOD p\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = acc;\n return f.mul(acc, num);\n }, f.ONE);\n // Invert last element\n const inverted = f.inv(lastMultiplied);\n // Walk from last to first, multiply them by inverted each other MOD p\n nums.reduceRight((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = f.mul(acc, tmp[i]);\n return f.mul(acc, num);\n }, inverted);\n return tmp;\n}\nexport function FpDiv(f, lhs, rhs) {\n return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n const legendreConst = (f.ORDER - _1n) / _2n; // Integer arithmetic\n return (x) => {\n const p = f.pow(x, legendreConst);\n return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n };\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n // Bit size, byte size of CURVE.n\n const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a galois field over prime. Non-primes are not supported for now.\n * Do not init in loop: slow. Very fragile: always run a benchmark on change.\n * Major performance gains:\n * a) non-normalized operations like mulN instead of mul\n * b) `Object.freeze`\n * c) Same object shape: never add or remove keys\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLen, isLE = false, redef = {}) {\n if (ORDER <= _0n)\n throw new Error(`Expected Fp ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('Field lengths over 2048 bytes are not supported');\n const sqrtP = FpSqrt(ORDER);\n const f = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n,\n ONE: _1n,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== 'bigint')\n throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n },\n is0: (num) => num === _0n,\n isOdd: (num) => (num & _1n) === _1n,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n invertBatch: (lst) => FpInvertBatch(f, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a, b, c) => (c ? b : a),\n toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n });\n return Object.freeze(f);\n}\nexport function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * FIPS 186 B.4.1-compliant \"constant-time\" private key generation utility.\n * Can take (n+8) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being neglible.\n * Needs at least 40 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * @param hash hash output from SHA3 or a similar function\n * @returns valid private scalar\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n hash = ensureBytes('privateHash', hash);\n const hashLen = hash.length;\n const minLen = nLength(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n return mod(num, groupOrder - _1n) + _1n;\n}\n//# sourceMappingURL=modular.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nexport function wNAF(c, bits) {\n const constTimeNegate = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1; // +1, because\n const windowSize = 2 ** (W - 1); // -1 because we skip zero\n return { windows, windowSize };\n };\n return {\n constTimeNegate,\n // non-const time multiplication ladder\n unsafeLadder(elm, n) {\n let p = c.ZERO;\n let d = elm;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p = elm;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n // =1, because we skip zero\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n // But need to carefully remove other checks before wNAF. ORDER == bits here\n const { windows, windowSize } = opts(W);\n let p = c.ZERO;\n let f = c.BASE;\n const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n // Extract W bits.\n let wbits = Number(n & mask);\n // Shift number by W bits.\n n >>= shiftBy;\n // If the bits are bigger than max size, we'll split those.\n // +224 => 256 - 32\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n // there is negate now: it is possible that negated element from low value\n // would be the same as high element, which will create carry into next window.\n // It's not obvious how this can fail, but still worth investigating later.\n // Check if we're onto Zero point.\n // Add random point inside current window to f.\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n // The most important part for const-time getPublicKey\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n // Even if the variable is still unused, there are some checks which will\n // throw an exception, so compiler needs to prove they won't happen, which is hard.\n // At this point there is a way to F be infinity-point even if p is not,\n // which makes it less const-time: around 1 bigint multiply.\n return { p, f };\n },\n wNAFCached(P, precomputesMap, n, transform) {\n // @ts-ignore\n const W = P._WINDOW_SIZE || 1;\n // Calculate precomputes on a first run, reuse them after\n let comp = precomputesMap.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1) {\n precomputesMap.set(P, transform(comp));\n }\n }\n return this.wNAF(W, comp, n);\n },\n };\n}\nexport function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: 'bigint',\n h: 'bigint',\n Gx: 'field',\n Gy: 'field',\n }, {\n nBitLength: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n });\n // Set defaults\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER },\n });\n}\n//# sourceMappingURL=curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y²\nimport { mod } from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _8n = BigInt(8);\n// verification rule is either zip215 or rfc8032 / nist186-5. Consult fromHex:\nconst VERIFY_DEFAULT = { zip215: true };\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(curve, {\n hash: 'function',\n a: 'bigint',\n d: 'bigint',\n randomBytes: 'function',\n }, {\n adjustScalarBytes: 'function',\n domain: 'function',\n uvRatio: 'function',\n mapToCurve: 'function',\n });\n // Set defaults\n return Object.freeze({ ...opts });\n}\n// It is not generic twisted curve for now, but ed25519/ed448 generic implementation\nexport function twistedEdwards(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, prehash: prehash, hash: cHash, randomBytes, nByteLength, h: cofactor, } = CURVE;\n const MASK = _2n ** BigInt(nByteLength * 8);\n const modP = Fp.create; // Function overrides\n // sqrt(u/v)\n const uvRatio = CURVE.uvRatio ||\n ((u, v) => {\n try {\n return { isValid: true, value: Fp.sqrt(u * Fp.inv(v)) };\n }\n catch (e) {\n return { isValid: false, value: _0n };\n }\n });\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes); // NOOP\n const domain = CURVE.domain ||\n ((data, ctx, phflag) => {\n if (ctx.length || phflag)\n throw new Error('Contexts/pre-hash are not supported');\n return data;\n }); // NOOP\n const inBig = (n) => typeof n === 'bigint' && _0n < n; // n in [1..]\n const inRange = (n, max) => inBig(n) && inBig(max) && n < max; // n in [1..max-1]\n const in0MaskRange = (n) => n === _0n || inRange(n, MASK); // n in [0..MASK-1]\n function assertInRange(n, max) {\n // n in [1..max-1]\n if (inRange(n, max))\n return n;\n throw new Error(`Expected valid scalar < ${max}, got ${typeof n} ${n}`);\n }\n function assertGE0(n) {\n // n in [0..CURVE_ORDER-1]\n return n === _0n ? n : assertInRange(n, CURVE_ORDER); // GE = prime subgroup, not full group\n }\n const pointPrecomputes = new Map();\n function isPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ExtendedPoint expected');\n }\n // Extended Point works in extended coordinates: (x, y, z, t) ∋ (x=x/z, y=y/z, t=xy).\n // https://en.wikipedia.org/wiki/Twisted_Edwards_curve#Extended_coordinates\n class Point {\n constructor(ex, ey, ez, et) {\n this.ex = ex;\n this.ey = ey;\n this.ez = ez;\n this.et = et;\n if (!in0MaskRange(ex))\n throw new Error('x required');\n if (!in0MaskRange(ey))\n throw new Error('y required');\n if (!in0MaskRange(ez))\n throw new Error('z required');\n if (!in0MaskRange(et))\n throw new Error('t required');\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error('extended point not allowed');\n const { x, y } = p || {};\n if (!in0MaskRange(x) || !in0MaskRange(y))\n throw new Error('invalid affine point');\n return new Point(x, y, _1n, modP(x * y));\n }\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.ez));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // Not required for fromHex(), which always creates valid points.\n // Could be useful for fromAffine().\n assertValidity() {\n const { a, d } = CURVE;\n if (this.is0())\n throw new Error('bad point: ZERO'); // TODO: optimize, with vars below?\n // Equation in affine coordinates: ax² + y² = 1 + dx²y²\n // Equation in projective coordinates (X/Z, Y/Z, Z): (aX² + Y²)Z² = Z⁴ + dX²Y²\n const { ex: X, ey: Y, ez: Z, et: T } = this;\n const X2 = modP(X * X); // X²\n const Y2 = modP(Y * Y); // Y²\n const Z2 = modP(Z * Z); // Z²\n const Z4 = modP(Z2 * Z2); // Z⁴\n const aX2 = modP(X2 * a); // aX²\n const left = modP(Z2 * modP(aX2 + Y2)); // (aX² + Y²)Z²\n const right = modP(Z4 + modP(d * modP(X2 * Y2))); // Z⁴ + dX²Y²\n if (left !== right)\n throw new Error('bad point: equation left != right (1)');\n // In Extended coordinates we also have T, which is x*y=T/Z: check X*Y == Z*T\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error('bad point: equation left != right (2)');\n }\n // Compare one point to another.\n equals(other) {\n isPoint(other);\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const { ex: X2, ey: Y2, ez: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n // Flips point sign to a negative one (-x, y in affine coords)\n return new Point(modP(-this.ex), this.ey, this.ez, modP(-this.et));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const A = modP(X1 * X1); // A = X12\n const B = modP(Y1 * Y1); // B = Y12\n const C = modP(_2n * modP(Z1 * Z1)); // C = 2*Z12\n const D = modP(a * A); // D = a*A\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B); // E = (X1+Y1)2-A-B\n const G = D + B; // G = D+B\n const F = G - C; // F = G-C\n const H = D - B; // H = D-B\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n isPoint(other);\n const { a, d } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1, et: T1 } = this;\n const { ex: X2, ey: Y2, ez: Z2, et: T2 } = other;\n // Faster algo for adding 2 Extended Points when curve's a=-1.\n // http://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html#addition-add-2008-hwcd-4\n // Cost: 8M + 8add + 2*2.\n // Note: It does not check whether the `other` point is valid.\n if (a === BigInt(-1)) {\n const A = modP((Y1 - X1) * (Y2 + X2));\n const B = modP((Y1 + X1) * (Y2 - X2));\n const F = modP(B - A);\n if (F === _0n)\n return this.double(); // Same point. Tests say it doesn't affect timing\n const C = modP(Z1 * _2n * T2);\n const D = modP(T1 * _2n * Z2);\n const E = D + C;\n const G = B + A;\n const H = D - C;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n const A = modP(X1 * X2); // A = X1*X2\n const B = modP(Y1 * Y2); // B = Y1*Y2\n const C = modP(T1 * d * T2); // C = T1*d*T2\n const D = modP(Z1 * Z2); // D = Z1*Z2\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B); // E = (X1+Y1)*(X2+Y2)-A-B\n const F = D - C; // F = D-C\n const G = D + C; // G = D+C\n const H = modP(B - a * A); // H = B-a*A\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, Point.normalizeZ);\n }\n // Constant-time multiplication.\n multiply(scalar) {\n const { p, f } = this.wNAF(assertInRange(scalar, CURVE_ORDER));\n return Point.normalizeZ([p, f])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n multiplyUnsafe(scalar) {\n let n = assertGE0(scalar); // 0 <= scalar < CURVE.n\n if (n === _0n)\n return I;\n if (this.equals(I) || n === _1n)\n return this;\n if (this.equals(G))\n return this.wNAF(n).p;\n return wnaf.unsafeLadder(this, n);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafeLadder(this, CURVE_ORDER).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(iz) {\n const { ex: x, ey: y, ez: z } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? _8n : Fp.inv(z); // 8 was chosen arbitrarily\n const ax = modP(x * iz);\n const ay = modP(y * iz);\n const zz = modP(z * iz);\n if (is0)\n return { x: _0n, y: _1n };\n if (zz !== _1n)\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n clearCofactor() {\n const { h: cofactor } = CURVE;\n if (cofactor === _1n)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n // Converts hash string or Uint8Array to Point.\n // Uses algo from RFC8032 5.1.3.\n static fromHex(hex, zip215 = false) {\n const { d, a } = CURVE;\n const len = Fp.BYTES;\n hex = ensureBytes('pointHex', hex, len); // copy hex to a new array\n const normed = hex.slice(); // copy again, we'll manipulate it\n const lastByte = hex[len - 1]; // select last byte\n normed[len - 1] = lastByte & ~0x80; // clear last bit\n const y = ut.bytesToNumberLE(normed);\n if (y === _0n) {\n // y=0 is allowed\n }\n else {\n // RFC8032 prohibits >= p, but ZIP215 doesn't\n if (zip215)\n assertInRange(y, MASK); // zip215=true [1..P-1] (2^255-19-1 for ed25519)\n else\n assertInRange(y, Fp.ORDER); // zip215=false [1..MASK-1] (2^256-1 for ed25519)\n }\n // Ed25519: x² = (y²-1)/(dy²+1) mod p. Ed448: x² = (y²-1)/(dy²-1) mod p. Generic case:\n // ax²+y²=1+dx²y² => y²-1=dx²y²-ax² => y²-1=x²(dy²-a) => x²=(y²-1)/(dy²-a)\n const y2 = modP(y * y); // denominator is always non-0 mod p.\n const u = modP(y2 - _1n); // u = y² - 1\n const v = modP(d * y2 - a); // v = d y² + 1.\n let { isValid, value: x } = uvRatio(u, v); // √(u/v)\n if (!isValid)\n throw new Error('Point.fromHex: invalid y coordinate');\n const isXOdd = (x & _1n) === _1n; // There are 2 square roots. Use x_0 bit to select proper\n const isLastByteOdd = (lastByte & 0x80) !== 0; // if x=0 and x_0 = 1, fail\n if (isLastByteOdd !== isXOdd)\n x = modP(-x); // if x_0 != x mod 2, set x = p-x\n return Point.fromAffine({ x, y });\n }\n static fromPrivateKey(privKey) {\n return getExtendedPublicKey(privKey).point;\n }\n toRawBytes() {\n const { x, y } = this.toAffine();\n const bytes = ut.numberToBytesLE(y, Fp.BYTES); // each y has 2 x values (x, -y)\n bytes[bytes.length - 1] |= x & _1n ? 0x80 : 0; // when compressing, it's enough to store y\n return bytes; // and use the last byte to encode sign of x\n }\n toHex() {\n return ut.bytesToHex(this.toRawBytes()); // Same as toRawBytes, but returns string.\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, _1n, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(_0n, _1n, _1n, _0n); // 0, 1, 1, 0\n const { BASE: G, ZERO: I } = Point;\n const wnaf = wNAF(Point, nByteLength * 8);\n function modN(a) {\n return mod(a, CURVE_ORDER);\n }\n // Little-endian SHA512 with modulo n\n function modN_LE(hash) {\n return modN(ut.bytesToNumberLE(hash));\n }\n /** Convenience method that creates public key and other stuff. RFC8032 5.1.5 */\n function getExtendedPublicKey(key) {\n const len = nByteLength;\n key = ensureBytes('private key', key, len);\n // Hash private key with curve's hash function to produce uniformingly random input\n // Check byte lengths: ensure(64, h(ensure(32, key)))\n const hashed = ensureBytes('hashed private key', cHash(key), 2 * len);\n const head = adjustScalarBytes(hashed.slice(0, len)); // clear first half bits, produce FE\n const prefix = hashed.slice(len, 2 * len); // second half is called key prefix (5.1.6)\n const scalar = modN_LE(head); // The actual private scalar\n const point = G.multiply(scalar); // Point on Edwards curve aka public key\n const pointBytes = point.toRawBytes(); // Uint8Array representation\n return { head, prefix, scalar, point, pointBytes };\n }\n // Calculates EdDSA pub key. RFC8032 5.1.5. Privkey is hashed. Use first half with 3 bits cleared\n function getPublicKey(privKey) {\n return getExtendedPublicKey(privKey).pointBytes;\n }\n // int('LE', SHA512(dom2(F, C) || msgs)) mod N\n function hashDomainToScalar(context = new Uint8Array(), ...msgs) {\n const msg = ut.concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, ensureBytes('context', context), !!prehash)));\n }\n /** Signs message with privateKey. RFC8032 5.1.6 */\n function sign(msg, privKey, options = {}) {\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph etc.\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(privKey);\n const r = hashDomainToScalar(options.context, prefix, msg); // r = dom2(F, C) || prefix || PH(M)\n const R = G.multiply(r).toRawBytes(); // R = rG\n const k = hashDomainToScalar(options.context, R, pointBytes, msg); // R || A || PH(M)\n const s = modN(r + k * scalar); // S = (r + k * s) mod L\n assertGE0(s); // 0 <= s < l\n const res = ut.concatBytes(R, ut.numberToBytesLE(s, Fp.BYTES));\n return ensureBytes('result', res, nByteLength * 2); // 64-byte signature\n }\n const verifyOpts = VERIFY_DEFAULT;\n function verify(sig, msg, publicKey, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = Fp.BYTES; // Verifies EdDSA signature against message and public key. RFC8032 5.1.7.\n sig = ensureBytes('signature', sig, 2 * len); // An extended group equation is checked.\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph, etc\n const s = ut.bytesToNumberLE(sig.slice(len, 2 * len));\n // zip215: true is good for consensus-critical apps and allows points < 2^256\n // zip215: false follows RFC8032 / NIST186-5 and restricts points to CURVE.p\n let A, R, SB;\n try {\n A = Point.fromHex(publicKey, zip215);\n R = Point.fromHex(sig.slice(0, len), zip215);\n SB = G.multiplyUnsafe(s); // 0 <= s < l is done inside\n }\n catch (error) {\n return false;\n }\n const k = hashDomainToScalar(context, R.toRawBytes(), A.toRawBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n // [8][S]B = [8]R + [8][k]A'\n return RkA.subtract(SB).clearCofactor().equals(Point.ZERO);\n }\n G._setWindowSize(8); // Enable precomputes. Slows down first publicKey computation by 20ms.\n const utils = {\n getExtendedPublicKey,\n // ed25519 private keys are uniform 32b. No need to check for modulo bias, like in secp256k1.\n randomPrivateKey: () => randomBytes(Fp.BYTES),\n /**\n * We're doing scalar multiplication (used in getPublicKey etc) with precomputed BASE_POINT\n * values. This slows down first getPublicKey() by milliseconds (see Speed section),\n * but allows to speed-up subsequent getPublicKey() calls up to 20x.\n * @param windowSize 2, 4, 8, 16\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n },\n };\n return {\n CURVE,\n getPublicKey,\n sign,\n verify,\n ExtendedPoint: Point,\n utils,\n };\n}\n//# sourceMappingURL=edwards.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { mod, pow } from './modular.js';\nimport { bytesToNumberLE, ensureBytes, numberToBytesLE, validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nfunction validateOpts(curve) {\n validateObject(curve, {\n a: 'bigint',\n }, {\n montgomeryBits: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n adjustScalarBytes: 'function',\n domain: 'function',\n powPminus2: 'function',\n Gu: 'bigint',\n });\n // Set defaults\n return Object.freeze({ ...curve });\n}\n// NOTE: not really montgomery curve, just bunch of very specific methods for X25519/X448 (RFC 7748, https://www.rfc-editor.org/rfc/rfc7748)\n// Uses only one coordinate instead of two\nexport function montgomery(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { P } = CURVE;\n const modP = (n) => mod(n, P);\n const montgomeryBits = CURVE.montgomeryBits;\n const montgomeryBytes = Math.ceil(montgomeryBits / 8);\n const fieldLen = CURVE.nByteLength;\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes);\n const powPminus2 = CURVE.powPminus2 || ((x) => pow(x, P - BigInt(2), P));\n // cswap from RFC7748. But it is not from RFC7748!\n /*\n cswap(swap, x_2, x_3):\n dummy = mask(swap) AND (x_2 XOR x_3)\n x_2 = x_2 XOR dummy\n x_3 = x_3 XOR dummy\n Return (x_2, x_3)\n Where mask(swap) is the all-1 or all-0 word of the same length as x_2\n and x_3, computed, e.g., as mask(swap) = 0 - swap.\n */\n function cswap(swap, x_2, x_3) {\n const dummy = modP(swap * (x_2 - x_3));\n x_2 = modP(x_2 - dummy);\n x_3 = modP(x_3 + dummy);\n return [x_2, x_3];\n }\n // Accepts 0 as well\n function assertFieldElement(n) {\n if (typeof n === 'bigint' && _0n <= n && n < P)\n return n;\n throw new Error('Expected valid scalar 0 < scalar < CURVE.P');\n }\n // x25519 from 4\n // The constant a24 is (486662 - 2) / 4 = 121665 for curve25519/X25519\n const a24 = (CURVE.a - BigInt(2)) / BigInt(4);\n /**\n *\n * @param pointU u coordinate (x) on Montgomery Curve 25519\n * @param scalar by which the point would be multiplied\n * @returns new Point on Montgomery curve\n */\n function montgomeryLadder(pointU, scalar) {\n const u = assertFieldElement(pointU);\n // Section 5: Implementations MUST accept non-canonical values and process them as\n // if they had been reduced modulo the field prime.\n const k = assertFieldElement(scalar);\n const x_1 = u;\n let x_2 = _1n;\n let z_2 = _0n;\n let x_3 = u;\n let z_3 = _1n;\n let swap = _0n;\n let sw;\n for (let t = BigInt(montgomeryBits - 1); t >= _0n; t--) {\n const k_t = (k >> t) & _1n;\n swap ^= k_t;\n sw = cswap(swap, x_2, x_3);\n x_2 = sw[0];\n x_3 = sw[1];\n sw = cswap(swap, z_2, z_3);\n z_2 = sw[0];\n z_3 = sw[1];\n swap = k_t;\n const A = x_2 + z_2;\n const AA = modP(A * A);\n const B = x_2 - z_2;\n const BB = modP(B * B);\n const E = AA - BB;\n const C = x_3 + z_3;\n const D = x_3 - z_3;\n const DA = modP(D * A);\n const CB = modP(C * B);\n const dacb = DA + CB;\n const da_cb = DA - CB;\n x_3 = modP(dacb * dacb);\n z_3 = modP(x_1 * modP(da_cb * da_cb));\n x_2 = modP(AA * BB);\n z_2 = modP(E * (AA + modP(a24 * E)));\n }\n // (x_2, x_3) = cswap(swap, x_2, x_3)\n sw = cswap(swap, x_2, x_3);\n x_2 = sw[0];\n x_3 = sw[1];\n // (z_2, z_3) = cswap(swap, z_2, z_3)\n sw = cswap(swap, z_2, z_3);\n z_2 = sw[0];\n z_3 = sw[1];\n // z_2^(p - 2)\n const z2 = powPminus2(z_2);\n // Return x_2 * (z_2^(p - 2))\n return modP(x_2 * z2);\n }\n function encodeUCoordinate(u) {\n return numberToBytesLE(modP(u), montgomeryBytes);\n }\n function decodeUCoordinate(uEnc) {\n // Section 5: When receiving such an array, implementations of X25519\n // MUST mask the most significant bit in the final byte.\n // This is very ugly way, but it works because fieldLen-1 is outside of bounds for X448, so this becomes NOOP\n // fieldLen - scalaryBytes = 1 for X448 and = 0 for X25519\n const u = ensureBytes('u coordinate', uEnc, montgomeryBytes);\n // u[fieldLen-1] crashes QuickJS (TypeError: out-of-bound numeric index)\n if (fieldLen === montgomeryBytes)\n u[fieldLen - 1] &= 127; // 0b0111_1111\n return bytesToNumberLE(u);\n }\n function decodeScalar(n) {\n const bytes = ensureBytes('scalar', n);\n if (bytes.length !== montgomeryBytes && bytes.length !== fieldLen)\n throw new Error(`Expected ${montgomeryBytes} or ${fieldLen} bytes, got ${bytes.length}`);\n return bytesToNumberLE(adjustScalarBytes(bytes));\n }\n function scalarMult(scalar, u) {\n const pointU = decodeUCoordinate(u);\n const _scalar = decodeScalar(scalar);\n const pu = montgomeryLadder(pointU, _scalar);\n // The result was not contributory\n // https://cr.yp.to/ecdh.html#validate\n if (pu === _0n)\n throw new Error('Invalid private or public key received');\n return encodeUCoordinate(pu);\n }\n // Computes public key from private. By doing scalar multiplication of base point.\n const GuBytes = encodeUCoordinate(CURVE.Gu);\n function scalarMultBase(scalar) {\n return scalarMult(scalar, GuBytes);\n }\n return {\n scalarMult,\n scalarMultBase,\n getSharedSecret: (privateKey, publicKey) => scalarMult(privateKey, publicKey),\n getPublicKey: (privateKey) => scalarMultBase(privateKey),\n utils: { randomPrivateKey: () => CURVE.randomBytes(CURVE.nByteLength) },\n GuBytes: GuBytes,\n };\n}\n//# sourceMappingURL=montgomery.js.map","import { mod } from './modular.js';\nimport { bytesToNumberBE, concatBytes, utf8ToBytes, validateObject } from './utils.js';\nfunction validateDST(dst) {\n if (dst instanceof Uint8Array)\n return dst;\n if (typeof dst === 'string')\n return utf8ToBytes(dst);\n throw new Error('DST must be Uint8Array or string');\n}\n// Octet Stream to Integer. \"spec\" implementation of os2ip is 2.5x slower vs bytesToNumberBE.\nconst os2ip = bytesToNumberBE;\n// Integer to Octet Stream (numberToBytesBE)\nfunction i2osp(value, length) {\n if (value < 0 || value >= 1 << (8 * length)) {\n throw new Error(`bad I2OSP call: value=${value} length=${length}`);\n }\n const res = Array.from({ length }).fill(0);\n for (let i = length - 1; i >= 0; i--) {\n res[i] = value & 0xff;\n value >>>= 8;\n }\n return new Uint8Array(res);\n}\nfunction strxor(a, b) {\n const arr = new Uint8Array(a.length);\n for (let i = 0; i < a.length; i++) {\n arr[i] = a[i] ^ b[i];\n }\n return arr;\n}\nfunction isBytes(item) {\n if (!(item instanceof Uint8Array))\n throw new Error('Uint8Array expected');\n}\nfunction isNum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error('number expected');\n}\n// Produces a uniformly random byte string using a cryptographic hash function H that outputs b bits\n// https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-11#section-5.4.1\nexport function expand_message_xmd(msg, DST, lenInBytes, H) {\n isBytes(msg);\n isBytes(DST);\n isNum(lenInBytes);\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-5.3.3\n if (DST.length > 255)\n DST = H(concatBytes(utf8ToBytes('H2C-OVERSIZE-DST-'), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (ell > 255)\n throw new Error('Invalid xmd length');\n const DST_prime = concatBytes(DST, i2osp(DST.length, 1));\n const Z_pad = i2osp(0, r_in_bytes);\n const l_i_b_str = i2osp(lenInBytes, 2); // len_in_bytes_str\n const b = new Array(ell);\n const b_0 = H(concatBytes(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));\n b[0] = H(concatBytes(b_0, i2osp(1, 1), DST_prime));\n for (let i = 1; i <= ell; i++) {\n const args = [strxor(b_0, b[i - 1]), i2osp(i + 1, 1), DST_prime];\n b[i] = H(concatBytes(...args));\n }\n const pseudo_random_bytes = concatBytes(...b);\n return pseudo_random_bytes.slice(0, lenInBytes);\n}\nexport function expand_message_xof(msg, DST, lenInBytes, k, H) {\n isBytes(msg);\n isBytes(DST);\n isNum(lenInBytes);\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-5.3.3\n // DST = H('H2C-OVERSIZE-DST-' || a_very_long_DST, Math.ceil((lenInBytes * k) / 8));\n if (DST.length > 255) {\n const dkLen = Math.ceil((2 * k) / 8);\n DST = H.create({ dkLen }).update(utf8ToBytes('H2C-OVERSIZE-DST-')).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error('expand_message_xof: invalid lenInBytes');\n return (H.create({ dkLen: lenInBytes })\n .update(msg)\n .update(i2osp(lenInBytes, 2))\n // 2. DST_prime = DST || I2OSP(len(DST), 1)\n .update(DST)\n .update(i2osp(DST.length, 1))\n .digest());\n}\n/**\n * Hashes arbitrary-length byte strings to a list of one or more elements of a finite field F\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-11#section-5.3\n * @param msg a byte string containing the message to hash\n * @param count the number of elements of F to output\n * @param options `{DST: string, p: bigint, m: number, k: number, expand: 'xmd' | 'xof', hash: H}`, see above\n * @returns [u_0, ..., u_(count - 1)], a list of field elements.\n */\nexport function hash_to_field(msg, count, options) {\n validateObject(options, {\n DST: 'string',\n p: 'bigint',\n m: 'isSafeInteger',\n k: 'isSafeInteger',\n hash: 'hash',\n });\n const { p, k, m, hash, expand, DST: _DST } = options;\n isBytes(msg);\n isNum(count);\n const DST = validateDST(_DST);\n const log2p = p.toString(2).length;\n const L = Math.ceil((log2p + k) / 8); // section 5.1 of ietf draft link above\n const len_in_bytes = count * m * L;\n let prb; // pseudo_random_bytes\n if (expand === 'xmd') {\n prb = expand_message_xmd(msg, DST, len_in_bytes, hash);\n }\n else if (expand === 'xof') {\n prb = expand_message_xof(msg, DST, len_in_bytes, k, hash);\n }\n else if (expand === '_internal_pass') {\n // for internal tests only\n prb = msg;\n }\n else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u = new Array(count);\n for (let i = 0; i < count; i++) {\n const e = new Array(m);\n for (let j = 0; j < m; j++) {\n const elm_offset = L * (j + i * m);\n const tv = prb.subarray(elm_offset, elm_offset + L);\n e[j] = mod(os2ip(tv), p);\n }\n u[i] = e;\n }\n return u;\n}\nexport function isogenyMap(field, map) {\n // Make same order as in spec\n const COEFF = map.map((i) => Array.from(i).reverse());\n return (x, y) => {\n const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));\n x = field.div(xNum, xDen); // xNum / xDen\n y = field.mul(y, field.div(yNum, yDen)); // y * (yNum / yDev)\n return { x, y };\n };\n}\nexport function createHasher(Point, mapToCurve, def) {\n if (typeof mapToCurve !== 'function')\n throw new Error('mapToCurve() must be defined');\n return {\n // Encodes byte string to elliptic curve\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-3\n hashToCurve(msg, options) {\n const u = hash_to_field(msg, 2, { ...def, DST: def.DST, ...options });\n const u0 = Point.fromAffine(mapToCurve(u[0]));\n const u1 = Point.fromAffine(mapToCurve(u[1]));\n const P = u0.add(u1).clearCofactor();\n P.assertValidity();\n return P;\n },\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-3\n encodeToCurve(msg, options) {\n const u = hash_to_field(msg, 1, { ...def, DST: def.encodeDST, ...options });\n const P = Point.fromAffine(mapToCurve(u[0])).clearCofactor();\n P.assertValidity();\n return P;\n },\n };\n}\n//# sourceMappingURL=hash-to-curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha512 } from '@noble/hashes/sha512';\nimport { concatBytes, randomBytes, utf8ToBytes } from '@noble/hashes/utils';\nimport { twistedEdwards } from './abstract/edwards.js';\nimport { montgomery } from './abstract/montgomery.js';\nimport { mod, pow2, isNegativeLE, Field, FpSqrtEven } from './abstract/modular.js';\nimport { equalBytes, bytesToHex, bytesToNumberLE, numberToBytesLE, ensureBytes, } from './abstract/utils.js';\nimport * as htf from './abstract/hash-to-curve.js';\n/**\n * ed25519 Twisted Edwards curve with following addons:\n * - X25519 ECDH\n * - Ristretto cofactor elimination\n * - Elligator hash-to-group / point indistinguishability\n */\nconst ED25519_P = BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819949');\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst ED25519_SQRT_M1 = BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _5n = BigInt(5);\n// prettier-ignore\nconst _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\nfunction ed25519_pow_2_252_3(x) {\n const P = ED25519_P;\n const x2 = (x * x) % P;\n const b2 = (x2 * x) % P; // x^3, 11\n const b4 = (pow2(b2, _2n, P) * b2) % P; // x^15, 1111\n const b5 = (pow2(b4, _1n, P) * x) % P; // x^31\n const b10 = (pow2(b5, _5n, P) * b5) % P;\n const b20 = (pow2(b10, _10n, P) * b10) % P;\n const b40 = (pow2(b20, _20n, P) * b20) % P;\n const b80 = (pow2(b40, _40n, P) * b40) % P;\n const b160 = (pow2(b80, _80n, P) * b80) % P;\n const b240 = (pow2(b160, _80n, P) * b80) % P;\n const b250 = (pow2(b240, _10n, P) * b10) % P;\n const pow_p_5_8 = (pow2(b250, _2n, P) * x) % P;\n // ^ To pow to (p+3)/8, multiply it by x.\n return { pow_p_5_8, b2 };\n}\nfunction adjustScalarBytes(bytes) {\n // Section 5: For X25519, in order to decode 32 random bytes as an integer scalar,\n // set the three least significant bits of the first byte\n bytes[0] &= 248; // 0b1111_1000\n // and the most significant bit of the last to zero,\n bytes[31] &= 127; // 0b0111_1111\n // set the second most significant bit of the last byte to 1\n bytes[31] |= 64; // 0b0100_0000\n return bytes;\n}\n// sqrt(u/v)\nfunction uvRatio(u, v) {\n const P = ED25519_P;\n const v3 = mod(v * v * v, P); // v³\n const v7 = mod(v3 * v3 * v, P); // v⁷\n // (p+3)/8 and (p-5)/8\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = mod(u * v3 * pow, P); // (uv³)(uv⁷)^(p-5)/8\n const vx2 = mod(v * x * x, P); // vx²\n const root1 = x; // First root candidate\n const root2 = mod(x * ED25519_SQRT_M1, P); // Second root candidate\n const useRoot1 = vx2 === u; // If vx² = u (mod p), x is a square root\n const useRoot2 = vx2 === mod(-u, P); // If vx² = -u, set x <-- x * 2^((p-1)/4)\n const noRoot = vx2 === mod(-u * ED25519_SQRT_M1, P); // There is no valid root, vx² = -u√(-1)\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2; // We return root2 anyway, for const-time\n if (isNegativeLE(x, P))\n x = mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n}\n// Just in case\nexport const ED25519_TORSION_SUBGROUP = [\n '0100000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a',\n '0000000000000000000000000000000000000000000000000000000000000080',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05',\n 'ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85',\n '0000000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa',\n];\nconst Fp = Field(ED25519_P, undefined, true);\nconst ed25519Defaults = {\n // Param: a\n a: BigInt(-1),\n // d is equal to -121665/121666 over finite field.\n // Negative number is P - number, and division is invert(number, P)\n d: BigInt('37095705934669439343138083508754565189542113879843219016388785533085940283555'),\n // Finite field 𝔽p over which we'll do calculations; 2n ** 255n - 19n\n Fp,\n // Subgroup order: how many points curve has\n // 2n ** 252n + 27742317777372353535851937790883648493n;\n n: BigInt('7237005577332262213973186563042994240857116359379907606001950938285454250989'),\n // Cofactor\n h: BigInt(8),\n // Base point (x, y) aka generator point\n Gx: BigInt('15112221349535400772501151409588531511454012693041857206046113283949847762202'),\n Gy: BigInt('46316835694926478169428394003475163141307993866256225615783033603165251855960'),\n hash: sha512,\n randomBytes,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio,\n};\nexport const ed25519 = twistedEdwards(ed25519Defaults);\nfunction ed25519_domain(data, ctx, phflag) {\n if (ctx.length > 255)\n throw new Error('Context is too big');\n return concatBytes(utf8ToBytes('SigEd25519 no Ed25519 collisions'), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);\n}\nexport const ed25519ctx = twistedEdwards({ ...ed25519Defaults, domain: ed25519_domain });\nexport const ed25519ph = twistedEdwards({\n ...ed25519Defaults,\n domain: ed25519_domain,\n prehash: sha512,\n});\nexport const x25519 = montgomery({\n P: ED25519_P,\n a: BigInt(486662),\n montgomeryBits: 255,\n nByteLength: 32,\n Gu: BigInt(9),\n powPminus2: (x) => {\n const P = ED25519_P;\n // x^(p-2) aka x^(2^255-21)\n const { pow_p_5_8, b2 } = ed25519_pow_2_252_3(x);\n return mod(pow2(pow_p_5_8, BigInt(3), P) * b2, P);\n },\n adjustScalarBytes,\n randomBytes,\n});\n/**\n * Converts ed25519 public key to x25519 public key. Uses formula:\n * * `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * * `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * @example\n * const aPub = ed25519.getPublicKey(utils.randomPrivateKey());\n * x25519.getSharedSecret(edwardsToMontgomery(aPub), edwardsToMontgomery(someonesPub))\n */\nexport function edwardsToMontgomery(edwardsPub) {\n const { y } = ed25519.ExtendedPoint.fromHex(edwardsPub);\n const _1n = BigInt(1);\n return Fp.toBytes(Fp.create((y - _1n) * Fp.inv(y + _1n)));\n}\n// Hash To Curve Elligator2 Map (NOTE: different from ristretto255 elligator)\n// NOTE: very important part is usage of FpSqrtEven for ELL2_C1_EDWARDS, since\n// SageMath returns different root first and everything falls apart\nconst ELL2_C1 = (Fp.ORDER + BigInt(3)) / BigInt(8); // 1. c1 = (q + 3) / 8 # Integer arithmetic\nconst ELL2_C2 = Fp.pow(_2n, ELL2_C1); // 2. c2 = 2^c1\nconst ELL2_C3 = Fp.sqrt(Fp.neg(Fp.ONE)); // 3. c3 = sqrt(-1)\nconst ELL2_C4 = (Fp.ORDER - BigInt(5)) / BigInt(8); // 4. c4 = (q - 5) / 8 # Integer arithmetic\nconst ELL2_J = BigInt(486662);\n// prettier-ignore\nfunction map_to_curve_elligator2_curve25519(u) {\n let tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, _2n); // 2. tv1 = 2 * tv1\n let xd = Fp.add(tv1, Fp.ONE); // 3. xd = tv1 + 1 # Nonzero: -1 is square (mod p), tv1 is not\n let x1n = Fp.neg(ELL2_J); // 4. x1n = -J # x1 = x1n / xd = -J / (1 + 2 * u^2)\n let tv2 = Fp.sqr(xd); // 5. tv2 = xd^2\n let gxd = Fp.mul(tv2, xd); // 6. gxd = tv2 * xd # gxd = xd^3\n let gx1 = Fp.mul(tv1, ELL2_J); // 7. gx1 = J * tv1 # x1n + J * xd\n gx1 = Fp.mul(gx1, x1n); // 8. gx1 = gx1 * x1n # x1n^2 + J * x1n * xd\n gx1 = Fp.add(gx1, tv2); // 9. gx1 = gx1 + tv2 # x1n^2 + J * x1n * xd + xd^2\n gx1 = Fp.mul(gx1, x1n); // 10. gx1 = gx1 * x1n # x1n^3 + J * x1n^2 * xd + x1n * xd^2\n let tv3 = Fp.sqr(gxd); // 11. tv3 = gxd^2\n tv2 = Fp.sqr(tv3); // 12. tv2 = tv3^2 # gxd^4\n tv3 = Fp.mul(tv3, gxd); // 13. tv3 = tv3 * gxd # gxd^3\n tv3 = Fp.mul(tv3, gx1); // 14. tv3 = tv3 * gx1 # gx1 * gxd^3\n tv2 = Fp.mul(tv2, tv3); // 15. tv2 = tv2 * tv3 # gx1 * gxd^7\n let y11 = Fp.pow(tv2, ELL2_C4); // 16. y11 = tv2^c4 # (gx1 * gxd^7)^((p - 5) / 8)\n y11 = Fp.mul(y11, tv3); // 17. y11 = y11 * tv3 # gx1*gxd^3*(gx1*gxd^7)^((p-5)/8)\n let y12 = Fp.mul(y11, ELL2_C3); // 18. y12 = y11 * c3\n tv2 = Fp.sqr(y11); // 19. tv2 = y11^2\n tv2 = Fp.mul(tv2, gxd); // 20. tv2 = tv2 * gxd\n let e1 = Fp.eql(tv2, gx1); // 21. e1 = tv2 == gx1\n let y1 = Fp.cmov(y12, y11, e1); // 22. y1 = CMOV(y12, y11, e1) # If g(x1) is square, this is its sqrt\n let x2n = Fp.mul(x1n, tv1); // 23. x2n = x1n * tv1 # x2 = x2n / xd = 2 * u^2 * x1n / xd\n let y21 = Fp.mul(y11, u); // 24. y21 = y11 * u\n y21 = Fp.mul(y21, ELL2_C2); // 25. y21 = y21 * c2\n let y22 = Fp.mul(y21, ELL2_C3); // 26. y22 = y21 * c3\n let gx2 = Fp.mul(gx1, tv1); // 27. gx2 = gx1 * tv1 # g(x2) = gx2 / gxd = 2 * u^2 * g(x1)\n tv2 = Fp.sqr(y21); // 28. tv2 = y21^2\n tv2 = Fp.mul(tv2, gxd); // 29. tv2 = tv2 * gxd\n let e2 = Fp.eql(tv2, gx2); // 30. e2 = tv2 == gx2\n let y2 = Fp.cmov(y22, y21, e2); // 31. y2 = CMOV(y22, y21, e2) # If g(x2) is square, this is its sqrt\n tv2 = Fp.sqr(y1); // 32. tv2 = y1^2\n tv2 = Fp.mul(tv2, gxd); // 33. tv2 = tv2 * gxd\n let e3 = Fp.eql(tv2, gx1); // 34. e3 = tv2 == gx1\n let xn = Fp.cmov(x2n, x1n, e3); // 35. xn = CMOV(x2n, x1n, e3) # If e3, x = x1, else x = x2\n let y = Fp.cmov(y2, y1, e3); // 36. y = CMOV(y2, y1, e3) # If e3, y = y1, else y = y2\n let e4 = Fp.isOdd(y); // 37. e4 = sgn0(y) == 1 # Fix sign of y\n y = Fp.cmov(y, Fp.neg(y), e3 !== e4); // 38. y = CMOV(y, -y, e3 XOR e4)\n return { xMn: xn, xMd: xd, yMn: y, yMd: _1n }; // 39. return (xn, xd, y, 1)\n}\nconst ELL2_C1_EDWARDS = FpSqrtEven(Fp, Fp.neg(BigInt(486664))); // sgn0(c1) MUST equal 0\nfunction map_to_curve_elligator2_edwards25519(u) {\n const { xMn, xMd, yMn, yMd } = map_to_curve_elligator2_curve25519(u); // 1. (xMn, xMd, yMn, yMd) = map_to_curve_elligator2_curve25519(u)\n let xn = Fp.mul(xMn, yMd); // 2. xn = xMn * yMd\n xn = Fp.mul(xn, ELL2_C1_EDWARDS); // 3. xn = xn * c1\n let xd = Fp.mul(xMd, yMn); // 4. xd = xMd * yMn # xn / xd = c1 * xM / yM\n let yn = Fp.sub(xMn, xMd); // 5. yn = xMn - xMd\n let yd = Fp.add(xMn, xMd); // 6. yd = xMn + xMd # (n / d - 1) / (n / d + 1) = (n - d) / (n + d)\n let tv1 = Fp.mul(xd, yd); // 7. tv1 = xd * yd\n let e = Fp.eql(tv1, Fp.ZERO); // 8. e = tv1 == 0\n xn = Fp.cmov(xn, Fp.ZERO, e); // 9. xn = CMOV(xn, 0, e)\n xd = Fp.cmov(xd, Fp.ONE, e); // 10. xd = CMOV(xd, 1, e)\n yn = Fp.cmov(yn, Fp.ONE, e); // 11. yn = CMOV(yn, 1, e)\n yd = Fp.cmov(yd, Fp.ONE, e); // 12. yd = CMOV(yd, 1, e)\n const inv = Fp.invertBatch([xd, yd]); // batch division\n return { x: Fp.mul(xn, inv[0]), y: Fp.mul(yn, inv[1]) }; // 13. return (xn, xd, yn, yd)\n}\nconst { hashToCurve, encodeToCurve } = htf.createHasher(ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {\n DST: 'edwards25519_XMD:SHA-512_ELL2_RO_',\n encodeDST: 'edwards25519_XMD:SHA-512_ELL2_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha512,\n});\nexport { hashToCurve, encodeToCurve };\nfunction assertRstPoint(other) {\n if (!(other instanceof RistrettoPoint))\n throw new Error('RistrettoPoint expected');\n}\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst SQRT_M1 = BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// √(ad - 1)\nconst SQRT_AD_MINUS_ONE = BigInt('25063068953384623474111414158702152701244531502492656460079210482610430750235');\n// 1 / √(a-d)\nconst INVSQRT_A_MINUS_D = BigInt('54469307008909316920995813868745141605393597292927456921205312896311721017578');\n// 1-d²\nconst ONE_MINUS_D_SQ = BigInt('1159843021668779879193775521855586647937357759715417654439879720876111806838');\n// (d-1)²\nconst D_MINUS_ONE_SQ = BigInt('40440834346308536858101042469323190826248399146238708352240133220865137265952');\n// Calculates 1/√(number)\nconst invertSqrt = (number) => uvRatio(_1n, number);\nconst MAX_255B = BigInt('0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');\nconst bytes255ToNumberLE = (bytes) => ed25519.CURVE.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n// Computes Elligator map for Ristretto\n// https://ristretto.group/formulas/elligator.html\nfunction calcElligatorRistrettoMap(r0) {\n const { d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const r = mod(SQRT_M1 * r0 * r0); // 1\n const Ns = mod((r + _1n) * ONE_MINUS_D_SQ); // 2\n let c = BigInt(-1); // 3\n const D = mod((c - d * r) * mod(r + d)); // 4\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D); // 5\n let s_ = mod(s * r0); // 6\n if (!isNegativeLE(s_, P))\n s_ = mod(-s_);\n if (!Ns_D_is_sq)\n s = s_; // 7\n if (!Ns_D_is_sq)\n c = r; // 8\n const Nt = mod(c * (r - _1n) * D_MINUS_ONE_SQ - D); // 9\n const s2 = s * s;\n const W0 = mod((s + s) * D); // 10\n const W1 = mod(Nt * SQRT_AD_MINUS_ONE); // 11\n const W2 = mod(_1n - s2); // 12\n const W3 = mod(_1n + s2); // 13\n return new ed25519.ExtendedPoint(mod(W0 * W3), mod(W2 * W1), mod(W1 * W3), mod(W0 * W2));\n}\n/**\n * Each ed25519/ExtendedPoint has 8 different equivalent points. This can be\n * a source of bugs for protocols like ring signatures. Ristretto was created to solve this.\n * Ristretto point operates in X:Y:Z:T extended coordinates like ExtendedPoint,\n * but it should work in its own namespace: do not combine those two.\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-ristretto255-decaf448\n */\nclass RistrettoPoint {\n // Private property to discourage combining ExtendedPoint + RistrettoPoint\n // Always use Ristretto encoding/decoding instead.\n constructor(ep) {\n this.ep = ep;\n }\n static fromAffine(ap) {\n return new RistrettoPoint(ed25519.ExtendedPoint.fromAffine(ap));\n }\n /**\n * Takes uniform output of 64-bit hash function like sha512 and converts it to `RistrettoPoint`.\n * The hash-to-group operation applies Elligator twice and adds the results.\n * **Note:** this is one-way map, there is no conversion from point to hash.\n * https://ristretto.group/formulas/elligator.html\n * @param hex 64-bit output of a hash function\n */\n static hashToCurve(hex) {\n hex = ensureBytes('ristrettoHash', hex, 64);\n const r1 = bytes255ToNumberLE(hex.slice(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(hex.slice(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new RistrettoPoint(R1.add(R2));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * https://ristretto.group/formulas/decoding.html\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n hex = ensureBytes('ristrettoHex', hex, 32);\n const { a, d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const emsg = 'RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint';\n const s = bytes255ToNumberLE(hex);\n // 1. Check that s_bytes is the canonical encoding of a field element, or else abort.\n // 3. Check that s is non-negative, or else abort\n if (!equalBytes(numberToBytesLE(s, 32), hex) || isNegativeLE(s, P))\n throw new Error(emsg);\n const s2 = mod(s * s);\n const u1 = mod(_1n + a * s2); // 4 (a is -1)\n const u2 = mod(_1n - a * s2); // 5\n const u1_2 = mod(u1 * u1);\n const u2_2 = mod(u2 * u2);\n const v = mod(a * d * u1_2 - u2_2); // 6\n const { isValid, value: I } = invertSqrt(mod(v * u2_2)); // 7\n const Dx = mod(I * u2); // 8\n const Dy = mod(I * Dx * v); // 9\n let x = mod((s + s) * Dx); // 10\n if (isNegativeLE(x, P))\n x = mod(-x); // 10\n const y = mod(u1 * Dy); // 11\n const t = mod(x * y); // 12\n if (!isValid || isNegativeLE(t, P) || y === _0n)\n throw new Error(emsg);\n return new RistrettoPoint(new ed25519.ExtendedPoint(x, y, _1n, t));\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * https://ristretto.group/formulas/encoding.html\n */\n toRawBytes() {\n let { ex: x, ey: y, ez: z, et: t } = this.ep;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const u1 = mod(mod(z + y) * mod(z - y)); // 1\n const u2 = mod(x * y); // 2\n // Square root always exists\n const u2sq = mod(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod(u1 * u2sq)); // 3\n const D1 = mod(invsqrt * u1); // 4\n const D2 = mod(invsqrt * u2); // 5\n const zInv = mod(D1 * D2 * t); // 6\n let D; // 7\n if (isNegativeLE(t * zInv, P)) {\n let _x = mod(y * SQRT_M1);\n let _y = mod(x * SQRT_M1);\n x = _x;\n y = _y;\n D = mod(D1 * INVSQRT_A_MINUS_D);\n }\n else {\n D = D2; // 8\n }\n if (isNegativeLE(x * zInv, P))\n y = mod(-y); // 9\n let s = mod((z - y) * D); // 10 (check footer's note, no sqrt(-a))\n if (isNegativeLE(s, P))\n s = mod(-s);\n return numberToBytesLE(s, 32); // 11\n }\n toHex() {\n return bytesToHex(this.toRawBytes());\n }\n toString() {\n return this.toHex();\n }\n // Compare one point to another.\n equals(other) {\n assertRstPoint(other);\n const { ex: X1, ey: Y1 } = this.ep;\n const { ex: X2, ey: Y2 } = other.ep;\n const mod = ed25519.CURVE.Fp.create;\n // (x1 * y2 == y1 * x2) | (y1 * y2 == x1 * x2)\n const one = mod(X1 * Y2) === mod(Y1 * X2);\n const two = mod(Y1 * Y2) === mod(X1 * X2);\n return one || two;\n }\n add(other) {\n assertRstPoint(other);\n return new RistrettoPoint(this.ep.add(other.ep));\n }\n subtract(other) {\n assertRstPoint(other);\n return new RistrettoPoint(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return new RistrettoPoint(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return new RistrettoPoint(this.ep.multiplyUnsafe(scalar));\n }\n}\nRistrettoPoint.BASE = new RistrettoPoint(ed25519.ExtendedPoint.BASE);\nRistrettoPoint.ZERO = new RistrettoPoint(ed25519.ExtendedPoint.ZERO);\nexport { RistrettoPoint };\n// https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve/14/\n// Appendix B. Hashing to ristretto255\nexport const hash_to_ristretto255 = (msg, options) => {\n const d = options.DST;\n const DST = typeof d === 'string' ? utf8ToBytes(d) : d;\n const uniform_bytes = htf.expand_message_xmd(msg, DST, 64, sha512);\n const P = RistrettoPoint.hashToCurve(uniform_bytes);\n return P;\n};\n//# sourceMappingURL=ed25519.js.map","import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict'\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\n// @ts-ignore\nvar _Buffer = require('safe-buffer').Buffer\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source) }\n if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return _Buffer.alloc(0) }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (source[psz]) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4))\n vch.fill(0x00, 0, zeroes)\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import assert from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n assert.exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map","import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = wrapConstructor(() => new SHA256());\nexport const sha224 = wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","'use strict';\n\n// This is free and unencumbered software released into the public domain.\n// See LICENSE.md for more information.\n\n//\n// Utilities\n//\n\n/**\n * @param {number} a The number to test.\n * @param {number} min The minimum value in the range, inclusive.\n * @param {number} max The maximum value in the range, inclusive.\n * @return {boolean} True if a >= min and a <= max.\n */\nfunction inRange(a, min, max) {\n return min <= a && a <= max;\n}\n\n/**\n * @param {*} o\n * @return {Object}\n */\nfunction ToDictionary(o) {\n if (o === undefined) return {};\n if (o === Object(o)) return o;\n throw TypeError('Could not convert argument to dictionary');\n}\n\n/**\n * @param {string} string Input string of UTF-16 code units.\n * @return {!Array.} Code points.\n */\nfunction stringToCodePoints(string) {\n // https://heycam.github.io/webidl/#dfn-obtain-unicode\n\n // 1. Let S be the DOMString value.\n var s = String(string);\n\n // 2. Let n be the length of S.\n var n = s.length;\n\n // 3. Initialize i to 0.\n var i = 0;\n\n // 4. Initialize U to be an empty sequence of Unicode characters.\n var u = [];\n\n // 5. While i < n:\n while (i < n) {\n\n // 1. Let c be the code unit in S at index i.\n var c = s.charCodeAt(i);\n\n // 2. Depending on the value of c:\n\n // c < 0xD800 or c > 0xDFFF\n if (c < 0xD800 || c > 0xDFFF) {\n // Append to U the Unicode character with code point c.\n u.push(c);\n }\n\n // 0xDC00 ≤ c ≤ 0xDFFF\n else if (0xDC00 <= c && c <= 0xDFFF) {\n // Append to U a U+FFFD REPLACEMENT CHARACTER.\n u.push(0xFFFD);\n }\n\n // 0xD800 ≤ c ≤ 0xDBFF\n else if (0xD800 <= c && c <= 0xDBFF) {\n // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT\n // CHARACTER.\n if (i === n - 1) {\n u.push(0xFFFD);\n }\n // 2. Otherwise, i < n−1:\n else {\n // 1. Let d be the code unit in S at index i+1.\n var d = string.charCodeAt(i + 1);\n\n // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:\n if (0xDC00 <= d && d <= 0xDFFF) {\n // 1. Let a be c & 0x3FF.\n var a = c & 0x3FF;\n\n // 2. Let b be d & 0x3FF.\n var b = d & 0x3FF;\n\n // 3. Append to U the Unicode character with code point\n // 2^16+2^10*a+b.\n u.push(0x10000 + (a << 10) + b);\n\n // 4. Set i to i+1.\n i += 1;\n }\n\n // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a\n // U+FFFD REPLACEMENT CHARACTER.\n else {\n u.push(0xFFFD);\n }\n }\n }\n\n // 3. Set i to i+1.\n i += 1;\n }\n\n // 6. Return U.\n return u;\n}\n\n/**\n * @param {!Array.} code_points Array of code points.\n * @return {string} string String of UTF-16 code units.\n */\nfunction codePointsToString(code_points) {\n var s = '';\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 0xFFFF) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 0x10000;\n s += String.fromCharCode((cp >> 10) + 0xD800,\n (cp & 0x3FF) + 0xDC00);\n }\n }\n return s;\n}\n\n\n//\n// Implementation of Encoding specification\n// https://encoding.spec.whatwg.org/\n//\n\n//\n// 3. Terminology\n//\n\n/**\n * End-of-stream is a special token that signifies no more tokens\n * are in the stream.\n * @const\n */ var end_of_stream = -1;\n\n/**\n * A stream represents an ordered sequence of tokens.\n *\n * @constructor\n * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide the\n * stream.\n */\nfunction Stream(tokens) {\n /** @type {!Array.} */\n this.tokens = [].slice.call(tokens);\n}\n\nStream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n};\n\n//\n// 4. Encodings\n//\n\n// 4.1 Encoders and decoders\n\n/** @const */\nvar finished = -1;\n\n/**\n * @param {boolean} fatal If true, decoding errors raise an exception.\n * @param {number=} opt_code_point Override the standard fallback code point.\n * @return {number} The code point to insert on a decoding error.\n */\nfunction decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError('Decoder error');\n return opt_code_point || 0xFFFD;\n}\n\n//\n// 7. API\n//\n\n/** @const */ var DEFAULT_ENCODING = 'utf-8';\n\n// 7.1 Interface TextDecoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextDecoder(encoding, options) {\n if (!(this instanceof TextDecoder)) {\n return new TextDecoder(encoding, options);\n }\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {boolean} */\n this._BOMseen = false;\n /** @private @type {?Decoder} */\n this._decoder = null;\n /** @private @type {boolean} */\n this._fatal = Boolean(options['fatal']);\n /** @private @type {boolean} */\n this._ignoreBOM = Boolean(options['ignoreBOM']);\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n Object.defineProperty(this, 'fatal', {value: this._fatal});\n Object.defineProperty(this, 'ignoreBOM', {value: this._ignoreBOM});\n}\n\nTextDecoder.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === 'object' && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === 'object' && 'buffer' in input &&\n input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(input.buffer,\n input.byteOffset,\n input.byteLength);\n } else {\n bytes = new Uint8Array(0);\n }\n\n options = ToDictionary(options);\n\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({fatal: this._fatal});\n this._BOMseen = false;\n }\n this._streaming = Boolean(options['stream']);\n\n var input_stream = new Stream(bytes);\n\n var code_points = [];\n\n /** @type {?(number|!Array.)} */\n var result;\n\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n\n if (code_points.length) {\n // If encoding is one of utf-8, utf-16be, and utf-16le, and\n // ignore BOM flag and BOM seen flag are unset, run these\n // subsubsteps:\n if (['utf-8'].indexOf(this.encoding) !== -1 &&\n !this._ignoreBOM && !this._BOMseen) {\n // If token is U+FEFF, set BOM seen flag.\n if (code_points[0] === 0xFEFF) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n // Otherwise, if token is not end-of-stream, set BOM seen\n // flag and append token to output.\n this._BOMseen = true;\n }\n }\n }\n\n return codePointsToString(code_points);\n }\n};\n\n// 7.2 Interface TextEncoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextEncoder(encoding, options) {\n if (!(this instanceof TextEncoder))\n return new TextEncoder(encoding, options);\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {?Encoder} */\n this._encoder = null;\n /** @private @type {{fatal: boolean}} */\n this._options = {fatal: Boolean(options['fatal'])};\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n}\n\nTextEncoder.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : '';\n options = ToDictionary(options);\n\n // NOTE: This option is nonstandard. None of the encodings\n // permitted for encoding (i.e. UTF-8, UTF-16) are stateful,\n // so streaming is not necessary.\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options['stream']);\n\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n /** @type {?(number|!Array.)} */\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n};\n\n//\n// 8. The encoding\n//\n\n// 8.1 utf-8\n\n/**\n * @constructor\n * @implements {Decoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Decoder(options) {\n var fatal = options.fatal;\n\n // utf-8's decoder's has an associated utf-8 code point, utf-8\n // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8\n // lower boundary (initially 0x80), and a utf-8 upper boundary\n // (initially 0xBF).\n var /** @type {number} */ utf8_code_point = 0,\n /** @type {number} */ utf8_bytes_seen = 0,\n /** @type {number} */ utf8_bytes_needed = 0,\n /** @type {number} */ utf8_lower_boundary = 0x80,\n /** @type {number} */ utf8_upper_boundary = 0xBF;\n\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point.\n */\n this.handler = function(stream, bite) {\n // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,\n // set utf-8 bytes needed to 0 and return error.\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n\n // 2. If byte is end-of-stream, return finished.\n if (bite === end_of_stream)\n return finished;\n\n // 3. If utf-8 bytes needed is 0, based on byte:\n if (utf8_bytes_needed === 0) {\n\n // 0x00 to 0x7F\n if (inRange(bite, 0x00, 0x7F)) {\n // Return a code point whose value is byte.\n return bite;\n }\n\n // 0xC2 to 0xDF\n if (inRange(bite, 0xC2, 0xDF)) {\n // Set utf-8 bytes needed to 1 and utf-8 code point to byte\n // − 0xC0.\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 0xC0;\n }\n\n // 0xE0 to 0xEF\n else if (inRange(bite, 0xE0, 0xEF)) {\n // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.\n if (bite === 0xE0)\n utf8_lower_boundary = 0xA0;\n // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.\n if (bite === 0xED)\n utf8_upper_boundary = 0x9F;\n // 3. Set utf-8 bytes needed to 2 and utf-8 code point to\n // byte − 0xE0.\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 0xE0;\n }\n\n // 0xF0 to 0xF4\n else if (inRange(bite, 0xF0, 0xF4)) {\n // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.\n if (bite === 0xF0)\n utf8_lower_boundary = 0x90;\n // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.\n if (bite === 0xF4)\n utf8_upper_boundary = 0x8F;\n // 3. Set utf-8 bytes needed to 3 and utf-8 code point to\n // byte − 0xF0.\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 0xF0;\n }\n\n // Otherwise\n else {\n // Return error.\n return decoderError(fatal);\n }\n\n // Then (byte is in the range 0xC2 to 0xF4) set utf-8 code\n // point to utf-8 code point << (6 × utf-8 bytes needed) and\n // return continue.\n utf8_code_point = utf8_code_point << (6 * utf8_bytes_needed);\n return null;\n }\n\n // 4. If byte is not in the range utf-8 lower boundary to utf-8\n // upper boundary, run these substeps:\n if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n\n // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8\n // bytes seen to 0, set utf-8 lower boundary to 0x80, and set\n // utf-8 upper boundary to 0xBF.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 2. Prepend byte to stream.\n stream.prepend(bite);\n\n // 3. Return error.\n return decoderError(fatal);\n }\n\n // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary\n // to 0xBF.\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 6. Increase utf-8 bytes seen by one and set utf-8 code point\n // to utf-8 code point + (byte − 0x80) << (6 × (utf-8 bytes\n // needed − utf-8 bytes seen)).\n utf8_bytes_seen += 1;\n utf8_code_point += (bite - 0x80) << (6 * (utf8_bytes_needed - utf8_bytes_seen));\n\n // 7. If utf-8 bytes seen is not equal to utf-8 bytes needed,\n // continue.\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n\n // 8. Let code point be utf-8 code point.\n var code_point = utf8_code_point;\n\n // 9. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes\n // seen to 0.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n\n // 10. Return a code point whose value is code point.\n return code_point;\n };\n}\n\n/**\n * @constructor\n * @implements {Encoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Encoder(options) {\n var fatal = options.fatal;\n /**\n * @param {Stream} stream Input stream.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit.\n */\n this.handler = function(stream, code_point) {\n // 1. If code point is end-of-stream, return finished.\n if (code_point === end_of_stream)\n return finished;\n\n // 2. If code point is in the range U+0000 to U+007F, return a\n // byte whose value is code point.\n if (inRange(code_point, 0x0000, 0x007f))\n return code_point;\n\n // 3. Set count and offset based on the range code point is in:\n var count, offset;\n // U+0080 to U+07FF: 1 and 0xC0\n if (inRange(code_point, 0x0080, 0x07FF)) {\n count = 1;\n offset = 0xC0;\n }\n // U+0800 to U+FFFF: 2 and 0xE0\n else if (inRange(code_point, 0x0800, 0xFFFF)) {\n count = 2;\n offset = 0xE0;\n }\n // U+10000 to U+10FFFF: 3 and 0xF0\n else if (inRange(code_point, 0x10000, 0x10FFFF)) {\n count = 3;\n offset = 0xF0;\n }\n\n // 4.Let bytes be a byte sequence whose first byte is (code\n // point >> (6 × count)) + offset.\n var bytes = [(code_point >> (6 * count)) + offset];\n\n // 5. Run these substeps while count is greater than 0:\n while (count > 0) {\n\n // 1. Set temp to code point >> (6 × (count − 1)).\n var temp = code_point >> (6 * (count - 1));\n\n // 2. Append to bytes 0x80 | (temp & 0x3F).\n bytes.push(0x80 | (temp & 0x3F));\n\n // 3. Decrease count by one.\n count -= 1;\n }\n\n // 6. Return bytes bytes, in order.\n return bytes;\n };\n}\n\nexports.TextEncoder = TextEncoder;\nexports.TextDecoder = TextDecoder;","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserializeUnchecked = exports.deserialize = exports.serialize = exports.BinaryReader = exports.BinaryWriter = exports.BorshError = exports.baseDecode = exports.baseEncode = void 0;\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst bs58_1 = __importDefault(require(\"bs58\"));\n// TODO: Make sure this polyfill not included when not required\nconst encoding = __importStar(require(\"text-encoding-utf-8\"));\nconst ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\nconst textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\nfunction baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer.from(value));\n}\nexports.baseEncode = baseEncode;\nfunction baseDecode(value) {\n return Buffer.from(bs58_1.default.decode(value));\n}\nexports.baseDecode = baseDecode;\nconst INITIAL_LENGTH = 1024;\nclass BorshError extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n // NOTE: Modifying message directly as jest doesn't use .toString()\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n}\nexports.BorshError = BorshError;\n/// Binary encoder.\nclass BinaryWriter {\n constructor() {\n this.buf = Buffer.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer.concat([this.buf, Buffer.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n // Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser\n this.buf = Buffer.concat([\n Buffer.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer.alloc(INITIAL_LENGTH),\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array) {\n this.writeBuffer(Buffer.from(array));\n }\n writeArray(array, fn) {\n this.maybeResize();\n this.writeU32(array.length);\n for (const elem of array) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n}\nexports.BinaryWriter = BinaryWriter;\nfunction handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function (...args) {\n try {\n return originalMethod.apply(this, args);\n }\n catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n}\nclass BinaryReader {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n // NOTE: Using TextDecoder to fail on invalid UTF-8\n return textDecoder.decode(buf);\n }\n catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n}\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU8\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU16\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU32\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU64\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU128\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU256\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU512\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readString\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readFixedArray\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readArray\", null);\nexports.BinaryReader = BinaryReader;\nfunction capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\nfunction serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n // TODO: Handle missing values properly (make sure they never result in just skipped write)\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n }\n else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n }\n else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n }\n else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n }\n else if (fieldType.kind !== undefined) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === undefined) {\n writer.writeU8(0);\n }\n else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n }\n else {\n serializeStruct(schema, value, writer);\n }\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n }\n else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n }\n else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n}\n/// Serialize given object using schema of the form:\n/// { class_name -> [ [field_name, field_type], .. ], .. }\nfunction serialize(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n}\nexports.serialize = serialize;\nfunction deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n }\n else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n }\n else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return undefined;\n }\n if (fieldType.kind === \"map\") {\n let map = new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n}\n/// Deserializes object from bytes using schema.\nfunction deserialize(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n}\nexports.deserialize = deserialize;\n/// Deserializes object from bytes using schema, without checking the length read\nfunction deserializeUnchecked(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n}\nexports.deserializeUnchecked = deserializeUnchecked;\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.s16 = exports.s8 = exports.nu64be = exports.u48be = exports.u40be = exports.u32be = exports.u24be = exports.u16be = exports.nu64 = exports.u48 = exports.u40 = exports.u32 = exports.u24 = exports.u16 = exports.u8 = exports.offset = exports.greedy = exports.Constant = exports.UTF8 = exports.CString = exports.Blob = exports.Boolean = exports.BitField = exports.BitStructure = exports.VariantLayout = exports.Union = exports.UnionLayoutDiscriminator = exports.UnionDiscriminator = exports.Structure = exports.Sequence = exports.DoubleBE = exports.Double = exports.FloatBE = exports.Float = exports.NearInt64BE = exports.NearInt64 = exports.NearUInt64BE = exports.NearUInt64 = exports.IntBE = exports.Int = exports.UIntBE = exports.UInt = exports.OffsetLayout = exports.GreedyCount = exports.ExternalLayout = exports.bindConstructorLayout = exports.nameWithProperty = exports.Layout = exports.uint8ArrayToBuffer = exports.checkUint8Array = void 0;\nexports.constant = exports.utf8 = exports.cstr = exports.blob = exports.unionLayoutDiscriminator = exports.union = exports.seq = exports.bits = exports.struct = exports.f64be = exports.f64 = exports.f32be = exports.f32 = exports.ns64be = exports.s48be = exports.s40be = exports.s32be = exports.s24be = exports.s16be = exports.ns64 = exports.s48 = exports.s40 = exports.s32 = exports.s24 = void 0;\nconst buffer_1 = require(\"buffer\");\n/* Check if a value is a Uint8Array.\n *\n * @ignore */\nfunction checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError('b must be a Uint8Array');\n }\n}\nexports.checkUint8Array = checkUint8Array;\n/* Create a Buffer instance from a Uint8Array.\n *\n * @ignore */\nfunction uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n}\nexports.uint8ArrayToBuffer = uint8ArrayToBuffer;\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nexports.Layout = Layout;\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nexports.nameWithProperty = nameWithProperty;\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\n// `Class` must be a constructor Function, but the assignment of a `layout_` property to it makes it difficult to type\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Object.prototype.hasOwnProperty.call(Class, 'layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (Object.prototype.hasOwnProperty.call(layout, 'boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nexports.bindConstructorLayout = bindConstructorLayout;\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\nexports.ExternalLayout = ExternalLayout;\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\nexports.GreedyCount = GreedyCount;\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n super(layout.span, property || layout.property);\n /** The subordinated layout. */\n this.layout = layout;\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Uint8Array\n * being accessed. */\n this.offset = offset;\n }\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n /** @override */\n decode(b, offset = 0) {\n return this.layout.decode(b, offset + this.offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\nexports.OffsetLayout = OffsetLayout;\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UInt = UInt;\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UIntBE = UIntBE;\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.Int = Int;\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.IntBE = IntBE;\nconst V2E32 = Math.pow(2, 32);\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return { hi32, lo32 };\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64 = NearUInt64;\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64BE = NearUInt64BE;\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64 = NearInt64;\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64BE = NearInt64BE;\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset);\n return 4;\n }\n}\nexports.Float = Float;\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset);\n return 4;\n }\n}\nexports.FloatBE = FloatBE;\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset);\n return 8;\n }\n}\nexports.Double = Double;\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset);\n return 8;\n }\n}\nexports.DoubleBE = DoubleBE;\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n super(span, property);\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n }\n else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\nexports.Sequence = Sequence;\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n }\n catch (e) {\n // ignore error\n }\n super(span, property);\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n }\n catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset = 0) {\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n }\n else if (0 <= offset) {\n offset += fd.span;\n }\n }\n return undefined;\n }\n}\nexports.Structure = Structure;\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\nexports.UnionDiscriminator = UnionDiscriminator;\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n super(property || layout.property || 'variant');\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\nexports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if ((discr instanceof UInt)\n || (discr instanceof UIntBE)) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n }\n else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n }\n else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n else {\n discriminator = discr;\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && ((discr instanceof UInt)\n || (discr instanceof UIntBE))) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discriminator;\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = (discr instanceof UInt)\n || (discr instanceof UIntBE);\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function (src) {\n return boundGetSourceVariant(src);\n };\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function (gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property\n && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)))) {\n return vlo;\n }\n }\n else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n const clo = this.registry[discr];\n if (undefined === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n // defaultLayout.property can be undefined, but this is allowed by buffer-layout\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n dest[defaultLayout.property] = defaultLayout.decode(b, offset + contentOffset);\n }\n else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset = 0) {\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n // this.defaultLayout is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n // clo.property is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return contentOffset + clo.encode(src[clo.property], b, offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset);\n }\n else {\n variant = vb;\n }\n return this.registry[variant];\n }\n}\nexports.Union = Union;\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n }\n else if (this.property) {\n dest[this.property] = true;\n }\n else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!Object.prototype.hasOwnProperty.call(src, this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return undefined;\n }\n}\nexports.VariantLayout = VariantLayout;\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function (v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function () {\n return value;\n };\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset = 0) {\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n}\nexports.BitStructure = BitStructure;\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n /** The span of this value in bits. */\n this.bits = bits;\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ('number' !== typeof value\n || !Number.isInteger(value)\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n }\n}\nexports.BitField = BitField;\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!super.decode(b, offset);\n }\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n super.encode(value);\n }\n}\nexports.Boolean = Boolean;\n/* eslint-enable no-extend-native */\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Uint8Array.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Uint8Array as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Uint8Array');\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\nexports.Blob = Blob;\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n return uint8ArrayToBuffer(b).slice(offset, offset + span - 1).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset);\n buffer[offset + span] = 0;\n return span + 1;\n }\n}\nexports.CString = CString;\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan) && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n }\n else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n super(-1, property);\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n return b.length - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(uint8ArrayToBuffer(b), offset);\n return span;\n }\n}\nexports.UTF8 = UTF8;\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n /** @override */\n decode(b, offset) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\nexports.Constant = Constant;\n/** Factory for {@link GreedyCount}. */\nexports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n/** Factory for {@link OffsetLayout}. */\nexports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nexports.u8 = ((property) => new UInt(1, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16 = ((property) => new UInt(2, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24 = ((property) => new UInt(3, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32 = ((property) => new UInt(4, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40 = ((property) => new UInt(5, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48 = ((property) => new UInt(6, property));\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64 = ((property) => new NearUInt64(property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16be = ((property) => new UIntBE(2, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24be = ((property) => new UIntBE(3, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32be = ((property) => new UIntBE(4, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40be = ((property) => new UIntBE(5, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48be = ((property) => new UIntBE(6, property));\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64be = ((property) => new NearUInt64BE(property));\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nexports.s8 = ((property) => new Int(1, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nexports.s16 = ((property) => new Int(2, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nexports.s24 = ((property) => new Int(3, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nexports.s32 = ((property) => new Int(4, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nexports.s40 = ((property) => new Int(5, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nexports.s48 = ((property) => new Int(6, property));\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64 = ((property) => new NearInt64(property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nexports.s16be = ((property) => new IntBE(2, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nexports.s24be = ((property) => new IntBE(3, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nexports.s32be = ((property) => new IntBE(4, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nexports.s40be = ((property) => new IntBE(5, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nexports.s48be = ((property) => new IntBE(6, property));\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64be = ((property) => new NearInt64BE(property));\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nexports.f32 = ((property) => new Float(property));\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nexports.f32be = ((property) => new FloatBE(property));\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nexports.f64 = ((property) => new Double(property));\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nexports.f64be = ((property) => new DoubleBE(property));\n/** Factory for {@link Structure} values. */\nexports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n/** Factory for {@link BitStructure} values. */\nexports.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n/** Factory for {@link Sequence} values. */\nexports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n/** Factory for {@link Union} values. */\nexports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nexports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n/** Factory for {@link Blob} values. */\nexports.blob = ((length, property) => new Blob(length, property));\n/** Factory for {@link CString} values. */\nexports.cstr = ((property) => new CString(property));\n/** Factory for {@link UTF8} values. */\nexports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n/** Factory for {@link Constant} values. */\nexports.constant = ((value, property) => new Constant(value, property));\n//# sourceMappingURL=Layout.js.map","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = byteArray.shift()!;\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = byteArray.shift()!;\n const numReadonlyUnsignedAccounts = byteArray.shift()!;\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift()!;\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = byteArray.slice(0, accountCount);\n byteArray = byteArray.slice(accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = byteArray.slice(0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n byteArray = byteArray.slice(dataLength);\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = byteArray.shift() as number;\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: byteArray.shift() as number,\n numReadonlySignedAccounts: byteArray.shift() as number,\n numReadonlyUnsignedAccounts: byteArray.shift() as number,\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift() as number;\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength);\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(byteArray.splice(0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = byteArray.splice(0, writableIndexesLength);\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = byteArray.splice(0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);\n byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet converter;\n/**\n * Convert a little-endian buffer into a BigInt.\n * @param buf The little-endian buffer to convert\n * @returns A BigInt with the little-endian representation of buf.\n */\nfunction toBigIntLE(buf) {\n {\n const reversed = Buffer.from(buf);\n reversed.reverse();\n const hex = reversed.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, false);\n}\nexports.toBigIntLE = toBigIntLE;\n/**\n * Convert a big-endian buffer into a BigInt\n * @param buf The big-endian buffer to convert.\n * @returns A BigInt with the big-endian representation of buf.\n */\nfunction toBigIntBE(buf) {\n {\n const hex = buf.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, true);\n}\nexports.toBigIntBE = toBigIntBE;\n/**\n * Convert a BigInt to a little-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A little-endian buffer representation of num.\n */\nfunction toBufferLE(num, width) {\n {\n const hex = num.toString(16);\n const buffer = Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n buffer.reverse();\n return buffer;\n }\n // Allocation is done here, since it is slower using napi in C\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);\n}\nexports.toBufferLE = toBufferLE;\n/**\n * Convert a BigInt to a big-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A big-endian buffer representation of num.\n */\nfunction toBufferBE(num, width) {\n {\n const hex = num.toString(16);\n return Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n }\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), true);\n}\nexports.toBufferBE = toBufferBE;\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a plain object.\n */\n\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options = {}) {\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const schemas = Structs.map(s => s.schema);\n const schema = Object.assign({}, ...schemas);\n return object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\n\nfunction deprecated(struct, log) {\n return new Struct({ ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n } else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n }\n\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\n\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\n\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n\n *entries(value, ctx) {\n var _struct;\n\n (_struct = struct) != null ? _struct : struct = fn();\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n var _struct2;\n\n (_struct2 = struct) != null ? _struct2 : struct = fn();\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n var _struct3;\n\n (_struct3 = struct) != null ? _struct3 : struct = fn();\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\n\nfunction omit(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = { ...schema\n };\n\n for (const key of keys) {\n delete subschema[key];\n }\n\n return object(subschema);\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\n\nfunction partial(struct) {\n const schema = struct instanceof Struct ? { ...struct.schema\n } : { ...struct\n };\n\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\n\nfunction pick(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = {};\n\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n\n return object(subschema);\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\n\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\n\nfunction date() {\n return define('date', value => {\n return value instanceof Date && !isNaN(value.getTime()) || \"Expected a valid `Date` object, but received: \" + print(value);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map(v => print(v)).join();\n\n for (const key of values) {\n schema[key] = key;\n }\n\n return new Struct({\n type: 'enums',\n schema,\n\n validator(value) {\n return values.includes(value) || \"Expected one of `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a function.\n */\n\nfunction func() {\n return define('func', value => {\n return typeof value === 'function' || \"Expected a function, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\n\nfunction instance(Class) {\n return define('instance', value => {\n return value instanceof Class || \"Expected a `\" + Class.name + \"` instance, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\n\nfunction integer() {\n return define('integer', value => {\n return typeof value === 'number' && !isNaN(value) && Number.isInteger(value) || \"Expected an integer, but received: \" + print(value);\n });\n}\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n }\n\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n\n validator(value) {\n return value instanceof Map || \"Expected a `Map` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\n\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n },\n\n coercer(value) {\n return isObject(value) ? { ...value\n } : value;\n }\n\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\n\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\n\nfunction regexp() {\n return define('regexp', value => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n\n validator(value) {\n return value instanceof Set || \"Expected a `Set` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\nfunction tuple(Elements) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Elements.length, value.length);\n\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Elements[i] || Never];\n }\n }\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\nfunction union(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), x => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n\n if (x === undefined) {\n return f;\n }\n\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x\n };\n let changed = false;\n\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n\n if (changed) {\n return ret;\n }\n }\n\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction trimmed(struct) {\n return coerce(struct, string(), x => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\n\nfunction empty(struct) {\n const expected = \"Expected an empty \" + struct.type;\n return refine(struct, 'empty', value => {\n if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return size === 0 || expected + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return length === 0 || expected + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\n\nfunction max(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'max', value => {\n return exclusive ? value < threshold : value <= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\n\nfunction min(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'min', value => {\n return exclusive ? value > threshold : value >= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\n\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', value => {\n return regexp.test(value) || \"Expected a \" + struct.type + \" matching `/\" + regexp.source + \"/` but received \\\"\" + value + \"\\\"\";\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\n\nfunction size(struct, min, max = min) {\n const expected = \"Expected a \" + struct.type;\n const of = min === max ? \"of `\" + min + \"`\" : \"between `\" + min + \"` and `\" + max + \"`\";\n return refine(struct, 'size', value => {\n if (typeof value === 'number' || value instanceof Date) {\n return min <= value && value <= max || expected + \" \" + of + \" but received `\" + value + \"`\";\n } else if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return min <= size && size <= max || expected + \" with a size \" + of + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return min <= length && length <= max || expected + \" with a length \" + of + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\n\nfunction refine(struct, name, refiner) {\n return new Struct({ ...struct,\n\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n\n for (const failure of failures) {\n yield { ...failure,\n refinement: name\n };\n }\n }\n\n });\n}\n\nexport { Struct, StructError, any, array, assert, assign, boolean, coerce, create, date, defaulted, define, deprecated, dynamic, empty, enums, func, instance, integer, intersection, is, lazy, literal, map, mask, max, min, never, nullable, number, object, omit, optional, partial, pattern, pick, record, refine, regexp, set, size, string, struct, trimmed, tuple, type, union, unknown, validate };\n//# sourceMappingURL=index.es.js.map\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","'use strict';\n\nconst uuid = require('uuid').v4;\n\n/**\n * Generates a JSON-RPC 1.0 or 2.0 request\n * @param {String} method Name of method to call\n * @param {Array|Object} params Array of parameters passed to the method as specified, or an object of parameter names and corresponding value\n * @param {String|Number|null} [id] Request ID can be a string, number, null for explicit notification or left out for automatic generation\n * @param {Object} [options]\n * @param {Number} [options.version=2] JSON-RPC version to use (1 or 2)\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @param {Function} [options.generator] Passed the request, and the options object and is expected to return a request ID\n * @throws {TypeError} If any of the parameters are invalid\n * @return {Object} A JSON-RPC 1.0 or 2.0 request\n * @memberOf Utils\n */\nconst generateRequest = function(method, params, id, options) {\n if(typeof method !== 'string') {\n throw new TypeError(method + ' must be a string');\n }\n\n options = options || {};\n\n // check valid version provided\n const version = typeof options.version === 'number' ? options.version : 2;\n if (version !== 1 && version !== 2) {\n throw new TypeError(version + ' must be 1 or 2');\n }\n\n const request = {\n method: method\n };\n\n if(version === 2) {\n request.jsonrpc = '2.0';\n }\n\n if(params) {\n // params given, but invalid?\n if(typeof params !== 'object' && !Array.isArray(params)) {\n throw new TypeError(params + ' must be an object, array or omitted');\n }\n request.params = params;\n }\n\n // if id was left out, generate one (null means explicit notification)\n if(typeof(id) === 'undefined') {\n const generator = typeof options.generator === 'function' ? options.generator : function() { return uuid(); };\n request.id = generator(request, options);\n } else if (version === 2 && id === null) {\n // we have a version 2 notification\n if (options.notificationIdNull) {\n request.id = null; // id will not be set at all unless option provided\n }\n } else {\n request.id = id;\n }\n\n return request;\n};\n\nmodule.exports = generateRequest;\n","'use strict';\n\nconst uuid = require('uuid').v4;\nconst generateRequest = require('../../generateRequest');\n\n/**\n * Constructor for a Jayson Browser Client that does not depend any node.js core libraries\n * @class ClientBrowser\n * @param {Function} callServer Method that calls the server, receives the stringified request and a regular node-style callback\n * @param {Object} [options]\n * @param {Function} [options.reviver] Reviver function for JSON\n * @param {Function} [options.replacer] Replacer function for JSON\n * @param {Number} [options.version=2] JSON-RPC version to use (1|2)\n * @param {Function} [options.generator] Function to use for generating request IDs\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @return {ClientBrowser}\n */\nconst ClientBrowser = function(callServer, options) {\n if(!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n\n if (!options) {\n options = {};\n }\n\n this.options = {\n reviver: typeof options.reviver !== 'undefined' ? options.reviver : null,\n replacer: typeof options.replacer !== 'undefined' ? options.replacer : null,\n generator: typeof options.generator !== 'undefined' ? options.generator : function() { return uuid(); },\n version: typeof options.version !== 'undefined' ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === 'boolean' ? options.notificationIdNull : false,\n };\n\n this.callServer = callServer;\n};\n\nmodule.exports = ClientBrowser;\n\n/**\n * Creates a request and dispatches it if given a callback.\n * @param {String|Array} method A batch request if passed an Array, or a method name if passed a String\n * @param {Array|Object} [params] Parameters for the method\n * @param {String|Number} [id] Optional id. If undefined an id will be generated. If null it creates a notification request\n * @param {Function} [callback] Request callback. If specified, executes the request rather than only returning it.\n * @throws {TypeError} Invalid parameters\n * @return {Object} JSON-RPC 1.0 or 2.0 compatible request\n */\nClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n\n // is this a batch request?\n const isBatch = Array.isArray(method) && typeof params === 'function';\n\n if (this.options.version === 1 && isBatch) {\n throw new TypeError('JSON-RPC 1.0 does not support batching');\n }\n\n // is this a raw request?\n const isRaw = !isBatch && method && typeof method === 'object' && typeof params === 'function';\n\n if(isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if(typeof id === 'function') {\n callback = id;\n // specifically undefined because \"null\" is a notification request\n id = undefined;\n }\n\n const hasCallback = typeof callback === 'function';\n\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull,\n });\n } catch(err) {\n if(hasCallback) {\n return callback(err);\n }\n throw err;\n }\n\n // no callback means we should just return a raw request\n if(!hasCallback) {\n return request;\n }\n\n }\n\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch(err) {\n return callback(err);\n }\n\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n\n // always return the raw request\n return request;\n};\n\n/**\n * Parses a response from a server\n * @param {Object} err Error to pass on that is unrelated to the actual response\n * @param {String} responseText JSON-RPC 1.0 or 2.0 response\n * @param {Function} callback Callback that will receive different arguments depending on the amount of parameters\n * @private\n */\nClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if(err) {\n callback(err);\n return;\n }\n\n if(!responseText) {\n // empty response text, assume that is correct because it could be a\n // notification which jayson does not give any body for\n return callback();\n }\n\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch(err) {\n return callback(err);\n }\n\n if(callback.length === 3) {\n // if callback length is 3, we split callback arguments on error and response\n\n // is batch response?\n if(Array.isArray(response)) {\n\n // neccesary to split strictly on validity according to spec here\n const isError = function(res) {\n return typeof res.error !== 'undefined';\n };\n\n const isNotError = function (res) {\n return !isError(res);\n };\n\n return callback(null, response.filter(isError), response.filter(isNotError));\n \n } else {\n\n // split regardless of validity\n return callback(null, response.error, response.result);\n \n }\n \n }\n\n callback(null, response);\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","export const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport default globalThis.fetch;\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) keys.push(key);\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * \"Client\" wraps \"ws\" or a browser-implemented \"WebSocket\" library\n * according to the environment providing JSON RPC 2.0 support on top.\n * @module Client\n */\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime/regenerator\"));\n\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime/helpers/asyncToGenerator\"));\n\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _eventemitter = require(\"eventemitter3\");\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}; // @ts-ignore\n\n\nvar CommonClient = /*#__PURE__*/function (_EventEmitter) {\n (0, _inherits2[\"default\"])(CommonClient, _EventEmitter);\n\n var _super = _createSuper(CommonClient);\n\n /**\n * Instantiate a Client class.\n * @constructor\n * @param {webSocketFactory} webSocketFactory - factory method for WebSocket\n * @param {String} address - url to a websocket server\n * @param {Object} options - ws options object with reconnect parameters\n * @param {Function} generate_request_id - custom generation request Id\n * @return {CommonClient}\n */\n function CommonClient(webSocketFactory) {\n var _this;\n\n var address = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"ws://localhost:8080\";\n\n var _a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var generate_request_id = arguments.length > 3 ? arguments[3] : undefined;\n (0, _classCallCheck2[\"default\"])(this, CommonClient);\n\n var _a$autoconnect = _a.autoconnect,\n autoconnect = _a$autoconnect === void 0 ? true : _a$autoconnect,\n _a$reconnect = _a.reconnect,\n reconnect = _a$reconnect === void 0 ? true : _a$reconnect,\n _a$reconnect_interval = _a.reconnect_interval,\n reconnect_interval = _a$reconnect_interval === void 0 ? 1000 : _a$reconnect_interval,\n _a$max_reconnects = _a.max_reconnects,\n max_reconnects = _a$max_reconnects === void 0 ? 5 : _a$max_reconnects,\n rest_options = __rest(_a, [\"autoconnect\", \"reconnect\", \"reconnect_interval\", \"max_reconnects\"]);\n\n _this = _super.call(this);\n _this.webSocketFactory = webSocketFactory;\n _this.queue = {};\n _this.rpc_id = 0;\n _this.address = address;\n _this.autoconnect = autoconnect;\n _this.ready = false;\n _this.reconnect = reconnect;\n _this.reconnect_timer_id = undefined;\n _this.reconnect_interval = reconnect_interval;\n _this.max_reconnects = max_reconnects;\n _this.rest_options = rest_options;\n _this.current_reconnects = 0;\n\n _this.generate_request_id = generate_request_id || function () {\n return ++_this.rpc_id;\n };\n\n if (_this.autoconnect) _this._connect(_this.address, Object.assign({\n autoconnect: _this.autoconnect,\n reconnect: _this.reconnect,\n reconnect_interval: _this.reconnect_interval,\n max_reconnects: _this.max_reconnects\n }, _this.rest_options));\n return _this;\n }\n /**\n * Connects to a defined server if not connected already.\n * @method\n * @return {Undefined}\n */\n\n\n (0, _createClass2[\"default\"])(CommonClient, [{\n key: \"connect\",\n value: function connect() {\n if (this.socket) return;\n\n this._connect(this.address, Object.assign({\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects\n }, this.rest_options));\n }\n /**\n * Calls a registered RPC method on server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object|Array} params - optional method parameters\n * @param {Number} timeout - RPC reply timeout value\n * @param {Object} ws_opts - options passed to ws\n * @return {Promise}\n */\n\n }, {\n key: \"call\",\n value: function call(method, params, timeout, ws_opts) {\n var _this2 = this;\n\n if (!ws_opts && \"object\" === (0, _typeof2[\"default\"])(timeout)) {\n ws_opts = timeout;\n timeout = null;\n }\n\n return new Promise(function (resolve, reject) {\n if (!_this2.ready) return reject(new Error(\"socket not ready\"));\n\n var rpc_id = _this2.generate_request_id(method, params);\n\n var message = {\n jsonrpc: \"2.0\",\n method: method,\n params: params || null,\n id: rpc_id\n };\n\n _this2.socket.send(JSON.stringify(message), ws_opts, function (error) {\n if (error) return reject(error);\n _this2.queue[rpc_id] = {\n promise: [resolve, reject]\n };\n\n if (timeout) {\n _this2.queue[rpc_id].timeout = setTimeout(function () {\n delete _this2.queue[rpc_id];\n reject(new Error(\"reply timeout\"));\n }, timeout);\n }\n });\n });\n }\n /**\n * Logins with the other side of the connection.\n * @method\n * @param {Object} params - Login credentials object\n * @return {Promise}\n */\n\n }, {\n key: \"login\",\n value: function () {\n var _login = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee(params) {\n var resp;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return this.call(\"rpc.login\", params);\n\n case 2:\n resp = _context.sent;\n\n if (resp) {\n _context.next = 5;\n break;\n }\n\n throw new Error(\"authentication failed\");\n\n case 5:\n return _context.abrupt(\"return\", resp);\n\n case 6:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function login(_x) {\n return _login.apply(this, arguments);\n }\n\n return login;\n }()\n /**\n * Fetches a list of client's methods registered on server.\n * @method\n * @return {Array}\n */\n\n }, {\n key: \"listMethods\",\n value: function () {\n var _listMethods = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2() {\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return this.call(\"__listMethods\");\n\n case 2:\n return _context2.abrupt(\"return\", _context2.sent);\n\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function listMethods() {\n return _listMethods.apply(this, arguments);\n }\n\n return listMethods;\n }()\n /**\n * Sends a JSON-RPC 2.0 notification to server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object} params - optional method parameters\n * @return {Promise}\n */\n\n }, {\n key: \"notify\",\n value: function notify(method, params) {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n if (!_this3.ready) return reject(new Error(\"socket not ready\"));\n var message = {\n jsonrpc: \"2.0\",\n method: method,\n params: params || null\n };\n\n _this3.socket.send(JSON.stringify(message), function (error) {\n if (error) return reject(error);\n resolve();\n });\n });\n }\n /**\n * Subscribes for a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"subscribe\",\n value: function () {\n var _subscribe = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee3(event) {\n var result;\n return _regenerator[\"default\"].wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n if (typeof event === \"string\") event = [event];\n _context3.next = 3;\n return this.call(\"rpc.on\", event);\n\n case 3:\n result = _context3.sent;\n\n if (!(typeof event === \"string\" && result[event] !== \"ok\")) {\n _context3.next = 6;\n break;\n }\n\n throw new Error(\"Failed subscribing to an event '\" + event + \"' with: \" + result[event]);\n\n case 6:\n return _context3.abrupt(\"return\", result);\n\n case 7:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function subscribe(_x2) {\n return _subscribe.apply(this, arguments);\n }\n\n return subscribe;\n }()\n /**\n * Unsubscribes from a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"unsubscribe\",\n value: function () {\n var _unsubscribe = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee4(event) {\n var result;\n return _regenerator[\"default\"].wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n if (typeof event === \"string\") event = [event];\n _context4.next = 3;\n return this.call(\"rpc.off\", event);\n\n case 3:\n result = _context4.sent;\n\n if (!(typeof event === \"string\" && result[event] !== \"ok\")) {\n _context4.next = 6;\n break;\n }\n\n throw new Error(\"Failed unsubscribing from an event with: \" + result);\n\n case 6:\n return _context4.abrupt(\"return\", result);\n\n case 7:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function unsubscribe(_x3) {\n return _unsubscribe.apply(this, arguments);\n }\n\n return unsubscribe;\n }()\n /**\n * Closes a WebSocket connection gracefully.\n * @method\n * @param {Number} code - socket close code\n * @param {String} data - optional data to be sent before closing\n * @return {Undefined}\n */\n\n }, {\n key: \"close\",\n value: function close(code, data) {\n this.socket.close(code || 1000, data);\n }\n /**\n * Connection/Message handler.\n * @method\n * @private\n * @param {String} address - WebSocket API address\n * @param {Object} options - ws options object\n * @return {Undefined}\n */\n\n }, {\n key: \"_connect\",\n value: function _connect(address, options) {\n var _this4 = this;\n\n clearTimeout(this.reconnect_timer_id);\n this.socket = this.webSocketFactory(address, options);\n this.socket.addEventListener(\"open\", function () {\n _this4.ready = true;\n\n _this4.emit(\"open\");\n\n _this4.current_reconnects = 0;\n });\n this.socket.addEventListener(\"message\", function (_ref) {\n var message = _ref.data;\n if (message instanceof ArrayBuffer) message = Buffer.from(message).toString();\n\n try {\n message = JSON.parse(message);\n } catch (error) {\n return;\n } // check if any listeners are attached and forward event\n\n\n if (message.notification && _this4.listeners(message.notification).length) {\n if (!Object.keys(message.params).length) return _this4.emit(message.notification);\n var args = [message.notification];\n if (message.params.constructor === Object) args.push(message.params);else // using for-loop instead of unshift/spread because performance is better\n for (var i = 0; i < message.params.length; i++) {\n args.push(message.params[i]);\n } // run as microtask so that pending queue messages are resolved first\n // eslint-disable-next-line prefer-spread\n\n return Promise.resolve().then(function () {\n _this4.emit.apply(_this4, args);\n });\n }\n\n if (!_this4.queue[message.id]) {\n // general JSON RPC 2.0 events\n if (message.method && message.params) {\n // run as microtask so that pending queue messages are resolved first\n return Promise.resolve().then(function () {\n _this4.emit(message.method, message.params);\n });\n }\n\n return;\n } // reject early since server's response is invalid\n\n\n if (\"error\" in message === \"result\" in message) _this4.queue[message.id].promise[1](new Error(\"Server response malformed. Response must include either \\\"result\\\"\" + \" or \\\"error\\\", but not both.\"));\n if (_this4.queue[message.id].timeout) clearTimeout(_this4.queue[message.id].timeout);\n if (message.error) _this4.queue[message.id].promise[1](message.error);else _this4.queue[message.id].promise[0](message.result);\n delete _this4.queue[message.id];\n });\n this.socket.addEventListener(\"error\", function (error) {\n return _this4.emit(\"error\", error);\n });\n this.socket.addEventListener(\"close\", function (_ref2) {\n var code = _ref2.code,\n reason = _ref2.reason;\n if (_this4.ready) // Delay close event until internal state is updated\n setTimeout(function () {\n return _this4.emit(\"close\", code, reason);\n }, 0);\n _this4.ready = false;\n _this4.socket = undefined;\n if (code === 1000) return;\n _this4.current_reconnects++;\n if (_this4.reconnect && (_this4.max_reconnects > _this4.current_reconnects || _this4.max_reconnects === 0)) _this4.reconnect_timer_id = setTimeout(function () {\n return _this4._connect(address, options);\n }, _this4.reconnect_interval);\n });\n }\n }]);\n return CommonClient;\n}(_eventemitter.EventEmitter);\n\nexports[\"default\"] = CommonClient;","/**\n * WebSocket implements a browser-side WebSocket specification.\n * @module Client\n */\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = _default;\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _eventemitter = require(\"eventemitter3\");\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar WebSocketBrowserImpl = /*#__PURE__*/function (_EventEmitter) {\n (0, _inherits2[\"default\"])(WebSocketBrowserImpl, _EventEmitter);\n\n var _super = _createSuper(WebSocketBrowserImpl);\n\n /** Instantiate a WebSocket class\n * @constructor\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @param {(String|Array)} protocols - a list of protocols\n * @return {WebSocketBrowserImpl} - returns a WebSocket instance\n */\n function WebSocketBrowserImpl(address, options, protocols) {\n var _this;\n\n (0, _classCallCheck2[\"default\"])(this, WebSocketBrowserImpl);\n _this = _super.call(this);\n _this.socket = new window.WebSocket(address, protocols);\n\n _this.socket.onopen = function () {\n return _this.emit(\"open\");\n };\n\n _this.socket.onmessage = function (event) {\n return _this.emit(\"message\", event.data);\n };\n\n _this.socket.onerror = function (error) {\n return _this.emit(\"error\", error);\n };\n\n _this.socket.onclose = function (event) {\n _this.emit(\"close\", event.code, event.reason);\n };\n\n return _this;\n }\n /**\n * Sends data through a websocket connection\n * @method\n * @param {(String|Object)} data - data to be sent via websocket\n * @param {Object} optionsOrCallback - ws options\n * @param {Function} callback - a callback called once the data is sent\n * @return {Undefined}\n */\n\n\n (0, _createClass2[\"default\"])(WebSocketBrowserImpl, [{\n key: \"send\",\n value: function send(data, optionsOrCallback, callback) {\n var cb = callback || optionsOrCallback;\n\n try {\n this.socket.send(data);\n cb();\n } catch (error) {\n cb(error);\n }\n }\n /**\n * Closes an underlying socket\n * @method\n * @param {Number} code - status code explaining why the connection is being closed\n * @param {String} reason - a description why the connection is closing\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"close\",\n value: function close(code, reason) {\n this.socket.close(code, reason);\n }\n }, {\n key: \"addEventListener\",\n value: function addEventListener(type, listener, options) {\n this.socket.addEventListener(type, listener, options);\n }\n }]);\n return WebSocketBrowserImpl;\n}(_eventemitter.EventEmitter);\n/**\n * factory method for common WebSocket instance\n * @method\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @return {Undefined}\n */\n\n\nfunction _default(address, options) {\n return new WebSocketBrowserImpl(address, options);\n}","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","const U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nexport function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nexport function split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nexport const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (h, l) => l;\nconst rotr32L = (h, l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\n// Removing \"export\" has 5% perf penalty -_-\nexport function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import assert from './_assert.js';\nimport u64 from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, } from './utils.js';\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _7n = BigInt(7);\nconst _256n = BigInt(256);\nconst _0x71n = BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = u64.split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => s > 32 ? u64.rotlBH(h, l, s) : u64.rotlSH(h, l, s);\nconst rotlL = (h, l, s) => s > 32 ? u64.rotlBL(h, l, s) : u64.rotlSL(h, l, s);\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n assert.number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n assert.exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n assert.exists(this, false);\n assert.bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n assert.number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n assert.output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = gen(0x06, 136, 256 / 8);\nexport const sha3_384 = gen(0x06, 104, 384 / 8);\nexport const sha3_512 = gen(0x06, 72, 512 / 8);\nexport const keccak_224 = gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = gen(0x01, 136, 256 / 8);\nexport const keccak_384 = gen(0x01, 104, 384 / 8);\nexport const keccak_512 = gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = genShake(0x1f, 168, 128 / 8);\nexport const shake256 = genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = wrapConstructor(() => new SHA256());\nexport const sha224 = wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error('ui8a expected');\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((c, point, isCompressed) => {\n const a = point.toAffine();\n return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n // Zero is valid point too!\n if (this.is0()) {\n if (CURVE.allowInfinityPoint)\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, _3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, _3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === _0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === _1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return mod.mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return mod.invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n const isYOdd = (y & _1n) === _1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size (nBitLength+64)\n * as per FIPS 186 B.4.1 with modulo bias being neglible.\n */\n randomPrivateKey: () => {\n const rand = CURVE.randomBytes(Fp.BYTES + 8);\n const num = mod.hashToPrivateScalar(rand, CURVE_ORDER);\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(ensureBytes('extraEntropy', e, Fp.BYTES)); // check for being of size BYTES\n }\n const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === _0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === _0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash (not message: you need to hash it by yourself).\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param opts `lowS, extraEntropy, prehash`\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const drbg = ut.createHmacDrbg(CURVE.hash.outputLen, CURVE.nByteLength, CURVE.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes('msgHash', msgHash);\n publicKey = ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || sg instanceof Uint8Array) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n// Implementation of the Shallue and van de Woestijne method for any Weierstrass curve\n// TODO: check if there is a way to merge this with uvRatio in Edwards && move to modular?\n// b = True and y = sqrt(u / v) if (u / v) is square in F, and\n// b = False and y = sqrt(Z * (u / v)) otherwise.\nexport function SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = _0n;\n for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n l += _1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n const c2 = (q - _1n) / _2n ** c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n ** c1 - _1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n ** (c1 - _1n); // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > _1n; i--) {\n let tv5 = _2n ** (i - _2n); // 18. tv5 = i - 2; 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n === _3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n// From draft-irtf-cfrg-hash-to-curve-16\nexport function mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map","import assert from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nclass HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assert.hash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new TypeError('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assert.exists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.bytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n return {\n hash,\n hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n randomBytes,\n };\n}\nexport function createCurve(curveDef, defHash) {\n const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport * as htf from './abstract/hash-to-curve.js';\nimport { createCurve } from './_shortw_utils.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N,\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = {\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n};\nconst isoMap = htf.isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j))));\nconst mapSWU = mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n});\nexport const { hashToCurve, encodeToCurve } = htf.createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n});\n//# sourceMappingURL=secp256k1.js.map","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH));\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n const isSigner = byteArray.slice(0, 1)[0] === 1;\n byteArray = byteArray.slice(1);\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["i","require$$0","ieee754","require$$1","number","bool","bytes","hash","exists","output","assert","crypto","createView","rotr","isLE","utf8ToBytes","toBytes","concatBytes","wrapConstructor","setBigUint64","Hash","U32_MASK64","_32n","fromBig","split","toBig","shrSH","shrSL","rotrSH","rotrSL","rotrBH","rotrBL","rotr32H","rotr32L","rotlSH","rotlSL","rotlBH","rotlBL","add","add3L","add3H","add4L","add4H","add5L","add5H","u64","SHA2","_0n","_1n","_2n","u8a","_3n","_4n","_5n","_8n","validateOpts","ut.validateObject","ut.bytesToNumberLE","ut.numberToBytesLE","ut.bytesToHex","ut.concatBytes","Fp","htf.createHasher","generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","this","u32","Chi","Maj","SHA256_K","IV","SHA256_W","SHA256","sha256","SHA224","TextDecoder","TextEncoder","require$$2","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","Layout_1","Boolean","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","rustString","rsl","_decode","bind","_encode","rslShim","offset","str","chars","span","authorized","lockup","voteInit","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","Message","args","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","byteArray","accountCount","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","splice","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","_len","items","_key","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","browser","encodeDecode","bigInt","blob","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","validate","uuid","generateRequest","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","fetchWithMiddleware","info","init","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ut.bytesToNumberBE","mod.mod","mod.invert","ut.numberToBytesBE","ut.hexToBytes","mod.hashToPrivateScalar","ut.bitMask","ut.createHmacDrbg","mod.validateField","htf.isogenyMap","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA,OAAA7a,QAAA,CAAAG,MAAA,CAAA,QAAA,EAGI+C,SAAS,CAAA,CAAA;EAAA,QAAA,KAAA,EAAA,CAAA;EAAA,QAAA,KAAA,KAAA;YAAA,OAAAlD,QAAA,CAAAI,IAAA,EAAA,CAAA;EAAA,OAAA;EAAA,KAAA,EAAAX,OAAA,CAAA,CAAA;KACjB,CAAA,CAAA,CAAA;EAAA,EAAA,OAAAw+D,6BAAA,CAAAx9D,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;EAAA;;ECjFD;EACA;EACA;AACO,MAAM29D,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18,19,20,21,22,23,24,25,26,27,32,53,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,105,106,107,108,109,110,111]} -\ No newline at end of file -+{"version":3,"file":"index.iife.js","sources":["../../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js","../../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js","../../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/utils.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_sha2.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_u64.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/sha512.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/edwards.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/montgomery.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/hash-to-curve.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/ed25519.js","../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js","../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js","../../../node_modules/.pnpm/base-x@3.0.9/node_modules/base-x/src/index.js","../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/utils.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.js","../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js","../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../../../node_modules/.pnpm/@solana+buffer-layout@4.0.0/node_modules/@solana/buffer-layout/lib/Layout.js","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/utils/guarded-array-utils.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../../../node_modules/.pnpm/bigint-buffer@1.1.5/node_modules/bigint-buffer/dist/browser.js","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../../../node_modules/.pnpm/superstruct@0.14.2/node_modules/superstruct/lib/index.es.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js","../../../node_modules/.pnpm/jayson@4.1.0/node_modules/jayson/lib/generateRequest.js","../../../node_modules/.pnpm/jayson@4.1.0/node_modules/jayson/lib/client/browser/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/__forks__/browser/fetch-impl.ts","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/typeof.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/regeneratorRuntime.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/regenerator/index.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/asyncToGenerator.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/classCallCheck.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/toPrimitive.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/toPropertyKey.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/createClass.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/setPrototypeOf.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/inherits.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/assertThisInitialized.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/getPrototypeOf.js","../../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js","../../../node_modules/.pnpm/rpc-websockets@7.5.1/node_modules/rpc-websockets/dist/lib/client.js","../../../node_modules/.pnpm/rpc-websockets@7.5.1/node_modules/rpc-websockets/dist/lib/client/websocket.browser.js","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_u64.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/sha3.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/sha256.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/secp256k1.js","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new TypeError('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new TypeError(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map","export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use `globalThis.crypto`, but node.js versions earlier than v19 don't\n// declare it in global scope. For node.js, package.json#exports field mapping\n// rewrites import from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xde, 0xad, 0xbe, 0xef])) // 'deadbeef'\n */\nexport function bytesToHex(uint8a) {\n // pre-caching improves the speed 6x\n if (!(uint8a instanceof Uint8Array))\n throw new Error('Uint8Array expected');\n let hex = '';\n for (let i = 0; i < uint8a.length; i++) {\n hex += hexes[uint8a[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('deadbeef') // Uint8Array.from([0xde, 0xad, 0xbe, 0xef])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string') {\n throw new TypeError('hexToBytes: expected string, got ' + typeof hex);\n }\n if (hex.length % 2)\n throw new Error('hexToBytes: received invalid unpadded hex');\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string') {\n throw new TypeError(`utf8ToBytes expected string, got ${typeof str}`);\n }\n return new TextEncoder().encode(str);\n}\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!(data instanceof Uint8Array))\n throw new TypeError(`Expected input type is Uint8Array (got ${typeof data})`);\n return data;\n}\n/**\n * Concats Uint8Array-s into one; like `Buffer.concat([buf1, buf2])`\n * @example concatBytes(buf1, buf2)\n */\nexport function concatBytes(...arrays) {\n if (!arrays.every((a) => a instanceof Uint8Array))\n throw new Error('Uint8Array list expected');\n if (arrays.length === 1)\n return arrays[0];\n const length = arrays.reduce((a, arr) => a + arr.length, 0);\n const result = new Uint8Array(length);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const arr = arrays[i];\n result.set(arr, pad);\n pad += arr.length;\n }\n return result;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))\n throw new TypeError('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashConstructor) {\n const hashC = (message) => hashConstructor().update(toBytes(message)).digest();\n const tmp = hashConstructor();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashConstructor();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `globalThis.crypto` or node.js crypto module.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import assert from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n assert.exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map","const U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nexport function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nexport function split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nexport const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (h, l) => l;\nconst rotr32L = (h, l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\n// Removing \"export\" has 5% perf penalty -_-\nexport function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import { SHA2 } from './_sha2.js';\nimport u64 from './_u64.js';\nimport { wrapConstructor } from './utils.js';\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n)));\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = new Uint32Array(80);\nconst SHA512_W_L = new Uint32Array(80);\nexport class SHA512 extends SHA2 {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x1f83d9ab | 0;\n this.Gl = 0xfb41bd6b | 0;\n this.Hh = 0x5be0cd19 | 0;\n this.Hl = 0x137e2179 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H.fill(0);\n SHA512_W_L.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\nclass SHA512_224 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x8c3d37c8 | 0;\n this.Al = 0x19544da2 | 0;\n this.Bh = 0x73e19966 | 0;\n this.Bl = 0x89dcd4d6 | 0;\n this.Ch = 0x1dfab7ae | 0;\n this.Cl = 0x32ff9c82 | 0;\n this.Dh = 0x679dd514 | 0;\n this.Dl = 0x582f9fcf | 0;\n this.Eh = 0x0f6d2b69 | 0;\n this.El = 0x7bd44da8 | 0;\n this.Fh = 0x77e36f73 | 0;\n this.Fl = 0x04c48942 | 0;\n this.Gh = 0x3f9d85a8 | 0;\n this.Gl = 0x6a1d36c8 | 0;\n this.Hh = 0x1112e6ad | 0;\n this.Hl = 0x91d692a1 | 0;\n this.outputLen = 28;\n }\n}\nclass SHA512_256 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x22312194 | 0;\n this.Al = 0xfc2bf72c | 0;\n this.Bh = 0x9f555fa3 | 0;\n this.Bl = 0xc84c64c2 | 0;\n this.Ch = 0x2393b86b | 0;\n this.Cl = 0x6f53b151 | 0;\n this.Dh = 0x96387719 | 0;\n this.Dl = 0x5940eabd | 0;\n this.Eh = 0x96283ee2 | 0;\n this.El = 0xa88effe3 | 0;\n this.Fh = 0xbe5e1e25 | 0;\n this.Fl = 0x53863992 | 0;\n this.Gh = 0x2b0199fc | 0;\n this.Gl = 0x2c85b8aa | 0;\n this.Hh = 0x0eb72ddc | 0;\n this.Hl = 0x81c52ca2 | 0;\n this.outputLen = 32;\n }\n}\nclass SHA384 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0xcbbb9d5d | 0;\n this.Al = 0xc1059ed8 | 0;\n this.Bh = 0x629a292a | 0;\n this.Bl = 0x367cd507 | 0;\n this.Ch = 0x9159015a | 0;\n this.Cl = 0x3070dd17 | 0;\n this.Dh = 0x152fecd8 | 0;\n this.Dl = 0xf70e5939 | 0;\n this.Eh = 0x67332667 | 0;\n this.El = 0xffc00b31 | 0;\n this.Fh = 0x8eb44a87 | 0;\n this.Fl = 0x68581511 | 0;\n this.Gh = 0xdb0c2e0d | 0;\n this.Gl = 0x64f98fa7 | 0;\n this.Hh = 0x47b5481d | 0;\n this.Hl = 0xbefa4fa4 | 0;\n this.outputLen = 48;\n }\n}\nexport const sha512 = wrapConstructor(() => new SHA512());\nexport const sha512_224 = wrapConstructor(() => new SHA512_224());\nexport const sha512_256 = wrapConstructor(() => new SHA512_256());\nexport const sha384 = wrapConstructor(() => new SHA384());\n//# sourceMappingURL=sha512.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst u8a = (a) => a instanceof Uint8Array;\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // Big Endian\n return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n// Caching slows it down 2-3x\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n if (hex.length % 2)\n throw new Error('hex string is invalid: unpadded ' + hex.length);\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// Big Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport const numberToBytesBE = (n, len) => hexToBytes(n.toString(16).padStart(len * 2, '0'));\nexport const numberToBytesLE = (n, len) => numberToBytesBE(n, len).reverse();\n// Returns variable number bytes (minimal bigint encoding?)\nexport const numberToVarBytesBE = (n) => hexToBytes(numberToHexUnpadded(n));\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n }\n }\n else if (u8a(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(`${title} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n return res;\n}\n// Copies several Uint8Arrays into one.\nexport function concatBytes(...arrs) {\n const r = new Uint8Array(arrs.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrs.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\nexport function equalBytes(b1, b2) {\n // We don't care about timing attacks here\n if (b1.length !== b2.length)\n return false;\n for (let i = 0; i < b1.length; i++)\n if (b1[i] !== b2[i])\n return false;\n return true;\n}\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string') {\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n }\n return new TextEncoder().encode(str);\n}\n// Bit operations\n// Amount of bits inside bigint (Same as n.toString(2).length)\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n// Gets single bit at position. NOTE: first bit position is 0 (same as arrays)\n// Same as !!+Array.from(n.toString(2)).reverse()[pos]\nexport const bitGet = (n, pos) => (n >> BigInt(pos)) & _1n;\n// Sets single bit at position\nexport const bitSet = (n, pos, value) => n | ((value ? _1n : _0n) << BigInt(pos));\n// Return mask for N bits (Same as BigInt(`0b${Array(i).fill('1').join('')}`))\n// Not using ** operator with bigints for old engines.\nexport const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n()) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\nimport { bitMask, numberToBytesBE, numberToBytesLE, bytesToNumberBE, bytesToNumberLE, ensureBytes, validateObject, } from './utils.js';\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently exponentiate num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * powMod(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nexport function pow(num, power, modulo) {\n if (modulo <= _0n || power < _0n)\n throw new Error('Expected power/modulo > 0');\n if (modulo === _1n)\n return _0n;\n let res = _1n;\n while (power > _0n) {\n if (power & _1n)\n res = (res * num) % modulo;\n num = (num * num) % modulo;\n power >>= _1n;\n }\n return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nexport function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= modulo;\n }\n return res;\n}\n// Inverses number over modulo\nexport function invert(number, modulo) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n // Eucledian GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n let a = mod(number, modulo);\n let b = modulo;\n // prettier-ignore\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n // JIT applies optimization if those two lines follow each other\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n // prettier-ignore\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\n// Tonelli-Shanks algorithm\n// Paper 1: https://eprint.iacr.org/2012/685.pdf (page 12)\n// Paper 2: Square Roots from 1; 24, 51, 10 to Dan Shanks\nexport function tonelliShanks(P) {\n // Legendre constant: used to calculate Legendre symbol (a | p),\n // which denotes the value of a^((p-1)/2) (mod p).\n // (a | p) ≡ 1 if a is a square (mod p)\n // (a | p) ≡ -1 if a is not a square (mod p)\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreC = (P - _1n) / _2n;\n let Q, S, Z;\n // Step 1: By factoring out powers of 2 from p - 1,\n // find q and s such that p - 1 = q*(2^s) with q odd\n for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++)\n ;\n // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++)\n ;\n // Fast-path\n if (S === 1) {\n const p1div4 = (P + _1n) / _4n;\n return function tonelliFast(Fp, n) {\n const root = Fp.pow(n, p1div4);\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Slow-path\n const Q1div2 = (Q + _1n) / _2n;\n return function tonelliSlow(Fp, n) {\n // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n throw new Error('Cannot find square root');\n let r = S;\n // TODO: will fail at Fp2/etc\n let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n let x = Fp.pow(n, Q1div2); // first guess at the square root\n let b = Fp.pow(n, Q); // first guess at the fudge factor\n while (!Fp.eql(b, Fp.ONE)) {\n if (Fp.eql(b, Fp.ZERO))\n return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n // Find m such b^(2^m)==1\n let m = 1;\n for (let t2 = Fp.sqr(b); m < r; m++) {\n if (Fp.eql(t2, Fp.ONE))\n break;\n t2 = Fp.sqr(t2); // t2 *= t2\n }\n // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n const ge = Fp.pow(g, _1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n g = Fp.sqr(ge); // g = ge * ge\n x = Fp.mul(x, ge); // x *= ge\n b = Fp.mul(b, g); // b *= g\n r = m;\n }\n return x;\n };\n}\nexport function FpSqrt(P) {\n // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n // P ≡ 3 (mod 4)\n // √n = n^((P+1)/4)\n if (P % _4n === _3n) {\n // Not all roots possible!\n // const ORDER =\n // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n // const NUM = 72057594037927816n;\n const p1div4 = (P + _1n) / _4n;\n return function sqrt3mod4(Fp, n) {\n const root = Fp.pow(n, p1div4);\n // Throw if root**2 != n\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n if (P % _8n === _5n) {\n const c1 = (P - _5n) / _8n;\n return function sqrt5mod8(Fp, n) {\n const n2 = Fp.mul(n, _2n);\n const v = Fp.pow(n2, c1);\n const nv = Fp.mul(n, v);\n const i = Fp.mul(Fp.mul(nv, _2n), v);\n const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // P ≡ 9 (mod 16)\n if (P % _16n === _9n) {\n // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n // Means we cannot use sqrt for constants at all!\n //\n // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n // const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n // const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n // const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic\n // sqrt = (x) => {\n // let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4\n // let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1\n // const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1\n // let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1\n // const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x\n // const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x\n // tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x\n // tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x\n // const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x\n // return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2\n // }\n }\n // Other cases: Tonelli-Shanks algorithm\n return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n 'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n 'eql', 'add', 'sub', 'mul', 'pow', 'div',\n 'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n const initial = {\n ORDER: 'bigint',\n MASK: 'bigint',\n BYTES: 'isSafeInteger',\n BITS: 'isSafeInteger',\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = 'function';\n return map;\n }, initial);\n return validateObject(field, opts);\n}\n// Generic field functions\nexport function FpPow(f, num, power) {\n // Should have same speed as pow for bigints\n // TODO: benchmark!\n if (power < _0n)\n throw new Error('Expected power > 0');\n if (power === _0n)\n return f.ONE;\n if (power === _1n)\n return num;\n let p = f.ONE;\n let d = num;\n while (power > _0n) {\n if (power & _1n)\n p = f.mul(p, d);\n d = f.sqr(d);\n power >>= _1n;\n }\n return p;\n}\n// 0 is non-invertible: non-batched version will throw on 0\nexport function FpInvertBatch(f, nums) {\n const tmp = new Array(nums.length);\n // Walk from first to last, multiply them by each other MOD p\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = acc;\n return f.mul(acc, num);\n }, f.ONE);\n // Invert last element\n const inverted = f.inv(lastMultiplied);\n // Walk from last to first, multiply them by inverted each other MOD p\n nums.reduceRight((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = f.mul(acc, tmp[i]);\n return f.mul(acc, num);\n }, inverted);\n return tmp;\n}\nexport function FpDiv(f, lhs, rhs) {\n return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n const legendreConst = (f.ORDER - _1n) / _2n; // Integer arithmetic\n return (x) => {\n const p = f.pow(x, legendreConst);\n return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n };\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n // Bit size, byte size of CURVE.n\n const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a galois field over prime. Non-primes are not supported for now.\n * Do not init in loop: slow. Very fragile: always run a benchmark on change.\n * Major performance gains:\n * a) non-normalized operations like mulN instead of mul\n * b) `Object.freeze`\n * c) Same object shape: never add or remove keys\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLen, isLE = false, redef = {}) {\n if (ORDER <= _0n)\n throw new Error(`Expected Fp ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('Field lengths over 2048 bytes are not supported');\n const sqrtP = FpSqrt(ORDER);\n const f = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n,\n ONE: _1n,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== 'bigint')\n throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n },\n is0: (num) => num === _0n,\n isOdd: (num) => (num & _1n) === _1n,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n invertBatch: (lst) => FpInvertBatch(f, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a, b, c) => (c ? b : a),\n toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n });\n return Object.freeze(f);\n}\nexport function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * FIPS 186 B.4.1-compliant \"constant-time\" private key generation utility.\n * Can take (n+8) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being neglible.\n * Needs at least 40 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * @param hash hash output from SHA3 or a similar function\n * @returns valid private scalar\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n hash = ensureBytes('privateHash', hash);\n const hashLen = hash.length;\n const minLen = nLength(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n return mod(num, groupOrder - _1n) + _1n;\n}\n//# sourceMappingURL=modular.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nexport function wNAF(c, bits) {\n const constTimeNegate = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1; // +1, because\n const windowSize = 2 ** (W - 1); // -1 because we skip zero\n return { windows, windowSize };\n };\n return {\n constTimeNegate,\n // non-const time multiplication ladder\n unsafeLadder(elm, n) {\n let p = c.ZERO;\n let d = elm;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p = elm;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n // =1, because we skip zero\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n // But need to carefully remove other checks before wNAF. ORDER == bits here\n const { windows, windowSize } = opts(W);\n let p = c.ZERO;\n let f = c.BASE;\n const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n // Extract W bits.\n let wbits = Number(n & mask);\n // Shift number by W bits.\n n >>= shiftBy;\n // If the bits are bigger than max size, we'll split those.\n // +224 => 256 - 32\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n // there is negate now: it is possible that negated element from low value\n // would be the same as high element, which will create carry into next window.\n // It's not obvious how this can fail, but still worth investigating later.\n // Check if we're onto Zero point.\n // Add random point inside current window to f.\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n // The most important part for const-time getPublicKey\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n // Even if the variable is still unused, there are some checks which will\n // throw an exception, so compiler needs to prove they won't happen, which is hard.\n // At this point there is a way to F be infinity-point even if p is not,\n // which makes it less const-time: around 1 bigint multiply.\n return { p, f };\n },\n wNAFCached(P, precomputesMap, n, transform) {\n // @ts-ignore\n const W = P._WINDOW_SIZE || 1;\n // Calculate precomputes on a first run, reuse them after\n let comp = precomputesMap.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1) {\n precomputesMap.set(P, transform(comp));\n }\n }\n return this.wNAF(W, comp, n);\n },\n };\n}\nexport function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: 'bigint',\n h: 'bigint',\n Gx: 'field',\n Gy: 'field',\n }, {\n nBitLength: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n });\n // Set defaults\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER },\n });\n}\n//# sourceMappingURL=curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y²\nimport { mod } from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _8n = BigInt(8);\n// verification rule is either zip215 or rfc8032 / nist186-5. Consult fromHex:\nconst VERIFY_DEFAULT = { zip215: true };\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(curve, {\n hash: 'function',\n a: 'bigint',\n d: 'bigint',\n randomBytes: 'function',\n }, {\n adjustScalarBytes: 'function',\n domain: 'function',\n uvRatio: 'function',\n mapToCurve: 'function',\n });\n // Set defaults\n return Object.freeze({ ...opts });\n}\n// It is not generic twisted curve for now, but ed25519/ed448 generic implementation\nexport function twistedEdwards(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, prehash: prehash, hash: cHash, randomBytes, nByteLength, h: cofactor, } = CURVE;\n const MASK = _2n ** BigInt(nByteLength * 8);\n const modP = Fp.create; // Function overrides\n // sqrt(u/v)\n const uvRatio = CURVE.uvRatio ||\n ((u, v) => {\n try {\n return { isValid: true, value: Fp.sqrt(u * Fp.inv(v)) };\n }\n catch (e) {\n return { isValid: false, value: _0n };\n }\n });\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes); // NOOP\n const domain = CURVE.domain ||\n ((data, ctx, phflag) => {\n if (ctx.length || phflag)\n throw new Error('Contexts/pre-hash are not supported');\n return data;\n }); // NOOP\n const inBig = (n) => typeof n === 'bigint' && _0n < n; // n in [1..]\n const inRange = (n, max) => inBig(n) && inBig(max) && n < max; // n in [1..max-1]\n const in0MaskRange = (n) => n === _0n || inRange(n, MASK); // n in [0..MASK-1]\n function assertInRange(n, max) {\n // n in [1..max-1]\n if (inRange(n, max))\n return n;\n throw new Error(`Expected valid scalar < ${max}, got ${typeof n} ${n}`);\n }\n function assertGE0(n) {\n // n in [0..CURVE_ORDER-1]\n return n === _0n ? n : assertInRange(n, CURVE_ORDER); // GE = prime subgroup, not full group\n }\n const pointPrecomputes = new Map();\n function isPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ExtendedPoint expected');\n }\n // Extended Point works in extended coordinates: (x, y, z, t) ∋ (x=x/z, y=y/z, t=xy).\n // https://en.wikipedia.org/wiki/Twisted_Edwards_curve#Extended_coordinates\n class Point {\n constructor(ex, ey, ez, et) {\n this.ex = ex;\n this.ey = ey;\n this.ez = ez;\n this.et = et;\n if (!in0MaskRange(ex))\n throw new Error('x required');\n if (!in0MaskRange(ey))\n throw new Error('y required');\n if (!in0MaskRange(ez))\n throw new Error('z required');\n if (!in0MaskRange(et))\n throw new Error('t required');\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error('extended point not allowed');\n const { x, y } = p || {};\n if (!in0MaskRange(x) || !in0MaskRange(y))\n throw new Error('invalid affine point');\n return new Point(x, y, _1n, modP(x * y));\n }\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.ez));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // Not required for fromHex(), which always creates valid points.\n // Could be useful for fromAffine().\n assertValidity() {\n const { a, d } = CURVE;\n if (this.is0())\n throw new Error('bad point: ZERO'); // TODO: optimize, with vars below?\n // Equation in affine coordinates: ax² + y² = 1 + dx²y²\n // Equation in projective coordinates (X/Z, Y/Z, Z): (aX² + Y²)Z² = Z⁴ + dX²Y²\n const { ex: X, ey: Y, ez: Z, et: T } = this;\n const X2 = modP(X * X); // X²\n const Y2 = modP(Y * Y); // Y²\n const Z2 = modP(Z * Z); // Z²\n const Z4 = modP(Z2 * Z2); // Z⁴\n const aX2 = modP(X2 * a); // aX²\n const left = modP(Z2 * modP(aX2 + Y2)); // (aX² + Y²)Z²\n const right = modP(Z4 + modP(d * modP(X2 * Y2))); // Z⁴ + dX²Y²\n if (left !== right)\n throw new Error('bad point: equation left != right (1)');\n // In Extended coordinates we also have T, which is x*y=T/Z: check X*Y == Z*T\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error('bad point: equation left != right (2)');\n }\n // Compare one point to another.\n equals(other) {\n isPoint(other);\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const { ex: X2, ey: Y2, ez: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n // Flips point sign to a negative one (-x, y in affine coords)\n return new Point(modP(-this.ex), this.ey, this.ez, modP(-this.et));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const A = modP(X1 * X1); // A = X12\n const B = modP(Y1 * Y1); // B = Y12\n const C = modP(_2n * modP(Z1 * Z1)); // C = 2*Z12\n const D = modP(a * A); // D = a*A\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B); // E = (X1+Y1)2-A-B\n const G = D + B; // G = D+B\n const F = G - C; // F = G-C\n const H = D - B; // H = D-B\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n isPoint(other);\n const { a, d } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1, et: T1 } = this;\n const { ex: X2, ey: Y2, ez: Z2, et: T2 } = other;\n // Faster algo for adding 2 Extended Points when curve's a=-1.\n // http://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html#addition-add-2008-hwcd-4\n // Cost: 8M + 8add + 2*2.\n // Note: It does not check whether the `other` point is valid.\n if (a === BigInt(-1)) {\n const A = modP((Y1 - X1) * (Y2 + X2));\n const B = modP((Y1 + X1) * (Y2 - X2));\n const F = modP(B - A);\n if (F === _0n)\n return this.double(); // Same point. Tests say it doesn't affect timing\n const C = modP(Z1 * _2n * T2);\n const D = modP(T1 * _2n * Z2);\n const E = D + C;\n const G = B + A;\n const H = D - C;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n const A = modP(X1 * X2); // A = X1*X2\n const B = modP(Y1 * Y2); // B = Y1*Y2\n const C = modP(T1 * d * T2); // C = T1*d*T2\n const D = modP(Z1 * Z2); // D = Z1*Z2\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B); // E = (X1+Y1)*(X2+Y2)-A-B\n const F = D - C; // F = D-C\n const G = D + C; // G = D+C\n const H = modP(B - a * A); // H = B-a*A\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, Point.normalizeZ);\n }\n // Constant-time multiplication.\n multiply(scalar) {\n const { p, f } = this.wNAF(assertInRange(scalar, CURVE_ORDER));\n return Point.normalizeZ([p, f])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n multiplyUnsafe(scalar) {\n let n = assertGE0(scalar); // 0 <= scalar < CURVE.n\n if (n === _0n)\n return I;\n if (this.equals(I) || n === _1n)\n return this;\n if (this.equals(G))\n return this.wNAF(n).p;\n return wnaf.unsafeLadder(this, n);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafeLadder(this, CURVE_ORDER).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(iz) {\n const { ex: x, ey: y, ez: z } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? _8n : Fp.inv(z); // 8 was chosen arbitrarily\n const ax = modP(x * iz);\n const ay = modP(y * iz);\n const zz = modP(z * iz);\n if (is0)\n return { x: _0n, y: _1n };\n if (zz !== _1n)\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n clearCofactor() {\n const { h: cofactor } = CURVE;\n if (cofactor === _1n)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n // Converts hash string or Uint8Array to Point.\n // Uses algo from RFC8032 5.1.3.\n static fromHex(hex, zip215 = false) {\n const { d, a } = CURVE;\n const len = Fp.BYTES;\n hex = ensureBytes('pointHex', hex, len); // copy hex to a new array\n const normed = hex.slice(); // copy again, we'll manipulate it\n const lastByte = hex[len - 1]; // select last byte\n normed[len - 1] = lastByte & ~0x80; // clear last bit\n const y = ut.bytesToNumberLE(normed);\n if (y === _0n) {\n // y=0 is allowed\n }\n else {\n // RFC8032 prohibits >= p, but ZIP215 doesn't\n if (zip215)\n assertInRange(y, MASK); // zip215=true [1..P-1] (2^255-19-1 for ed25519)\n else\n assertInRange(y, Fp.ORDER); // zip215=false [1..MASK-1] (2^256-1 for ed25519)\n }\n // Ed25519: x² = (y²-1)/(dy²+1) mod p. Ed448: x² = (y²-1)/(dy²-1) mod p. Generic case:\n // ax²+y²=1+dx²y² => y²-1=dx²y²-ax² => y²-1=x²(dy²-a) => x²=(y²-1)/(dy²-a)\n const y2 = modP(y * y); // denominator is always non-0 mod p.\n const u = modP(y2 - _1n); // u = y² - 1\n const v = modP(d * y2 - a); // v = d y² + 1.\n let { isValid, value: x } = uvRatio(u, v); // √(u/v)\n if (!isValid)\n throw new Error('Point.fromHex: invalid y coordinate');\n const isXOdd = (x & _1n) === _1n; // There are 2 square roots. Use x_0 bit to select proper\n const isLastByteOdd = (lastByte & 0x80) !== 0; // if x=0 and x_0 = 1, fail\n if (isLastByteOdd !== isXOdd)\n x = modP(-x); // if x_0 != x mod 2, set x = p-x\n return Point.fromAffine({ x, y });\n }\n static fromPrivateKey(privKey) {\n return getExtendedPublicKey(privKey).point;\n }\n toRawBytes() {\n const { x, y } = this.toAffine();\n const bytes = ut.numberToBytesLE(y, Fp.BYTES); // each y has 2 x values (x, -y)\n bytes[bytes.length - 1] |= x & _1n ? 0x80 : 0; // when compressing, it's enough to store y\n return bytes; // and use the last byte to encode sign of x\n }\n toHex() {\n return ut.bytesToHex(this.toRawBytes()); // Same as toRawBytes, but returns string.\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, _1n, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(_0n, _1n, _1n, _0n); // 0, 1, 1, 0\n const { BASE: G, ZERO: I } = Point;\n const wnaf = wNAF(Point, nByteLength * 8);\n function modN(a) {\n return mod(a, CURVE_ORDER);\n }\n // Little-endian SHA512 with modulo n\n function modN_LE(hash) {\n return modN(ut.bytesToNumberLE(hash));\n }\n /** Convenience method that creates public key and other stuff. RFC8032 5.1.5 */\n function getExtendedPublicKey(key) {\n const len = nByteLength;\n key = ensureBytes('private key', key, len);\n // Hash private key with curve's hash function to produce uniformingly random input\n // Check byte lengths: ensure(64, h(ensure(32, key)))\n const hashed = ensureBytes('hashed private key', cHash(key), 2 * len);\n const head = adjustScalarBytes(hashed.slice(0, len)); // clear first half bits, produce FE\n const prefix = hashed.slice(len, 2 * len); // second half is called key prefix (5.1.6)\n const scalar = modN_LE(head); // The actual private scalar\n const point = G.multiply(scalar); // Point on Edwards curve aka public key\n const pointBytes = point.toRawBytes(); // Uint8Array representation\n return { head, prefix, scalar, point, pointBytes };\n }\n // Calculates EdDSA pub key. RFC8032 5.1.5. Privkey is hashed. Use first half with 3 bits cleared\n function getPublicKey(privKey) {\n return getExtendedPublicKey(privKey).pointBytes;\n }\n // int('LE', SHA512(dom2(F, C) || msgs)) mod N\n function hashDomainToScalar(context = new Uint8Array(), ...msgs) {\n const msg = ut.concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, ensureBytes('context', context), !!prehash)));\n }\n /** Signs message with privateKey. RFC8032 5.1.6 */\n function sign(msg, privKey, options = {}) {\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph etc.\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(privKey);\n const r = hashDomainToScalar(options.context, prefix, msg); // r = dom2(F, C) || prefix || PH(M)\n const R = G.multiply(r).toRawBytes(); // R = rG\n const k = hashDomainToScalar(options.context, R, pointBytes, msg); // R || A || PH(M)\n const s = modN(r + k * scalar); // S = (r + k * s) mod L\n assertGE0(s); // 0 <= s < l\n const res = ut.concatBytes(R, ut.numberToBytesLE(s, Fp.BYTES));\n return ensureBytes('result', res, nByteLength * 2); // 64-byte signature\n }\n const verifyOpts = VERIFY_DEFAULT;\n function verify(sig, msg, publicKey, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = Fp.BYTES; // Verifies EdDSA signature against message and public key. RFC8032 5.1.7.\n sig = ensureBytes('signature', sig, 2 * len); // An extended group equation is checked.\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph, etc\n const s = ut.bytesToNumberLE(sig.slice(len, 2 * len));\n // zip215: true is good for consensus-critical apps and allows points < 2^256\n // zip215: false follows RFC8032 / NIST186-5 and restricts points to CURVE.p\n let A, R, SB;\n try {\n A = Point.fromHex(publicKey, zip215);\n R = Point.fromHex(sig.slice(0, len), zip215);\n SB = G.multiplyUnsafe(s); // 0 <= s < l is done inside\n }\n catch (error) {\n return false;\n }\n const k = hashDomainToScalar(context, R.toRawBytes(), A.toRawBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n // [8][S]B = [8]R + [8][k]A'\n return RkA.subtract(SB).clearCofactor().equals(Point.ZERO);\n }\n G._setWindowSize(8); // Enable precomputes. Slows down first publicKey computation by 20ms.\n const utils = {\n getExtendedPublicKey,\n // ed25519 private keys are uniform 32b. No need to check for modulo bias, like in secp256k1.\n randomPrivateKey: () => randomBytes(Fp.BYTES),\n /**\n * We're doing scalar multiplication (used in getPublicKey etc) with precomputed BASE_POINT\n * values. This slows down first getPublicKey() by milliseconds (see Speed section),\n * but allows to speed-up subsequent getPublicKey() calls up to 20x.\n * @param windowSize 2, 4, 8, 16\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n },\n };\n return {\n CURVE,\n getPublicKey,\n sign,\n verify,\n ExtendedPoint: Point,\n utils,\n };\n}\n//# sourceMappingURL=edwards.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { mod, pow } from './modular.js';\nimport { bytesToNumberLE, ensureBytes, numberToBytesLE, validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nfunction validateOpts(curve) {\n validateObject(curve, {\n a: 'bigint',\n }, {\n montgomeryBits: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n adjustScalarBytes: 'function',\n domain: 'function',\n powPminus2: 'function',\n Gu: 'bigint',\n });\n // Set defaults\n return Object.freeze({ ...curve });\n}\n// NOTE: not really montgomery curve, just bunch of very specific methods for X25519/X448 (RFC 7748, https://www.rfc-editor.org/rfc/rfc7748)\n// Uses only one coordinate instead of two\nexport function montgomery(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { P } = CURVE;\n const modP = (n) => mod(n, P);\n const montgomeryBits = CURVE.montgomeryBits;\n const montgomeryBytes = Math.ceil(montgomeryBits / 8);\n const fieldLen = CURVE.nByteLength;\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes);\n const powPminus2 = CURVE.powPminus2 || ((x) => pow(x, P - BigInt(2), P));\n // cswap from RFC7748. But it is not from RFC7748!\n /*\n cswap(swap, x_2, x_3):\n dummy = mask(swap) AND (x_2 XOR x_3)\n x_2 = x_2 XOR dummy\n x_3 = x_3 XOR dummy\n Return (x_2, x_3)\n Where mask(swap) is the all-1 or all-0 word of the same length as x_2\n and x_3, computed, e.g., as mask(swap) = 0 - swap.\n */\n function cswap(swap, x_2, x_3) {\n const dummy = modP(swap * (x_2 - x_3));\n x_2 = modP(x_2 - dummy);\n x_3 = modP(x_3 + dummy);\n return [x_2, x_3];\n }\n // Accepts 0 as well\n function assertFieldElement(n) {\n if (typeof n === 'bigint' && _0n <= n && n < P)\n return n;\n throw new Error('Expected valid scalar 0 < scalar < CURVE.P');\n }\n // x25519 from 4\n // The constant a24 is (486662 - 2) / 4 = 121665 for curve25519/X25519\n const a24 = (CURVE.a - BigInt(2)) / BigInt(4);\n /**\n *\n * @param pointU u coordinate (x) on Montgomery Curve 25519\n * @param scalar by which the point would be multiplied\n * @returns new Point on Montgomery curve\n */\n function montgomeryLadder(pointU, scalar) {\n const u = assertFieldElement(pointU);\n // Section 5: Implementations MUST accept non-canonical values and process them as\n // if they had been reduced modulo the field prime.\n const k = assertFieldElement(scalar);\n const x_1 = u;\n let x_2 = _1n;\n let z_2 = _0n;\n let x_3 = u;\n let z_3 = _1n;\n let swap = _0n;\n let sw;\n for (let t = BigInt(montgomeryBits - 1); t >= _0n; t--) {\n const k_t = (k >> t) & _1n;\n swap ^= k_t;\n sw = cswap(swap, x_2, x_3);\n x_2 = sw[0];\n x_3 = sw[1];\n sw = cswap(swap, z_2, z_3);\n z_2 = sw[0];\n z_3 = sw[1];\n swap = k_t;\n const A = x_2 + z_2;\n const AA = modP(A * A);\n const B = x_2 - z_2;\n const BB = modP(B * B);\n const E = AA - BB;\n const C = x_3 + z_3;\n const D = x_3 - z_3;\n const DA = modP(D * A);\n const CB = modP(C * B);\n const dacb = DA + CB;\n const da_cb = DA - CB;\n x_3 = modP(dacb * dacb);\n z_3 = modP(x_1 * modP(da_cb * da_cb));\n x_2 = modP(AA * BB);\n z_2 = modP(E * (AA + modP(a24 * E)));\n }\n // (x_2, x_3) = cswap(swap, x_2, x_3)\n sw = cswap(swap, x_2, x_3);\n x_2 = sw[0];\n x_3 = sw[1];\n // (z_2, z_3) = cswap(swap, z_2, z_3)\n sw = cswap(swap, z_2, z_3);\n z_2 = sw[0];\n z_3 = sw[1];\n // z_2^(p - 2)\n const z2 = powPminus2(z_2);\n // Return x_2 * (z_2^(p - 2))\n return modP(x_2 * z2);\n }\n function encodeUCoordinate(u) {\n return numberToBytesLE(modP(u), montgomeryBytes);\n }\n function decodeUCoordinate(uEnc) {\n // Section 5: When receiving such an array, implementations of X25519\n // MUST mask the most significant bit in the final byte.\n // This is very ugly way, but it works because fieldLen-1 is outside of bounds for X448, so this becomes NOOP\n // fieldLen - scalaryBytes = 1 for X448 and = 0 for X25519\n const u = ensureBytes('u coordinate', uEnc, montgomeryBytes);\n // u[fieldLen-1] crashes QuickJS (TypeError: out-of-bound numeric index)\n if (fieldLen === montgomeryBytes)\n u[fieldLen - 1] &= 127; // 0b0111_1111\n return bytesToNumberLE(u);\n }\n function decodeScalar(n) {\n const bytes = ensureBytes('scalar', n);\n if (bytes.length !== montgomeryBytes && bytes.length !== fieldLen)\n throw new Error(`Expected ${montgomeryBytes} or ${fieldLen} bytes, got ${bytes.length}`);\n return bytesToNumberLE(adjustScalarBytes(bytes));\n }\n function scalarMult(scalar, u) {\n const pointU = decodeUCoordinate(u);\n const _scalar = decodeScalar(scalar);\n const pu = montgomeryLadder(pointU, _scalar);\n // The result was not contributory\n // https://cr.yp.to/ecdh.html#validate\n if (pu === _0n)\n throw new Error('Invalid private or public key received');\n return encodeUCoordinate(pu);\n }\n // Computes public key from private. By doing scalar multiplication of base point.\n const GuBytes = encodeUCoordinate(CURVE.Gu);\n function scalarMultBase(scalar) {\n return scalarMult(scalar, GuBytes);\n }\n return {\n scalarMult,\n scalarMultBase,\n getSharedSecret: (privateKey, publicKey) => scalarMult(privateKey, publicKey),\n getPublicKey: (privateKey) => scalarMultBase(privateKey),\n utils: { randomPrivateKey: () => CURVE.randomBytes(CURVE.nByteLength) },\n GuBytes: GuBytes,\n };\n}\n//# sourceMappingURL=montgomery.js.map","import { mod } from './modular.js';\nimport { bytesToNumberBE, concatBytes, utf8ToBytes, validateObject } from './utils.js';\nfunction validateDST(dst) {\n if (dst instanceof Uint8Array)\n return dst;\n if (typeof dst === 'string')\n return utf8ToBytes(dst);\n throw new Error('DST must be Uint8Array or string');\n}\n// Octet Stream to Integer. \"spec\" implementation of os2ip is 2.5x slower vs bytesToNumberBE.\nconst os2ip = bytesToNumberBE;\n// Integer to Octet Stream (numberToBytesBE)\nfunction i2osp(value, length) {\n if (value < 0 || value >= 1 << (8 * length)) {\n throw new Error(`bad I2OSP call: value=${value} length=${length}`);\n }\n const res = Array.from({ length }).fill(0);\n for (let i = length - 1; i >= 0; i--) {\n res[i] = value & 0xff;\n value >>>= 8;\n }\n return new Uint8Array(res);\n}\nfunction strxor(a, b) {\n const arr = new Uint8Array(a.length);\n for (let i = 0; i < a.length; i++) {\n arr[i] = a[i] ^ b[i];\n }\n return arr;\n}\nfunction isBytes(item) {\n if (!(item instanceof Uint8Array))\n throw new Error('Uint8Array expected');\n}\nfunction isNum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error('number expected');\n}\n// Produces a uniformly random byte string using a cryptographic hash function H that outputs b bits\n// https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-11#section-5.4.1\nexport function expand_message_xmd(msg, DST, lenInBytes, H) {\n isBytes(msg);\n isBytes(DST);\n isNum(lenInBytes);\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-5.3.3\n if (DST.length > 255)\n DST = H(concatBytes(utf8ToBytes('H2C-OVERSIZE-DST-'), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (ell > 255)\n throw new Error('Invalid xmd length');\n const DST_prime = concatBytes(DST, i2osp(DST.length, 1));\n const Z_pad = i2osp(0, r_in_bytes);\n const l_i_b_str = i2osp(lenInBytes, 2); // len_in_bytes_str\n const b = new Array(ell);\n const b_0 = H(concatBytes(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));\n b[0] = H(concatBytes(b_0, i2osp(1, 1), DST_prime));\n for (let i = 1; i <= ell; i++) {\n const args = [strxor(b_0, b[i - 1]), i2osp(i + 1, 1), DST_prime];\n b[i] = H(concatBytes(...args));\n }\n const pseudo_random_bytes = concatBytes(...b);\n return pseudo_random_bytes.slice(0, lenInBytes);\n}\nexport function expand_message_xof(msg, DST, lenInBytes, k, H) {\n isBytes(msg);\n isBytes(DST);\n isNum(lenInBytes);\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-5.3.3\n // DST = H('H2C-OVERSIZE-DST-' || a_very_long_DST, Math.ceil((lenInBytes * k) / 8));\n if (DST.length > 255) {\n const dkLen = Math.ceil((2 * k) / 8);\n DST = H.create({ dkLen }).update(utf8ToBytes('H2C-OVERSIZE-DST-')).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error('expand_message_xof: invalid lenInBytes');\n return (H.create({ dkLen: lenInBytes })\n .update(msg)\n .update(i2osp(lenInBytes, 2))\n // 2. DST_prime = DST || I2OSP(len(DST), 1)\n .update(DST)\n .update(i2osp(DST.length, 1))\n .digest());\n}\n/**\n * Hashes arbitrary-length byte strings to a list of one or more elements of a finite field F\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-11#section-5.3\n * @param msg a byte string containing the message to hash\n * @param count the number of elements of F to output\n * @param options `{DST: string, p: bigint, m: number, k: number, expand: 'xmd' | 'xof', hash: H}`, see above\n * @returns [u_0, ..., u_(count - 1)], a list of field elements.\n */\nexport function hash_to_field(msg, count, options) {\n validateObject(options, {\n DST: 'string',\n p: 'bigint',\n m: 'isSafeInteger',\n k: 'isSafeInteger',\n hash: 'hash',\n });\n const { p, k, m, hash, expand, DST: _DST } = options;\n isBytes(msg);\n isNum(count);\n const DST = validateDST(_DST);\n const log2p = p.toString(2).length;\n const L = Math.ceil((log2p + k) / 8); // section 5.1 of ietf draft link above\n const len_in_bytes = count * m * L;\n let prb; // pseudo_random_bytes\n if (expand === 'xmd') {\n prb = expand_message_xmd(msg, DST, len_in_bytes, hash);\n }\n else if (expand === 'xof') {\n prb = expand_message_xof(msg, DST, len_in_bytes, k, hash);\n }\n else if (expand === '_internal_pass') {\n // for internal tests only\n prb = msg;\n }\n else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u = new Array(count);\n for (let i = 0; i < count; i++) {\n const e = new Array(m);\n for (let j = 0; j < m; j++) {\n const elm_offset = L * (j + i * m);\n const tv = prb.subarray(elm_offset, elm_offset + L);\n e[j] = mod(os2ip(tv), p);\n }\n u[i] = e;\n }\n return u;\n}\nexport function isogenyMap(field, map) {\n // Make same order as in spec\n const COEFF = map.map((i) => Array.from(i).reverse());\n return (x, y) => {\n const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));\n x = field.div(xNum, xDen); // xNum / xDen\n y = field.mul(y, field.div(yNum, yDen)); // y * (yNum / yDev)\n return { x, y };\n };\n}\nexport function createHasher(Point, mapToCurve, def) {\n if (typeof mapToCurve !== 'function')\n throw new Error('mapToCurve() must be defined');\n return {\n // Encodes byte string to elliptic curve\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-3\n hashToCurve(msg, options) {\n const u = hash_to_field(msg, 2, { ...def, DST: def.DST, ...options });\n const u0 = Point.fromAffine(mapToCurve(u[0]));\n const u1 = Point.fromAffine(mapToCurve(u[1]));\n const P = u0.add(u1).clearCofactor();\n P.assertValidity();\n return P;\n },\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-3\n encodeToCurve(msg, options) {\n const u = hash_to_field(msg, 1, { ...def, DST: def.encodeDST, ...options });\n const P = Point.fromAffine(mapToCurve(u[0])).clearCofactor();\n P.assertValidity();\n return P;\n },\n };\n}\n//# sourceMappingURL=hash-to-curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha512 } from '@noble/hashes/sha512';\nimport { concatBytes, randomBytes, utf8ToBytes } from '@noble/hashes/utils';\nimport { twistedEdwards } from './abstract/edwards.js';\nimport { montgomery } from './abstract/montgomery.js';\nimport { mod, pow2, isNegativeLE, Field, FpSqrtEven } from './abstract/modular.js';\nimport { equalBytes, bytesToHex, bytesToNumberLE, numberToBytesLE, ensureBytes, } from './abstract/utils.js';\nimport * as htf from './abstract/hash-to-curve.js';\n/**\n * ed25519 Twisted Edwards curve with following addons:\n * - X25519 ECDH\n * - Ristretto cofactor elimination\n * - Elligator hash-to-group / point indistinguishability\n */\nconst ED25519_P = BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819949');\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst ED25519_SQRT_M1 = BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _5n = BigInt(5);\n// prettier-ignore\nconst _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\nfunction ed25519_pow_2_252_3(x) {\n const P = ED25519_P;\n const x2 = (x * x) % P;\n const b2 = (x2 * x) % P; // x^3, 11\n const b4 = (pow2(b2, _2n, P) * b2) % P; // x^15, 1111\n const b5 = (pow2(b4, _1n, P) * x) % P; // x^31\n const b10 = (pow2(b5, _5n, P) * b5) % P;\n const b20 = (pow2(b10, _10n, P) * b10) % P;\n const b40 = (pow2(b20, _20n, P) * b20) % P;\n const b80 = (pow2(b40, _40n, P) * b40) % P;\n const b160 = (pow2(b80, _80n, P) * b80) % P;\n const b240 = (pow2(b160, _80n, P) * b80) % P;\n const b250 = (pow2(b240, _10n, P) * b10) % P;\n const pow_p_5_8 = (pow2(b250, _2n, P) * x) % P;\n // ^ To pow to (p+3)/8, multiply it by x.\n return { pow_p_5_8, b2 };\n}\nfunction adjustScalarBytes(bytes) {\n // Section 5: For X25519, in order to decode 32 random bytes as an integer scalar,\n // set the three least significant bits of the first byte\n bytes[0] &= 248; // 0b1111_1000\n // and the most significant bit of the last to zero,\n bytes[31] &= 127; // 0b0111_1111\n // set the second most significant bit of the last byte to 1\n bytes[31] |= 64; // 0b0100_0000\n return bytes;\n}\n// sqrt(u/v)\nfunction uvRatio(u, v) {\n const P = ED25519_P;\n const v3 = mod(v * v * v, P); // v³\n const v7 = mod(v3 * v3 * v, P); // v⁷\n // (p+3)/8 and (p-5)/8\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = mod(u * v3 * pow, P); // (uv³)(uv⁷)^(p-5)/8\n const vx2 = mod(v * x * x, P); // vx²\n const root1 = x; // First root candidate\n const root2 = mod(x * ED25519_SQRT_M1, P); // Second root candidate\n const useRoot1 = vx2 === u; // If vx² = u (mod p), x is a square root\n const useRoot2 = vx2 === mod(-u, P); // If vx² = -u, set x <-- x * 2^((p-1)/4)\n const noRoot = vx2 === mod(-u * ED25519_SQRT_M1, P); // There is no valid root, vx² = -u√(-1)\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2; // We return root2 anyway, for const-time\n if (isNegativeLE(x, P))\n x = mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n}\n// Just in case\nexport const ED25519_TORSION_SUBGROUP = [\n '0100000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a',\n '0000000000000000000000000000000000000000000000000000000000000080',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05',\n 'ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85',\n '0000000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa',\n];\nconst Fp = Field(ED25519_P, undefined, true);\nconst ed25519Defaults = {\n // Param: a\n a: BigInt(-1),\n // d is equal to -121665/121666 over finite field.\n // Negative number is P - number, and division is invert(number, P)\n d: BigInt('37095705934669439343138083508754565189542113879843219016388785533085940283555'),\n // Finite field 𝔽p over which we'll do calculations; 2n ** 255n - 19n\n Fp,\n // Subgroup order: how many points curve has\n // 2n ** 252n + 27742317777372353535851937790883648493n;\n n: BigInt('7237005577332262213973186563042994240857116359379907606001950938285454250989'),\n // Cofactor\n h: BigInt(8),\n // Base point (x, y) aka generator point\n Gx: BigInt('15112221349535400772501151409588531511454012693041857206046113283949847762202'),\n Gy: BigInt('46316835694926478169428394003475163141307993866256225615783033603165251855960'),\n hash: sha512,\n randomBytes,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio,\n};\nexport const ed25519 = twistedEdwards(ed25519Defaults);\nfunction ed25519_domain(data, ctx, phflag) {\n if (ctx.length > 255)\n throw new Error('Context is too big');\n return concatBytes(utf8ToBytes('SigEd25519 no Ed25519 collisions'), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);\n}\nexport const ed25519ctx = twistedEdwards({ ...ed25519Defaults, domain: ed25519_domain });\nexport const ed25519ph = twistedEdwards({\n ...ed25519Defaults,\n domain: ed25519_domain,\n prehash: sha512,\n});\nexport const x25519 = montgomery({\n P: ED25519_P,\n a: BigInt(486662),\n montgomeryBits: 255,\n nByteLength: 32,\n Gu: BigInt(9),\n powPminus2: (x) => {\n const P = ED25519_P;\n // x^(p-2) aka x^(2^255-21)\n const { pow_p_5_8, b2 } = ed25519_pow_2_252_3(x);\n return mod(pow2(pow_p_5_8, BigInt(3), P) * b2, P);\n },\n adjustScalarBytes,\n randomBytes,\n});\n/**\n * Converts ed25519 public key to x25519 public key. Uses formula:\n * * `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * * `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * @example\n * const aPub = ed25519.getPublicKey(utils.randomPrivateKey());\n * x25519.getSharedSecret(edwardsToMontgomery(aPub), edwardsToMontgomery(someonesPub))\n */\nexport function edwardsToMontgomery(edwardsPub) {\n const { y } = ed25519.ExtendedPoint.fromHex(edwardsPub);\n const _1n = BigInt(1);\n return Fp.toBytes(Fp.create((y - _1n) * Fp.inv(y + _1n)));\n}\n// Hash To Curve Elligator2 Map (NOTE: different from ristretto255 elligator)\n// NOTE: very important part is usage of FpSqrtEven for ELL2_C1_EDWARDS, since\n// SageMath returns different root first and everything falls apart\nconst ELL2_C1 = (Fp.ORDER + BigInt(3)) / BigInt(8); // 1. c1 = (q + 3) / 8 # Integer arithmetic\nconst ELL2_C2 = Fp.pow(_2n, ELL2_C1); // 2. c2 = 2^c1\nconst ELL2_C3 = Fp.sqrt(Fp.neg(Fp.ONE)); // 3. c3 = sqrt(-1)\nconst ELL2_C4 = (Fp.ORDER - BigInt(5)) / BigInt(8); // 4. c4 = (q - 5) / 8 # Integer arithmetic\nconst ELL2_J = BigInt(486662);\n// prettier-ignore\nfunction map_to_curve_elligator2_curve25519(u) {\n let tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, _2n); // 2. tv1 = 2 * tv1\n let xd = Fp.add(tv1, Fp.ONE); // 3. xd = tv1 + 1 # Nonzero: -1 is square (mod p), tv1 is not\n let x1n = Fp.neg(ELL2_J); // 4. x1n = -J # x1 = x1n / xd = -J / (1 + 2 * u^2)\n let tv2 = Fp.sqr(xd); // 5. tv2 = xd^2\n let gxd = Fp.mul(tv2, xd); // 6. gxd = tv2 * xd # gxd = xd^3\n let gx1 = Fp.mul(tv1, ELL2_J); // 7. gx1 = J * tv1 # x1n + J * xd\n gx1 = Fp.mul(gx1, x1n); // 8. gx1 = gx1 * x1n # x1n^2 + J * x1n * xd\n gx1 = Fp.add(gx1, tv2); // 9. gx1 = gx1 + tv2 # x1n^2 + J * x1n * xd + xd^2\n gx1 = Fp.mul(gx1, x1n); // 10. gx1 = gx1 * x1n # x1n^3 + J * x1n^2 * xd + x1n * xd^2\n let tv3 = Fp.sqr(gxd); // 11. tv3 = gxd^2\n tv2 = Fp.sqr(tv3); // 12. tv2 = tv3^2 # gxd^4\n tv3 = Fp.mul(tv3, gxd); // 13. tv3 = tv3 * gxd # gxd^3\n tv3 = Fp.mul(tv3, gx1); // 14. tv3 = tv3 * gx1 # gx1 * gxd^3\n tv2 = Fp.mul(tv2, tv3); // 15. tv2 = tv2 * tv3 # gx1 * gxd^7\n let y11 = Fp.pow(tv2, ELL2_C4); // 16. y11 = tv2^c4 # (gx1 * gxd^7)^((p - 5) / 8)\n y11 = Fp.mul(y11, tv3); // 17. y11 = y11 * tv3 # gx1*gxd^3*(gx1*gxd^7)^((p-5)/8)\n let y12 = Fp.mul(y11, ELL2_C3); // 18. y12 = y11 * c3\n tv2 = Fp.sqr(y11); // 19. tv2 = y11^2\n tv2 = Fp.mul(tv2, gxd); // 20. tv2 = tv2 * gxd\n let e1 = Fp.eql(tv2, gx1); // 21. e1 = tv2 == gx1\n let y1 = Fp.cmov(y12, y11, e1); // 22. y1 = CMOV(y12, y11, e1) # If g(x1) is square, this is its sqrt\n let x2n = Fp.mul(x1n, tv1); // 23. x2n = x1n * tv1 # x2 = x2n / xd = 2 * u^2 * x1n / xd\n let y21 = Fp.mul(y11, u); // 24. y21 = y11 * u\n y21 = Fp.mul(y21, ELL2_C2); // 25. y21 = y21 * c2\n let y22 = Fp.mul(y21, ELL2_C3); // 26. y22 = y21 * c3\n let gx2 = Fp.mul(gx1, tv1); // 27. gx2 = gx1 * tv1 # g(x2) = gx2 / gxd = 2 * u^2 * g(x1)\n tv2 = Fp.sqr(y21); // 28. tv2 = y21^2\n tv2 = Fp.mul(tv2, gxd); // 29. tv2 = tv2 * gxd\n let e2 = Fp.eql(tv2, gx2); // 30. e2 = tv2 == gx2\n let y2 = Fp.cmov(y22, y21, e2); // 31. y2 = CMOV(y22, y21, e2) # If g(x2) is square, this is its sqrt\n tv2 = Fp.sqr(y1); // 32. tv2 = y1^2\n tv2 = Fp.mul(tv2, gxd); // 33. tv2 = tv2 * gxd\n let e3 = Fp.eql(tv2, gx1); // 34. e3 = tv2 == gx1\n let xn = Fp.cmov(x2n, x1n, e3); // 35. xn = CMOV(x2n, x1n, e3) # If e3, x = x1, else x = x2\n let y = Fp.cmov(y2, y1, e3); // 36. y = CMOV(y2, y1, e3) # If e3, y = y1, else y = y2\n let e4 = Fp.isOdd(y); // 37. e4 = sgn0(y) == 1 # Fix sign of y\n y = Fp.cmov(y, Fp.neg(y), e3 !== e4); // 38. y = CMOV(y, -y, e3 XOR e4)\n return { xMn: xn, xMd: xd, yMn: y, yMd: _1n }; // 39. return (xn, xd, y, 1)\n}\nconst ELL2_C1_EDWARDS = FpSqrtEven(Fp, Fp.neg(BigInt(486664))); // sgn0(c1) MUST equal 0\nfunction map_to_curve_elligator2_edwards25519(u) {\n const { xMn, xMd, yMn, yMd } = map_to_curve_elligator2_curve25519(u); // 1. (xMn, xMd, yMn, yMd) = map_to_curve_elligator2_curve25519(u)\n let xn = Fp.mul(xMn, yMd); // 2. xn = xMn * yMd\n xn = Fp.mul(xn, ELL2_C1_EDWARDS); // 3. xn = xn * c1\n let xd = Fp.mul(xMd, yMn); // 4. xd = xMd * yMn # xn / xd = c1 * xM / yM\n let yn = Fp.sub(xMn, xMd); // 5. yn = xMn - xMd\n let yd = Fp.add(xMn, xMd); // 6. yd = xMn + xMd # (n / d - 1) / (n / d + 1) = (n - d) / (n + d)\n let tv1 = Fp.mul(xd, yd); // 7. tv1 = xd * yd\n let e = Fp.eql(tv1, Fp.ZERO); // 8. e = tv1 == 0\n xn = Fp.cmov(xn, Fp.ZERO, e); // 9. xn = CMOV(xn, 0, e)\n xd = Fp.cmov(xd, Fp.ONE, e); // 10. xd = CMOV(xd, 1, e)\n yn = Fp.cmov(yn, Fp.ONE, e); // 11. yn = CMOV(yn, 1, e)\n yd = Fp.cmov(yd, Fp.ONE, e); // 12. yd = CMOV(yd, 1, e)\n const inv = Fp.invertBatch([xd, yd]); // batch division\n return { x: Fp.mul(xn, inv[0]), y: Fp.mul(yn, inv[1]) }; // 13. return (xn, xd, yn, yd)\n}\nconst { hashToCurve, encodeToCurve } = htf.createHasher(ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {\n DST: 'edwards25519_XMD:SHA-512_ELL2_RO_',\n encodeDST: 'edwards25519_XMD:SHA-512_ELL2_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha512,\n});\nexport { hashToCurve, encodeToCurve };\nfunction assertRstPoint(other) {\n if (!(other instanceof RistrettoPoint))\n throw new Error('RistrettoPoint expected');\n}\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst SQRT_M1 = BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// √(ad - 1)\nconst SQRT_AD_MINUS_ONE = BigInt('25063068953384623474111414158702152701244531502492656460079210482610430750235');\n// 1 / √(a-d)\nconst INVSQRT_A_MINUS_D = BigInt('54469307008909316920995813868745141605393597292927456921205312896311721017578');\n// 1-d²\nconst ONE_MINUS_D_SQ = BigInt('1159843021668779879193775521855586647937357759715417654439879720876111806838');\n// (d-1)²\nconst D_MINUS_ONE_SQ = BigInt('40440834346308536858101042469323190826248399146238708352240133220865137265952');\n// Calculates 1/√(number)\nconst invertSqrt = (number) => uvRatio(_1n, number);\nconst MAX_255B = BigInt('0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');\nconst bytes255ToNumberLE = (bytes) => ed25519.CURVE.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n// Computes Elligator map for Ristretto\n// https://ristretto.group/formulas/elligator.html\nfunction calcElligatorRistrettoMap(r0) {\n const { d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const r = mod(SQRT_M1 * r0 * r0); // 1\n const Ns = mod((r + _1n) * ONE_MINUS_D_SQ); // 2\n let c = BigInt(-1); // 3\n const D = mod((c - d * r) * mod(r + d)); // 4\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D); // 5\n let s_ = mod(s * r0); // 6\n if (!isNegativeLE(s_, P))\n s_ = mod(-s_);\n if (!Ns_D_is_sq)\n s = s_; // 7\n if (!Ns_D_is_sq)\n c = r; // 8\n const Nt = mod(c * (r - _1n) * D_MINUS_ONE_SQ - D); // 9\n const s2 = s * s;\n const W0 = mod((s + s) * D); // 10\n const W1 = mod(Nt * SQRT_AD_MINUS_ONE); // 11\n const W2 = mod(_1n - s2); // 12\n const W3 = mod(_1n + s2); // 13\n return new ed25519.ExtendedPoint(mod(W0 * W3), mod(W2 * W1), mod(W1 * W3), mod(W0 * W2));\n}\n/**\n * Each ed25519/ExtendedPoint has 8 different equivalent points. This can be\n * a source of bugs for protocols like ring signatures. Ristretto was created to solve this.\n * Ristretto point operates in X:Y:Z:T extended coordinates like ExtendedPoint,\n * but it should work in its own namespace: do not combine those two.\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-ristretto255-decaf448\n */\nclass RistrettoPoint {\n // Private property to discourage combining ExtendedPoint + RistrettoPoint\n // Always use Ristretto encoding/decoding instead.\n constructor(ep) {\n this.ep = ep;\n }\n static fromAffine(ap) {\n return new RistrettoPoint(ed25519.ExtendedPoint.fromAffine(ap));\n }\n /**\n * Takes uniform output of 64-bit hash function like sha512 and converts it to `RistrettoPoint`.\n * The hash-to-group operation applies Elligator twice and adds the results.\n * **Note:** this is one-way map, there is no conversion from point to hash.\n * https://ristretto.group/formulas/elligator.html\n * @param hex 64-bit output of a hash function\n */\n static hashToCurve(hex) {\n hex = ensureBytes('ristrettoHash', hex, 64);\n const r1 = bytes255ToNumberLE(hex.slice(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(hex.slice(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new RistrettoPoint(R1.add(R2));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * https://ristretto.group/formulas/decoding.html\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n hex = ensureBytes('ristrettoHex', hex, 32);\n const { a, d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const emsg = 'RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint';\n const s = bytes255ToNumberLE(hex);\n // 1. Check that s_bytes is the canonical encoding of a field element, or else abort.\n // 3. Check that s is non-negative, or else abort\n if (!equalBytes(numberToBytesLE(s, 32), hex) || isNegativeLE(s, P))\n throw new Error(emsg);\n const s2 = mod(s * s);\n const u1 = mod(_1n + a * s2); // 4 (a is -1)\n const u2 = mod(_1n - a * s2); // 5\n const u1_2 = mod(u1 * u1);\n const u2_2 = mod(u2 * u2);\n const v = mod(a * d * u1_2 - u2_2); // 6\n const { isValid, value: I } = invertSqrt(mod(v * u2_2)); // 7\n const Dx = mod(I * u2); // 8\n const Dy = mod(I * Dx * v); // 9\n let x = mod((s + s) * Dx); // 10\n if (isNegativeLE(x, P))\n x = mod(-x); // 10\n const y = mod(u1 * Dy); // 11\n const t = mod(x * y); // 12\n if (!isValid || isNegativeLE(t, P) || y === _0n)\n throw new Error(emsg);\n return new RistrettoPoint(new ed25519.ExtendedPoint(x, y, _1n, t));\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * https://ristretto.group/formulas/encoding.html\n */\n toRawBytes() {\n let { ex: x, ey: y, ez: z, et: t } = this.ep;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const u1 = mod(mod(z + y) * mod(z - y)); // 1\n const u2 = mod(x * y); // 2\n // Square root always exists\n const u2sq = mod(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod(u1 * u2sq)); // 3\n const D1 = mod(invsqrt * u1); // 4\n const D2 = mod(invsqrt * u2); // 5\n const zInv = mod(D1 * D2 * t); // 6\n let D; // 7\n if (isNegativeLE(t * zInv, P)) {\n let _x = mod(y * SQRT_M1);\n let _y = mod(x * SQRT_M1);\n x = _x;\n y = _y;\n D = mod(D1 * INVSQRT_A_MINUS_D);\n }\n else {\n D = D2; // 8\n }\n if (isNegativeLE(x * zInv, P))\n y = mod(-y); // 9\n let s = mod((z - y) * D); // 10 (check footer's note, no sqrt(-a))\n if (isNegativeLE(s, P))\n s = mod(-s);\n return numberToBytesLE(s, 32); // 11\n }\n toHex() {\n return bytesToHex(this.toRawBytes());\n }\n toString() {\n return this.toHex();\n }\n // Compare one point to another.\n equals(other) {\n assertRstPoint(other);\n const { ex: X1, ey: Y1 } = this.ep;\n const { ex: X2, ey: Y2 } = other.ep;\n const mod = ed25519.CURVE.Fp.create;\n // (x1 * y2 == y1 * x2) | (y1 * y2 == x1 * x2)\n const one = mod(X1 * Y2) === mod(Y1 * X2);\n const two = mod(Y1 * Y2) === mod(X1 * X2);\n return one || two;\n }\n add(other) {\n assertRstPoint(other);\n return new RistrettoPoint(this.ep.add(other.ep));\n }\n subtract(other) {\n assertRstPoint(other);\n return new RistrettoPoint(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return new RistrettoPoint(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return new RistrettoPoint(this.ep.multiplyUnsafe(scalar));\n }\n}\nRistrettoPoint.BASE = new RistrettoPoint(ed25519.ExtendedPoint.BASE);\nRistrettoPoint.ZERO = new RistrettoPoint(ed25519.ExtendedPoint.ZERO);\nexport { RistrettoPoint };\n// https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve/14/\n// Appendix B. Hashing to ristretto255\nexport const hash_to_ristretto255 = (msg, options) => {\n const d = options.DST;\n const DST = typeof d === 'string' ? utf8ToBytes(d) : d;\n const uniform_bytes = htf.expand_message_xmd(msg, DST, 64, sha512);\n const P = RistrettoPoint.hashToCurve(uniform_bytes);\n return P;\n};\n//# sourceMappingURL=ed25519.js.map","import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict'\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\n// @ts-ignore\nvar _Buffer = require('safe-buffer').Buffer\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source) }\n if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return _Buffer.alloc(0) }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (source[psz]) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4))\n vch.fill(0x00, 0, zeroes)\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import assert from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n assert.exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map","import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = wrapConstructor(() => new SHA256());\nexport const sha224 = wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","'use strict';\n\n// This is free and unencumbered software released into the public domain.\n// See LICENSE.md for more information.\n\n//\n// Utilities\n//\n\n/**\n * @param {number} a The number to test.\n * @param {number} min The minimum value in the range, inclusive.\n * @param {number} max The maximum value in the range, inclusive.\n * @return {boolean} True if a >= min and a <= max.\n */\nfunction inRange(a, min, max) {\n return min <= a && a <= max;\n}\n\n/**\n * @param {*} o\n * @return {Object}\n */\nfunction ToDictionary(o) {\n if (o === undefined) return {};\n if (o === Object(o)) return o;\n throw TypeError('Could not convert argument to dictionary');\n}\n\n/**\n * @param {string} string Input string of UTF-16 code units.\n * @return {!Array.} Code points.\n */\nfunction stringToCodePoints(string) {\n // https://heycam.github.io/webidl/#dfn-obtain-unicode\n\n // 1. Let S be the DOMString value.\n var s = String(string);\n\n // 2. Let n be the length of S.\n var n = s.length;\n\n // 3. Initialize i to 0.\n var i = 0;\n\n // 4. Initialize U to be an empty sequence of Unicode characters.\n var u = [];\n\n // 5. While i < n:\n while (i < n) {\n\n // 1. Let c be the code unit in S at index i.\n var c = s.charCodeAt(i);\n\n // 2. Depending on the value of c:\n\n // c < 0xD800 or c > 0xDFFF\n if (c < 0xD800 || c > 0xDFFF) {\n // Append to U the Unicode character with code point c.\n u.push(c);\n }\n\n // 0xDC00 ≤ c ≤ 0xDFFF\n else if (0xDC00 <= c && c <= 0xDFFF) {\n // Append to U a U+FFFD REPLACEMENT CHARACTER.\n u.push(0xFFFD);\n }\n\n // 0xD800 ≤ c ≤ 0xDBFF\n else if (0xD800 <= c && c <= 0xDBFF) {\n // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT\n // CHARACTER.\n if (i === n - 1) {\n u.push(0xFFFD);\n }\n // 2. Otherwise, i < n−1:\n else {\n // 1. Let d be the code unit in S at index i+1.\n var d = string.charCodeAt(i + 1);\n\n // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:\n if (0xDC00 <= d && d <= 0xDFFF) {\n // 1. Let a be c & 0x3FF.\n var a = c & 0x3FF;\n\n // 2. Let b be d & 0x3FF.\n var b = d & 0x3FF;\n\n // 3. Append to U the Unicode character with code point\n // 2^16+2^10*a+b.\n u.push(0x10000 + (a << 10) + b);\n\n // 4. Set i to i+1.\n i += 1;\n }\n\n // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a\n // U+FFFD REPLACEMENT CHARACTER.\n else {\n u.push(0xFFFD);\n }\n }\n }\n\n // 3. Set i to i+1.\n i += 1;\n }\n\n // 6. Return U.\n return u;\n}\n\n/**\n * @param {!Array.} code_points Array of code points.\n * @return {string} string String of UTF-16 code units.\n */\nfunction codePointsToString(code_points) {\n var s = '';\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 0xFFFF) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 0x10000;\n s += String.fromCharCode((cp >> 10) + 0xD800,\n (cp & 0x3FF) + 0xDC00);\n }\n }\n return s;\n}\n\n\n//\n// Implementation of Encoding specification\n// https://encoding.spec.whatwg.org/\n//\n\n//\n// 3. Terminology\n//\n\n/**\n * End-of-stream is a special token that signifies no more tokens\n * are in the stream.\n * @const\n */ var end_of_stream = -1;\n\n/**\n * A stream represents an ordered sequence of tokens.\n *\n * @constructor\n * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide the\n * stream.\n */\nfunction Stream(tokens) {\n /** @type {!Array.} */\n this.tokens = [].slice.call(tokens);\n}\n\nStream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n};\n\n//\n// 4. Encodings\n//\n\n// 4.1 Encoders and decoders\n\n/** @const */\nvar finished = -1;\n\n/**\n * @param {boolean} fatal If true, decoding errors raise an exception.\n * @param {number=} opt_code_point Override the standard fallback code point.\n * @return {number} The code point to insert on a decoding error.\n */\nfunction decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError('Decoder error');\n return opt_code_point || 0xFFFD;\n}\n\n//\n// 7. API\n//\n\n/** @const */ var DEFAULT_ENCODING = 'utf-8';\n\n// 7.1 Interface TextDecoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextDecoder(encoding, options) {\n if (!(this instanceof TextDecoder)) {\n return new TextDecoder(encoding, options);\n }\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {boolean} */\n this._BOMseen = false;\n /** @private @type {?Decoder} */\n this._decoder = null;\n /** @private @type {boolean} */\n this._fatal = Boolean(options['fatal']);\n /** @private @type {boolean} */\n this._ignoreBOM = Boolean(options['ignoreBOM']);\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n Object.defineProperty(this, 'fatal', {value: this._fatal});\n Object.defineProperty(this, 'ignoreBOM', {value: this._ignoreBOM});\n}\n\nTextDecoder.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === 'object' && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === 'object' && 'buffer' in input &&\n input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(input.buffer,\n input.byteOffset,\n input.byteLength);\n } else {\n bytes = new Uint8Array(0);\n }\n\n options = ToDictionary(options);\n\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({fatal: this._fatal});\n this._BOMseen = false;\n }\n this._streaming = Boolean(options['stream']);\n\n var input_stream = new Stream(bytes);\n\n var code_points = [];\n\n /** @type {?(number|!Array.)} */\n var result;\n\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n\n if (code_points.length) {\n // If encoding is one of utf-8, utf-16be, and utf-16le, and\n // ignore BOM flag and BOM seen flag are unset, run these\n // subsubsteps:\n if (['utf-8'].indexOf(this.encoding) !== -1 &&\n !this._ignoreBOM && !this._BOMseen) {\n // If token is U+FEFF, set BOM seen flag.\n if (code_points[0] === 0xFEFF) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n // Otherwise, if token is not end-of-stream, set BOM seen\n // flag and append token to output.\n this._BOMseen = true;\n }\n }\n }\n\n return codePointsToString(code_points);\n }\n};\n\n// 7.2 Interface TextEncoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextEncoder(encoding, options) {\n if (!(this instanceof TextEncoder))\n return new TextEncoder(encoding, options);\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {?Encoder} */\n this._encoder = null;\n /** @private @type {{fatal: boolean}} */\n this._options = {fatal: Boolean(options['fatal'])};\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n}\n\nTextEncoder.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : '';\n options = ToDictionary(options);\n\n // NOTE: This option is nonstandard. None of the encodings\n // permitted for encoding (i.e. UTF-8, UTF-16) are stateful,\n // so streaming is not necessary.\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options['stream']);\n\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n /** @type {?(number|!Array.)} */\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n};\n\n//\n// 8. The encoding\n//\n\n// 8.1 utf-8\n\n/**\n * @constructor\n * @implements {Decoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Decoder(options) {\n var fatal = options.fatal;\n\n // utf-8's decoder's has an associated utf-8 code point, utf-8\n // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8\n // lower boundary (initially 0x80), and a utf-8 upper boundary\n // (initially 0xBF).\n var /** @type {number} */ utf8_code_point = 0,\n /** @type {number} */ utf8_bytes_seen = 0,\n /** @type {number} */ utf8_bytes_needed = 0,\n /** @type {number} */ utf8_lower_boundary = 0x80,\n /** @type {number} */ utf8_upper_boundary = 0xBF;\n\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point.\n */\n this.handler = function(stream, bite) {\n // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,\n // set utf-8 bytes needed to 0 and return error.\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n\n // 2. If byte is end-of-stream, return finished.\n if (bite === end_of_stream)\n return finished;\n\n // 3. If utf-8 bytes needed is 0, based on byte:\n if (utf8_bytes_needed === 0) {\n\n // 0x00 to 0x7F\n if (inRange(bite, 0x00, 0x7F)) {\n // Return a code point whose value is byte.\n return bite;\n }\n\n // 0xC2 to 0xDF\n if (inRange(bite, 0xC2, 0xDF)) {\n // Set utf-8 bytes needed to 1 and utf-8 code point to byte\n // − 0xC0.\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 0xC0;\n }\n\n // 0xE0 to 0xEF\n else if (inRange(bite, 0xE0, 0xEF)) {\n // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.\n if (bite === 0xE0)\n utf8_lower_boundary = 0xA0;\n // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.\n if (bite === 0xED)\n utf8_upper_boundary = 0x9F;\n // 3. Set utf-8 bytes needed to 2 and utf-8 code point to\n // byte − 0xE0.\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 0xE0;\n }\n\n // 0xF0 to 0xF4\n else if (inRange(bite, 0xF0, 0xF4)) {\n // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.\n if (bite === 0xF0)\n utf8_lower_boundary = 0x90;\n // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.\n if (bite === 0xF4)\n utf8_upper_boundary = 0x8F;\n // 3. Set utf-8 bytes needed to 3 and utf-8 code point to\n // byte − 0xF0.\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 0xF0;\n }\n\n // Otherwise\n else {\n // Return error.\n return decoderError(fatal);\n }\n\n // Then (byte is in the range 0xC2 to 0xF4) set utf-8 code\n // point to utf-8 code point << (6 × utf-8 bytes needed) and\n // return continue.\n utf8_code_point = utf8_code_point << (6 * utf8_bytes_needed);\n return null;\n }\n\n // 4. If byte is not in the range utf-8 lower boundary to utf-8\n // upper boundary, run these substeps:\n if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n\n // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8\n // bytes seen to 0, set utf-8 lower boundary to 0x80, and set\n // utf-8 upper boundary to 0xBF.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 2. Prepend byte to stream.\n stream.prepend(bite);\n\n // 3. Return error.\n return decoderError(fatal);\n }\n\n // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary\n // to 0xBF.\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 6. Increase utf-8 bytes seen by one and set utf-8 code point\n // to utf-8 code point + (byte − 0x80) << (6 × (utf-8 bytes\n // needed − utf-8 bytes seen)).\n utf8_bytes_seen += 1;\n utf8_code_point += (bite - 0x80) << (6 * (utf8_bytes_needed - utf8_bytes_seen));\n\n // 7. If utf-8 bytes seen is not equal to utf-8 bytes needed,\n // continue.\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n\n // 8. Let code point be utf-8 code point.\n var code_point = utf8_code_point;\n\n // 9. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes\n // seen to 0.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n\n // 10. Return a code point whose value is code point.\n return code_point;\n };\n}\n\n/**\n * @constructor\n * @implements {Encoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Encoder(options) {\n var fatal = options.fatal;\n /**\n * @param {Stream} stream Input stream.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit.\n */\n this.handler = function(stream, code_point) {\n // 1. If code point is end-of-stream, return finished.\n if (code_point === end_of_stream)\n return finished;\n\n // 2. If code point is in the range U+0000 to U+007F, return a\n // byte whose value is code point.\n if (inRange(code_point, 0x0000, 0x007f))\n return code_point;\n\n // 3. Set count and offset based on the range code point is in:\n var count, offset;\n // U+0080 to U+07FF: 1 and 0xC0\n if (inRange(code_point, 0x0080, 0x07FF)) {\n count = 1;\n offset = 0xC0;\n }\n // U+0800 to U+FFFF: 2 and 0xE0\n else if (inRange(code_point, 0x0800, 0xFFFF)) {\n count = 2;\n offset = 0xE0;\n }\n // U+10000 to U+10FFFF: 3 and 0xF0\n else if (inRange(code_point, 0x10000, 0x10FFFF)) {\n count = 3;\n offset = 0xF0;\n }\n\n // 4.Let bytes be a byte sequence whose first byte is (code\n // point >> (6 × count)) + offset.\n var bytes = [(code_point >> (6 * count)) + offset];\n\n // 5. Run these substeps while count is greater than 0:\n while (count > 0) {\n\n // 1. Set temp to code point >> (6 × (count − 1)).\n var temp = code_point >> (6 * (count - 1));\n\n // 2. Append to bytes 0x80 | (temp & 0x3F).\n bytes.push(0x80 | (temp & 0x3F));\n\n // 3. Decrease count by one.\n count -= 1;\n }\n\n // 6. Return bytes bytes, in order.\n return bytes;\n };\n}\n\nexports.TextEncoder = TextEncoder;\nexports.TextDecoder = TextDecoder;","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserializeUnchecked = exports.deserialize = exports.serialize = exports.BinaryReader = exports.BinaryWriter = exports.BorshError = exports.baseDecode = exports.baseEncode = void 0;\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst bs58_1 = __importDefault(require(\"bs58\"));\n// TODO: Make sure this polyfill not included when not required\nconst encoding = __importStar(require(\"text-encoding-utf-8\"));\nconst ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\nconst textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\nfunction baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer.from(value));\n}\nexports.baseEncode = baseEncode;\nfunction baseDecode(value) {\n return Buffer.from(bs58_1.default.decode(value));\n}\nexports.baseDecode = baseDecode;\nconst INITIAL_LENGTH = 1024;\nclass BorshError extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n // NOTE: Modifying message directly as jest doesn't use .toString()\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n}\nexports.BorshError = BorshError;\n/// Binary encoder.\nclass BinaryWriter {\n constructor() {\n this.buf = Buffer.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer.concat([this.buf, Buffer.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n // Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser\n this.buf = Buffer.concat([\n Buffer.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer.alloc(INITIAL_LENGTH),\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array) {\n this.writeBuffer(Buffer.from(array));\n }\n writeArray(array, fn) {\n this.maybeResize();\n this.writeU32(array.length);\n for (const elem of array) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n}\nexports.BinaryWriter = BinaryWriter;\nfunction handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function (...args) {\n try {\n return originalMethod.apply(this, args);\n }\n catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n}\nclass BinaryReader {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n // NOTE: Using TextDecoder to fail on invalid UTF-8\n return textDecoder.decode(buf);\n }\n catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n}\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU8\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU16\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU32\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU64\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU128\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU256\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU512\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readString\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readFixedArray\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readArray\", null);\nexports.BinaryReader = BinaryReader;\nfunction capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\nfunction serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n // TODO: Handle missing values properly (make sure they never result in just skipped write)\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n }\n else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n }\n else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n }\n else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n }\n else if (fieldType.kind !== undefined) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === undefined) {\n writer.writeU8(0);\n }\n else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n }\n else {\n serializeStruct(schema, value, writer);\n }\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n }\n else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n }\n else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n}\n/// Serialize given object using schema of the form:\n/// { class_name -> [ [field_name, field_type], .. ], .. }\nfunction serialize(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n}\nexports.serialize = serialize;\nfunction deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n }\n else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n }\n else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return undefined;\n }\n if (fieldType.kind === \"map\") {\n let map = new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n}\n/// Deserializes object from bytes using schema.\nfunction deserialize(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n}\nexports.deserialize = deserialize;\n/// Deserializes object from bytes using schema, without checking the length read\nfunction deserializeUnchecked(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n}\nexports.deserializeUnchecked = deserializeUnchecked;\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.s16 = exports.s8 = exports.nu64be = exports.u48be = exports.u40be = exports.u32be = exports.u24be = exports.u16be = exports.nu64 = exports.u48 = exports.u40 = exports.u32 = exports.u24 = exports.u16 = exports.u8 = exports.offset = exports.greedy = exports.Constant = exports.UTF8 = exports.CString = exports.Blob = exports.Boolean = exports.BitField = exports.BitStructure = exports.VariantLayout = exports.Union = exports.UnionLayoutDiscriminator = exports.UnionDiscriminator = exports.Structure = exports.Sequence = exports.DoubleBE = exports.Double = exports.FloatBE = exports.Float = exports.NearInt64BE = exports.NearInt64 = exports.NearUInt64BE = exports.NearUInt64 = exports.IntBE = exports.Int = exports.UIntBE = exports.UInt = exports.OffsetLayout = exports.GreedyCount = exports.ExternalLayout = exports.bindConstructorLayout = exports.nameWithProperty = exports.Layout = exports.uint8ArrayToBuffer = exports.checkUint8Array = void 0;\nexports.constant = exports.utf8 = exports.cstr = exports.blob = exports.unionLayoutDiscriminator = exports.union = exports.seq = exports.bits = exports.struct = exports.f64be = exports.f64 = exports.f32be = exports.f32 = exports.ns64be = exports.s48be = exports.s40be = exports.s32be = exports.s24be = exports.s16be = exports.ns64 = exports.s48 = exports.s40 = exports.s32 = exports.s24 = void 0;\nconst buffer_1 = require(\"buffer\");\n/* Check if a value is a Uint8Array.\n *\n * @ignore */\nfunction checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError('b must be a Uint8Array');\n }\n}\nexports.checkUint8Array = checkUint8Array;\n/* Create a Buffer instance from a Uint8Array.\n *\n * @ignore */\nfunction uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n}\nexports.uint8ArrayToBuffer = uint8ArrayToBuffer;\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nexports.Layout = Layout;\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nexports.nameWithProperty = nameWithProperty;\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\n// `Class` must be a constructor Function, but the assignment of a `layout_` property to it makes it difficult to type\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Object.prototype.hasOwnProperty.call(Class, 'layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (Object.prototype.hasOwnProperty.call(layout, 'boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nexports.bindConstructorLayout = bindConstructorLayout;\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\nexports.ExternalLayout = ExternalLayout;\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\nexports.GreedyCount = GreedyCount;\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n super(layout.span, property || layout.property);\n /** The subordinated layout. */\n this.layout = layout;\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Uint8Array\n * being accessed. */\n this.offset = offset;\n }\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n /** @override */\n decode(b, offset = 0) {\n return this.layout.decode(b, offset + this.offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\nexports.OffsetLayout = OffsetLayout;\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UInt = UInt;\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UIntBE = UIntBE;\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.Int = Int;\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.IntBE = IntBE;\nconst V2E32 = Math.pow(2, 32);\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return { hi32, lo32 };\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64 = NearUInt64;\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64BE = NearUInt64BE;\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64 = NearInt64;\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64BE = NearInt64BE;\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset);\n return 4;\n }\n}\nexports.Float = Float;\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset);\n return 4;\n }\n}\nexports.FloatBE = FloatBE;\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset);\n return 8;\n }\n}\nexports.Double = Double;\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset);\n return 8;\n }\n}\nexports.DoubleBE = DoubleBE;\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n super(span, property);\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n }\n else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\nexports.Sequence = Sequence;\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n }\n catch (e) {\n // ignore error\n }\n super(span, property);\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n }\n catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset = 0) {\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n }\n else if (0 <= offset) {\n offset += fd.span;\n }\n }\n return undefined;\n }\n}\nexports.Structure = Structure;\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\nexports.UnionDiscriminator = UnionDiscriminator;\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n super(property || layout.property || 'variant');\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\nexports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if ((discr instanceof UInt)\n || (discr instanceof UIntBE)) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n }\n else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n }\n else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n else {\n discriminator = discr;\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && ((discr instanceof UInt)\n || (discr instanceof UIntBE))) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discriminator;\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = (discr instanceof UInt)\n || (discr instanceof UIntBE);\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function (src) {\n return boundGetSourceVariant(src);\n };\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function (gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property\n && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)))) {\n return vlo;\n }\n }\n else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n const clo = this.registry[discr];\n if (undefined === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n // defaultLayout.property can be undefined, but this is allowed by buffer-layout\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n dest[defaultLayout.property] = defaultLayout.decode(b, offset + contentOffset);\n }\n else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset = 0) {\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n // this.defaultLayout is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n // clo.property is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return contentOffset + clo.encode(src[clo.property], b, offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset);\n }\n else {\n variant = vb;\n }\n return this.registry[variant];\n }\n}\nexports.Union = Union;\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n }\n else if (this.property) {\n dest[this.property] = true;\n }\n else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!Object.prototype.hasOwnProperty.call(src, this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return undefined;\n }\n}\nexports.VariantLayout = VariantLayout;\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function (v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function () {\n return value;\n };\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset = 0) {\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n}\nexports.BitStructure = BitStructure;\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n /** The span of this value in bits. */\n this.bits = bits;\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ('number' !== typeof value\n || !Number.isInteger(value)\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n }\n}\nexports.BitField = BitField;\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!super.decode(b, offset);\n }\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n super.encode(value);\n }\n}\nexports.Boolean = Boolean;\n/* eslint-enable no-extend-native */\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Uint8Array.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Uint8Array as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Uint8Array');\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\nexports.Blob = Blob;\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n return uint8ArrayToBuffer(b).slice(offset, offset + span - 1).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset);\n buffer[offset + span] = 0;\n return span + 1;\n }\n}\nexports.CString = CString;\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan) && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n }\n else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n super(-1, property);\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n return b.length - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(uint8ArrayToBuffer(b), offset);\n return span;\n }\n}\nexports.UTF8 = UTF8;\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n /** @override */\n decode(b, offset) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\nexports.Constant = Constant;\n/** Factory for {@link GreedyCount}. */\nexports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n/** Factory for {@link OffsetLayout}. */\nexports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nexports.u8 = ((property) => new UInt(1, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16 = ((property) => new UInt(2, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24 = ((property) => new UInt(3, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32 = ((property) => new UInt(4, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40 = ((property) => new UInt(5, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48 = ((property) => new UInt(6, property));\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64 = ((property) => new NearUInt64(property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16be = ((property) => new UIntBE(2, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24be = ((property) => new UIntBE(3, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32be = ((property) => new UIntBE(4, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40be = ((property) => new UIntBE(5, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48be = ((property) => new UIntBE(6, property));\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64be = ((property) => new NearUInt64BE(property));\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nexports.s8 = ((property) => new Int(1, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nexports.s16 = ((property) => new Int(2, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nexports.s24 = ((property) => new Int(3, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nexports.s32 = ((property) => new Int(4, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nexports.s40 = ((property) => new Int(5, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nexports.s48 = ((property) => new Int(6, property));\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64 = ((property) => new NearInt64(property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nexports.s16be = ((property) => new IntBE(2, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nexports.s24be = ((property) => new IntBE(3, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nexports.s32be = ((property) => new IntBE(4, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nexports.s40be = ((property) => new IntBE(5, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nexports.s48be = ((property) => new IntBE(6, property));\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64be = ((property) => new NearInt64BE(property));\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nexports.f32 = ((property) => new Float(property));\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nexports.f32be = ((property) => new FloatBE(property));\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nexports.f64 = ((property) => new Double(property));\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nexports.f64be = ((property) => new DoubleBE(property));\n/** Factory for {@link Structure} values. */\nexports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n/** Factory for {@link BitStructure} values. */\nexports.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n/** Factory for {@link Sequence} values. */\nexports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n/** Factory for {@link Union} values. */\nexports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nexports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n/** Factory for {@link Blob} values. */\nexports.blob = ((length, property) => new Blob(length, property));\n/** Factory for {@link CString} values. */\nexports.cstr = ((property) => new CString(property));\n/** Factory for {@link UTF8} values. */\nexports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n/** Factory for {@link Constant} values. */\nexports.constant = ((value, property) => new Constant(value, property));\n//# sourceMappingURL=Layout.js.map","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","const END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';\n\n/**\n * Delegates to `Array#shift`, but throws if the array is zero-length.\n */\nexport function guardedShift(byteArray: T[]): T {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift() as T;\n}\n\n/**\n * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of\n * the array.\n */\nexport function guardedSplice(\n byteArray: T[],\n ...args:\n | [start: number, deleteCount?: number]\n | [start: number, deleteCount: number, ...items: T[]]\n): T[] {\n const [start] = args;\n if (\n args.length === 2 // Implies that `deleteCount` was supplied\n ? start + (args[1] ?? 0) > byteArray.length\n : start >= byteArray.length\n ) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(\n ...(args as Parameters),\n );\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = guardedShift(byteArray);\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray),\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(\n byteArray,\n 0,\n accountKeyIndexesLength,\n );\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = guardedSplice(\n byteArray,\n 0,\n writableIndexesLength,\n );\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(\n byteArray,\n 0,\n readonlyIndexesLength,\n );\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet converter;\n/**\n * Convert a little-endian buffer into a BigInt.\n * @param buf The little-endian buffer to convert\n * @returns A BigInt with the little-endian representation of buf.\n */\nfunction toBigIntLE(buf) {\n {\n const reversed = Buffer.from(buf);\n reversed.reverse();\n const hex = reversed.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, false);\n}\nexports.toBigIntLE = toBigIntLE;\n/**\n * Convert a big-endian buffer into a BigInt\n * @param buf The big-endian buffer to convert.\n * @returns A BigInt with the big-endian representation of buf.\n */\nfunction toBigIntBE(buf) {\n {\n const hex = buf.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, true);\n}\nexports.toBigIntBE = toBigIntBE;\n/**\n * Convert a BigInt to a little-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A little-endian buffer representation of num.\n */\nfunction toBufferLE(num, width) {\n {\n const hex = num.toString(16);\n const buffer = Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n buffer.reverse();\n return buffer;\n }\n // Allocation is done here, since it is slower using napi in C\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);\n}\nexports.toBufferLE = toBufferLE;\n/**\n * Convert a BigInt to a big-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A big-endian buffer representation of num.\n */\nfunction toBufferBE(num, width) {\n {\n const hex = num.toString(16);\n return Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n }\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), true);\n}\nexports.toBufferBE = toBufferBE;\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a plain object.\n */\n\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options = {}) {\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const schemas = Structs.map(s => s.schema);\n const schema = Object.assign({}, ...schemas);\n return object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\n\nfunction deprecated(struct, log) {\n return new Struct({ ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n } else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n }\n\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\n\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\n\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n\n *entries(value, ctx) {\n var _struct;\n\n (_struct = struct) != null ? _struct : struct = fn();\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n var _struct2;\n\n (_struct2 = struct) != null ? _struct2 : struct = fn();\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n var _struct3;\n\n (_struct3 = struct) != null ? _struct3 : struct = fn();\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\n\nfunction omit(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = { ...schema\n };\n\n for (const key of keys) {\n delete subschema[key];\n }\n\n return object(subschema);\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\n\nfunction partial(struct) {\n const schema = struct instanceof Struct ? { ...struct.schema\n } : { ...struct\n };\n\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\n\nfunction pick(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = {};\n\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n\n return object(subschema);\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\n\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\n\nfunction date() {\n return define('date', value => {\n return value instanceof Date && !isNaN(value.getTime()) || \"Expected a valid `Date` object, but received: \" + print(value);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map(v => print(v)).join();\n\n for (const key of values) {\n schema[key] = key;\n }\n\n return new Struct({\n type: 'enums',\n schema,\n\n validator(value) {\n return values.includes(value) || \"Expected one of `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a function.\n */\n\nfunction func() {\n return define('func', value => {\n return typeof value === 'function' || \"Expected a function, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\n\nfunction instance(Class) {\n return define('instance', value => {\n return value instanceof Class || \"Expected a `\" + Class.name + \"` instance, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\n\nfunction integer() {\n return define('integer', value => {\n return typeof value === 'number' && !isNaN(value) && Number.isInteger(value) || \"Expected an integer, but received: \" + print(value);\n });\n}\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n }\n\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n\n validator(value) {\n return value instanceof Map || \"Expected a `Map` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\n\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n },\n\n coercer(value) {\n return isObject(value) ? { ...value\n } : value;\n }\n\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\n\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\n\nfunction regexp() {\n return define('regexp', value => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n\n validator(value) {\n return value instanceof Set || \"Expected a `Set` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\nfunction tuple(Elements) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Elements.length, value.length);\n\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Elements[i] || Never];\n }\n }\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\nfunction union(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), x => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n\n if (x === undefined) {\n return f;\n }\n\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x\n };\n let changed = false;\n\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n\n if (changed) {\n return ret;\n }\n }\n\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction trimmed(struct) {\n return coerce(struct, string(), x => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\n\nfunction empty(struct) {\n const expected = \"Expected an empty \" + struct.type;\n return refine(struct, 'empty', value => {\n if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return size === 0 || expected + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return length === 0 || expected + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\n\nfunction max(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'max', value => {\n return exclusive ? value < threshold : value <= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\n\nfunction min(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'min', value => {\n return exclusive ? value > threshold : value >= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\n\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', value => {\n return regexp.test(value) || \"Expected a \" + struct.type + \" matching `/\" + regexp.source + \"/` but received \\\"\" + value + \"\\\"\";\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\n\nfunction size(struct, min, max = min) {\n const expected = \"Expected a \" + struct.type;\n const of = min === max ? \"of `\" + min + \"`\" : \"between `\" + min + \"` and `\" + max + \"`\";\n return refine(struct, 'size', value => {\n if (typeof value === 'number' || value instanceof Date) {\n return min <= value && value <= max || expected + \" \" + of + \" but received `\" + value + \"`\";\n } else if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return min <= size && size <= max || expected + \" with a size \" + of + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return min <= length && length <= max || expected + \" with a length \" + of + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\n\nfunction refine(struct, name, refiner) {\n return new Struct({ ...struct,\n\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n\n for (const failure of failures) {\n yield { ...failure,\n refinement: name\n };\n }\n }\n\n });\n}\n\nexport { Struct, StructError, any, array, assert, assign, boolean, coerce, create, date, defaulted, define, deprecated, dynamic, empty, enums, func, instance, integer, intersection, is, lazy, literal, map, mask, max, min, never, nullable, number, object, omit, optional, partial, pattern, pick, record, refine, regexp, set, size, string, struct, trimmed, tuple, type, union, unknown, validate };\n//# sourceMappingURL=index.es.js.map\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","'use strict';\n\nconst uuid = require('uuid').v4;\n\n/**\n * Generates a JSON-RPC 1.0 or 2.0 request\n * @param {String} method Name of method to call\n * @param {Array|Object} params Array of parameters passed to the method as specified, or an object of parameter names and corresponding value\n * @param {String|Number|null} [id] Request ID can be a string, number, null for explicit notification or left out for automatic generation\n * @param {Object} [options]\n * @param {Number} [options.version=2] JSON-RPC version to use (1 or 2)\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @param {Function} [options.generator] Passed the request, and the options object and is expected to return a request ID\n * @throws {TypeError} If any of the parameters are invalid\n * @return {Object} A JSON-RPC 1.0 or 2.0 request\n * @memberOf Utils\n */\nconst generateRequest = function(method, params, id, options) {\n if(typeof method !== 'string') {\n throw new TypeError(method + ' must be a string');\n }\n\n options = options || {};\n\n // check valid version provided\n const version = typeof options.version === 'number' ? options.version : 2;\n if (version !== 1 && version !== 2) {\n throw new TypeError(version + ' must be 1 or 2');\n }\n\n const request = {\n method: method\n };\n\n if(version === 2) {\n request.jsonrpc = '2.0';\n }\n\n if(params) {\n // params given, but invalid?\n if(typeof params !== 'object' && !Array.isArray(params)) {\n throw new TypeError(params + ' must be an object, array or omitted');\n }\n request.params = params;\n }\n\n // if id was left out, generate one (null means explicit notification)\n if(typeof(id) === 'undefined') {\n const generator = typeof options.generator === 'function' ? options.generator : function() { return uuid(); };\n request.id = generator(request, options);\n } else if (version === 2 && id === null) {\n // we have a version 2 notification\n if (options.notificationIdNull) {\n request.id = null; // id will not be set at all unless option provided\n }\n } else {\n request.id = id;\n }\n\n return request;\n};\n\nmodule.exports = generateRequest;\n","'use strict';\n\nconst uuid = require('uuid').v4;\nconst generateRequest = require('../../generateRequest');\n\n/**\n * Constructor for a Jayson Browser Client that does not depend any node.js core libraries\n * @class ClientBrowser\n * @param {Function} callServer Method that calls the server, receives the stringified request and a regular node-style callback\n * @param {Object} [options]\n * @param {Function} [options.reviver] Reviver function for JSON\n * @param {Function} [options.replacer] Replacer function for JSON\n * @param {Number} [options.version=2] JSON-RPC version to use (1|2)\n * @param {Function} [options.generator] Function to use for generating request IDs\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @return {ClientBrowser}\n */\nconst ClientBrowser = function(callServer, options) {\n if(!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n\n if (!options) {\n options = {};\n }\n\n this.options = {\n reviver: typeof options.reviver !== 'undefined' ? options.reviver : null,\n replacer: typeof options.replacer !== 'undefined' ? options.replacer : null,\n generator: typeof options.generator !== 'undefined' ? options.generator : function() { return uuid(); },\n version: typeof options.version !== 'undefined' ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === 'boolean' ? options.notificationIdNull : false,\n };\n\n this.callServer = callServer;\n};\n\nmodule.exports = ClientBrowser;\n\n/**\n * Creates a request and dispatches it if given a callback.\n * @param {String|Array} method A batch request if passed an Array, or a method name if passed a String\n * @param {Array|Object} [params] Parameters for the method\n * @param {String|Number} [id] Optional id. If undefined an id will be generated. If null it creates a notification request\n * @param {Function} [callback] Request callback. If specified, executes the request rather than only returning it.\n * @throws {TypeError} Invalid parameters\n * @return {Object} JSON-RPC 1.0 or 2.0 compatible request\n */\nClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n\n // is this a batch request?\n const isBatch = Array.isArray(method) && typeof params === 'function';\n\n if (this.options.version === 1 && isBatch) {\n throw new TypeError('JSON-RPC 1.0 does not support batching');\n }\n\n // is this a raw request?\n const isRaw = !isBatch && method && typeof method === 'object' && typeof params === 'function';\n\n if(isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if(typeof id === 'function') {\n callback = id;\n // specifically undefined because \"null\" is a notification request\n id = undefined;\n }\n\n const hasCallback = typeof callback === 'function';\n\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull,\n });\n } catch(err) {\n if(hasCallback) {\n return callback(err);\n }\n throw err;\n }\n\n // no callback means we should just return a raw request\n if(!hasCallback) {\n return request;\n }\n\n }\n\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch(err) {\n return callback(err);\n }\n\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n\n // always return the raw request\n return request;\n};\n\n/**\n * Parses a response from a server\n * @param {Object} err Error to pass on that is unrelated to the actual response\n * @param {String} responseText JSON-RPC 1.0 or 2.0 response\n * @param {Function} callback Callback that will receive different arguments depending on the amount of parameters\n * @private\n */\nClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if(err) {\n callback(err);\n return;\n }\n\n if(!responseText) {\n // empty response text, assume that is correct because it could be a\n // notification which jayson does not give any body for\n return callback();\n }\n\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch(err) {\n return callback(err);\n }\n\n if(callback.length === 3) {\n // if callback length is 3, we split callback arguments on error and response\n\n // is batch response?\n if(Array.isArray(response)) {\n\n // neccesary to split strictly on validity according to spec here\n const isError = function(res) {\n return typeof res.error !== 'undefined';\n };\n\n const isNotError = function (res) {\n return !isError(res);\n };\n\n return callback(null, response.filter(isError), response.filter(isNotError));\n \n } else {\n\n // split regardless of validity\n return callback(null, response.error, response.result);\n \n }\n \n }\n\n callback(null, response);\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","export const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport default globalThis.fetch;\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) keys.push(key);\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * \"Client\" wraps \"ws\" or a browser-implemented \"WebSocket\" library\n * according to the environment providing JSON RPC 2.0 support on top.\n * @module Client\n */\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime/regenerator\"));\n\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime/helpers/asyncToGenerator\"));\n\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _eventemitter = require(\"eventemitter3\");\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}; // @ts-ignore\n\n\nvar CommonClient = /*#__PURE__*/function (_EventEmitter) {\n (0, _inherits2[\"default\"])(CommonClient, _EventEmitter);\n\n var _super = _createSuper(CommonClient);\n\n /**\n * Instantiate a Client class.\n * @constructor\n * @param {webSocketFactory} webSocketFactory - factory method for WebSocket\n * @param {String} address - url to a websocket server\n * @param {Object} options - ws options object with reconnect parameters\n * @param {Function} generate_request_id - custom generation request Id\n * @return {CommonClient}\n */\n function CommonClient(webSocketFactory) {\n var _this;\n\n var address = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"ws://localhost:8080\";\n\n var _a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var generate_request_id = arguments.length > 3 ? arguments[3] : undefined;\n (0, _classCallCheck2[\"default\"])(this, CommonClient);\n\n var _a$autoconnect = _a.autoconnect,\n autoconnect = _a$autoconnect === void 0 ? true : _a$autoconnect,\n _a$reconnect = _a.reconnect,\n reconnect = _a$reconnect === void 0 ? true : _a$reconnect,\n _a$reconnect_interval = _a.reconnect_interval,\n reconnect_interval = _a$reconnect_interval === void 0 ? 1000 : _a$reconnect_interval,\n _a$max_reconnects = _a.max_reconnects,\n max_reconnects = _a$max_reconnects === void 0 ? 5 : _a$max_reconnects,\n rest_options = __rest(_a, [\"autoconnect\", \"reconnect\", \"reconnect_interval\", \"max_reconnects\"]);\n\n _this = _super.call(this);\n _this.webSocketFactory = webSocketFactory;\n _this.queue = {};\n _this.rpc_id = 0;\n _this.address = address;\n _this.autoconnect = autoconnect;\n _this.ready = false;\n _this.reconnect = reconnect;\n _this.reconnect_timer_id = undefined;\n _this.reconnect_interval = reconnect_interval;\n _this.max_reconnects = max_reconnects;\n _this.rest_options = rest_options;\n _this.current_reconnects = 0;\n\n _this.generate_request_id = generate_request_id || function () {\n return ++_this.rpc_id;\n };\n\n if (_this.autoconnect) _this._connect(_this.address, Object.assign({\n autoconnect: _this.autoconnect,\n reconnect: _this.reconnect,\n reconnect_interval: _this.reconnect_interval,\n max_reconnects: _this.max_reconnects\n }, _this.rest_options));\n return _this;\n }\n /**\n * Connects to a defined server if not connected already.\n * @method\n * @return {Undefined}\n */\n\n\n (0, _createClass2[\"default\"])(CommonClient, [{\n key: \"connect\",\n value: function connect() {\n if (this.socket) return;\n\n this._connect(this.address, Object.assign({\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects\n }, this.rest_options));\n }\n /**\n * Calls a registered RPC method on server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object|Array} params - optional method parameters\n * @param {Number} timeout - RPC reply timeout value\n * @param {Object} ws_opts - options passed to ws\n * @return {Promise}\n */\n\n }, {\n key: \"call\",\n value: function call(method, params, timeout, ws_opts) {\n var _this2 = this;\n\n if (!ws_opts && \"object\" === (0, _typeof2[\"default\"])(timeout)) {\n ws_opts = timeout;\n timeout = null;\n }\n\n return new Promise(function (resolve, reject) {\n if (!_this2.ready) return reject(new Error(\"socket not ready\"));\n\n var rpc_id = _this2.generate_request_id(method, params);\n\n var message = {\n jsonrpc: \"2.0\",\n method: method,\n params: params || null,\n id: rpc_id\n };\n\n _this2.socket.send(JSON.stringify(message), ws_opts, function (error) {\n if (error) return reject(error);\n _this2.queue[rpc_id] = {\n promise: [resolve, reject]\n };\n\n if (timeout) {\n _this2.queue[rpc_id].timeout = setTimeout(function () {\n delete _this2.queue[rpc_id];\n reject(new Error(\"reply timeout\"));\n }, timeout);\n }\n });\n });\n }\n /**\n * Logins with the other side of the connection.\n * @method\n * @param {Object} params - Login credentials object\n * @return {Promise}\n */\n\n }, {\n key: \"login\",\n value: function () {\n var _login = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee(params) {\n var resp;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return this.call(\"rpc.login\", params);\n\n case 2:\n resp = _context.sent;\n\n if (resp) {\n _context.next = 5;\n break;\n }\n\n throw new Error(\"authentication failed\");\n\n case 5:\n return _context.abrupt(\"return\", resp);\n\n case 6:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function login(_x) {\n return _login.apply(this, arguments);\n }\n\n return login;\n }()\n /**\n * Fetches a list of client's methods registered on server.\n * @method\n * @return {Array}\n */\n\n }, {\n key: \"listMethods\",\n value: function () {\n var _listMethods = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2() {\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return this.call(\"__listMethods\");\n\n case 2:\n return _context2.abrupt(\"return\", _context2.sent);\n\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function listMethods() {\n return _listMethods.apply(this, arguments);\n }\n\n return listMethods;\n }()\n /**\n * Sends a JSON-RPC 2.0 notification to server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object} params - optional method parameters\n * @return {Promise}\n */\n\n }, {\n key: \"notify\",\n value: function notify(method, params) {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n if (!_this3.ready) return reject(new Error(\"socket not ready\"));\n var message = {\n jsonrpc: \"2.0\",\n method: method,\n params: params || null\n };\n\n _this3.socket.send(JSON.stringify(message), function (error) {\n if (error) return reject(error);\n resolve();\n });\n });\n }\n /**\n * Subscribes for a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"subscribe\",\n value: function () {\n var _subscribe = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee3(event) {\n var result;\n return _regenerator[\"default\"].wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n if (typeof event === \"string\") event = [event];\n _context3.next = 3;\n return this.call(\"rpc.on\", event);\n\n case 3:\n result = _context3.sent;\n\n if (!(typeof event === \"string\" && result[event] !== \"ok\")) {\n _context3.next = 6;\n break;\n }\n\n throw new Error(\"Failed subscribing to an event '\" + event + \"' with: \" + result[event]);\n\n case 6:\n return _context3.abrupt(\"return\", result);\n\n case 7:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function subscribe(_x2) {\n return _subscribe.apply(this, arguments);\n }\n\n return subscribe;\n }()\n /**\n * Unsubscribes from a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"unsubscribe\",\n value: function () {\n var _unsubscribe = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee4(event) {\n var result;\n return _regenerator[\"default\"].wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n if (typeof event === \"string\") event = [event];\n _context4.next = 3;\n return this.call(\"rpc.off\", event);\n\n case 3:\n result = _context4.sent;\n\n if (!(typeof event === \"string\" && result[event] !== \"ok\")) {\n _context4.next = 6;\n break;\n }\n\n throw new Error(\"Failed unsubscribing from an event with: \" + result);\n\n case 6:\n return _context4.abrupt(\"return\", result);\n\n case 7:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function unsubscribe(_x3) {\n return _unsubscribe.apply(this, arguments);\n }\n\n return unsubscribe;\n }()\n /**\n * Closes a WebSocket connection gracefully.\n * @method\n * @param {Number} code - socket close code\n * @param {String} data - optional data to be sent before closing\n * @return {Undefined}\n */\n\n }, {\n key: \"close\",\n value: function close(code, data) {\n this.socket.close(code || 1000, data);\n }\n /**\n * Connection/Message handler.\n * @method\n * @private\n * @param {String} address - WebSocket API address\n * @param {Object} options - ws options object\n * @return {Undefined}\n */\n\n }, {\n key: \"_connect\",\n value: function _connect(address, options) {\n var _this4 = this;\n\n clearTimeout(this.reconnect_timer_id);\n this.socket = this.webSocketFactory(address, options);\n this.socket.addEventListener(\"open\", function () {\n _this4.ready = true;\n\n _this4.emit(\"open\");\n\n _this4.current_reconnects = 0;\n });\n this.socket.addEventListener(\"message\", function (_ref) {\n var message = _ref.data;\n if (message instanceof ArrayBuffer) message = Buffer.from(message).toString();\n\n try {\n message = JSON.parse(message);\n } catch (error) {\n return;\n } // check if any listeners are attached and forward event\n\n\n if (message.notification && _this4.listeners(message.notification).length) {\n if (!Object.keys(message.params).length) return _this4.emit(message.notification);\n var args = [message.notification];\n if (message.params.constructor === Object) args.push(message.params);else // using for-loop instead of unshift/spread because performance is better\n for (var i = 0; i < message.params.length; i++) {\n args.push(message.params[i]);\n } // run as microtask so that pending queue messages are resolved first\n // eslint-disable-next-line prefer-spread\n\n return Promise.resolve().then(function () {\n _this4.emit.apply(_this4, args);\n });\n }\n\n if (!_this4.queue[message.id]) {\n // general JSON RPC 2.0 events\n if (message.method && message.params) {\n // run as microtask so that pending queue messages are resolved first\n return Promise.resolve().then(function () {\n _this4.emit(message.method, message.params);\n });\n }\n\n return;\n } // reject early since server's response is invalid\n\n\n if (\"error\" in message === \"result\" in message) _this4.queue[message.id].promise[1](new Error(\"Server response malformed. Response must include either \\\"result\\\"\" + \" or \\\"error\\\", but not both.\"));\n if (_this4.queue[message.id].timeout) clearTimeout(_this4.queue[message.id].timeout);\n if (message.error) _this4.queue[message.id].promise[1](message.error);else _this4.queue[message.id].promise[0](message.result);\n delete _this4.queue[message.id];\n });\n this.socket.addEventListener(\"error\", function (error) {\n return _this4.emit(\"error\", error);\n });\n this.socket.addEventListener(\"close\", function (_ref2) {\n var code = _ref2.code,\n reason = _ref2.reason;\n if (_this4.ready) // Delay close event until internal state is updated\n setTimeout(function () {\n return _this4.emit(\"close\", code, reason);\n }, 0);\n _this4.ready = false;\n _this4.socket = undefined;\n if (code === 1000) return;\n _this4.current_reconnects++;\n if (_this4.reconnect && (_this4.max_reconnects > _this4.current_reconnects || _this4.max_reconnects === 0)) _this4.reconnect_timer_id = setTimeout(function () {\n return _this4._connect(address, options);\n }, _this4.reconnect_interval);\n });\n }\n }]);\n return CommonClient;\n}(_eventemitter.EventEmitter);\n\nexports[\"default\"] = CommonClient;","/**\n * WebSocket implements a browser-side WebSocket specification.\n * @module Client\n */\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = _default;\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _eventemitter = require(\"eventemitter3\");\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar WebSocketBrowserImpl = /*#__PURE__*/function (_EventEmitter) {\n (0, _inherits2[\"default\"])(WebSocketBrowserImpl, _EventEmitter);\n\n var _super = _createSuper(WebSocketBrowserImpl);\n\n /** Instantiate a WebSocket class\n * @constructor\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @param {(String|Array)} protocols - a list of protocols\n * @return {WebSocketBrowserImpl} - returns a WebSocket instance\n */\n function WebSocketBrowserImpl(address, options, protocols) {\n var _this;\n\n (0, _classCallCheck2[\"default\"])(this, WebSocketBrowserImpl);\n _this = _super.call(this);\n _this.socket = new window.WebSocket(address, protocols);\n\n _this.socket.onopen = function () {\n return _this.emit(\"open\");\n };\n\n _this.socket.onmessage = function (event) {\n return _this.emit(\"message\", event.data);\n };\n\n _this.socket.onerror = function (error) {\n return _this.emit(\"error\", error);\n };\n\n _this.socket.onclose = function (event) {\n _this.emit(\"close\", event.code, event.reason);\n };\n\n return _this;\n }\n /**\n * Sends data through a websocket connection\n * @method\n * @param {(String|Object)} data - data to be sent via websocket\n * @param {Object} optionsOrCallback - ws options\n * @param {Function} callback - a callback called once the data is sent\n * @return {Undefined}\n */\n\n\n (0, _createClass2[\"default\"])(WebSocketBrowserImpl, [{\n key: \"send\",\n value: function send(data, optionsOrCallback, callback) {\n var cb = callback || optionsOrCallback;\n\n try {\n this.socket.send(data);\n cb();\n } catch (error) {\n cb(error);\n }\n }\n /**\n * Closes an underlying socket\n * @method\n * @param {Number} code - status code explaining why the connection is being closed\n * @param {String} reason - a description why the connection is closing\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"close\",\n value: function close(code, reason) {\n this.socket.close(code, reason);\n }\n }, {\n key: \"addEventListener\",\n value: function addEventListener(type, listener, options) {\n this.socket.addEventListener(type, listener, options);\n }\n }]);\n return WebSocketBrowserImpl;\n}(_eventemitter.EventEmitter);\n/**\n * factory method for common WebSocket instance\n * @method\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @return {Undefined}\n */\n\n\nfunction _default(address, options) {\n return new WebSocketBrowserImpl(address, options);\n}","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","const U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nexport function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nexport function split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nexport const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (h, l) => l;\nconst rotr32L = (h, l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\n// Removing \"export\" has 5% perf penalty -_-\nexport function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import assert from './_assert.js';\nimport u64 from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, } from './utils.js';\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _7n = BigInt(7);\nconst _256n = BigInt(256);\nconst _0x71n = BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = u64.split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => s > 32 ? u64.rotlBH(h, l, s) : u64.rotlSH(h, l, s);\nconst rotlL = (h, l, s) => s > 32 ? u64.rotlBL(h, l, s) : u64.rotlSL(h, l, s);\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n assert.number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n assert.exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n assert.exists(this, false);\n assert.bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n assert.number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n assert.output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = gen(0x06, 136, 256 / 8);\nexport const sha3_384 = gen(0x06, 104, 384 / 8);\nexport const sha3_512 = gen(0x06, 72, 512 / 8);\nexport const keccak_224 = gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = gen(0x01, 136, 256 / 8);\nexport const keccak_384 = gen(0x01, 104, 384 / 8);\nexport const keccak_512 = gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = genShake(0x1f, 168, 128 / 8);\nexport const shake256 = genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = wrapConstructor(() => new SHA256());\nexport const sha224 = wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error('ui8a expected');\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((c, point, isCompressed) => {\n const a = point.toAffine();\n return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n // Zero is valid point too!\n if (this.is0()) {\n if (CURVE.allowInfinityPoint)\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, _3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, _3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === _0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === _1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return mod.mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return mod.invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n const isYOdd = (y & _1n) === _1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size (nBitLength+64)\n * as per FIPS 186 B.4.1 with modulo bias being neglible.\n */\n randomPrivateKey: () => {\n const rand = CURVE.randomBytes(Fp.BYTES + 8);\n const num = mod.hashToPrivateScalar(rand, CURVE_ORDER);\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(ensureBytes('extraEntropy', e, Fp.BYTES)); // check for being of size BYTES\n }\n const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === _0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === _0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash (not message: you need to hash it by yourself).\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param opts `lowS, extraEntropy, prehash`\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const drbg = ut.createHmacDrbg(CURVE.hash.outputLen, CURVE.nByteLength, CURVE.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes('msgHash', msgHash);\n publicKey = ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || sg instanceof Uint8Array) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n// Implementation of the Shallue and van de Woestijne method for any Weierstrass curve\n// TODO: check if there is a way to merge this with uvRatio in Edwards && move to modular?\n// b = True and y = sqrt(u / v) if (u / v) is square in F, and\n// b = False and y = sqrt(Z * (u / v)) otherwise.\nexport function SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = _0n;\n for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n l += _1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n const c2 = (q - _1n) / _2n ** c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n ** c1 - _1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n ** (c1 - _1n); // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > _1n; i--) {\n let tv5 = _2n ** (i - _2n); // 18. tv5 = i - 2; 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n === _3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n// From draft-irtf-cfrg-hash-to-curve-16\nexport function mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map","import assert from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nclass HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assert.hash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new TypeError('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assert.exists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.bytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n return {\n hash,\n hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n randomBytes,\n };\n}\nexport function createCurve(curveDef, defHash) {\n const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport * as htf from './abstract/hash-to-curve.js';\nimport { createCurve } from './_shortw_utils.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N,\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = {\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n};\nconst isoMap = htf.isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j))));\nconst mapSWU = mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n});\nexport const { hashToCurve, encodeToCurve } = htf.createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n});\n//# sourceMappingURL=secp256k1.js.map","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\nimport {guardedShift, guardedSplice} from './utils/guarded-array-utils';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["i","require$$0","ieee754","require$$1","number","bool","bytes","hash","exists","output","assert","crypto","createView","rotr","isLE","utf8ToBytes","toBytes","concatBytes","wrapConstructor","setBigUint64","Hash","U32_MASK64","_32n","fromBig","split","toBig","shrSH","shrSL","rotrSH","rotrSL","rotrBH","rotrBL","rotr32H","rotr32L","rotlSH","rotlSL","rotlBH","rotlBL","add","add3L","add3H","add4L","add4H","add5L","add5H","u64","SHA2","_0n","_1n","_2n","u8a","_3n","_4n","_5n","_8n","validateOpts","ut.validateObject","ut.bytesToNumberLE","ut.numberToBytesLE","ut.bytesToHex","ut.concatBytes","Fp","htf.createHasher","generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","this","u32","Chi","Maj","SHA256_K","IV","SHA256_W","SHA256","sha256","SHA224","TextDecoder","TextEncoder","require$$2","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","Layout_1","Boolean","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","rustString","rsl","_decode","bind","_encode","rslShim","offset","str","chars","span","authorized","lockup","voteInit","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","END_OF_BUFFER_ERROR_MESSAGE","guardedShift","byteArray","guardedSplice","_args$","_len","args","_key","start","splice","Message","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","accountCount","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","items","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","browser","encodeDecode","bigInt","blob","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","validate","uuid","generateRequest","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","fetchWithMiddleware","info","init","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ut.bytesToNumberBE","mod.mod","mod.invert","ut.numberToBytesBE","ut.hexToBytes","mod.hashToPrivateScalar","ut.bitMask","ut.createHmacDrbg","mod.validateField","htf.isogenyMap","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAA2B,MAAA,CACMgE,SAAS,EAAAhE,WAAAA,CAAAA,CAAAA,MAAA,CAAYqV,IAAI,CAACC,SAAS,CAAC0G,MAAM,CAAC,MAChE,CAAC,CAAA;EAAA,QAAA,KAAA,EAAA;EAAA,UAAA,OAAAlb,QAAA,CAAAG,MAAA,CAAA,QAAA,EAGI+C,SAAS,CAAA,CAAA;EAAA,QAAA,KAAA,EAAA,CAAA;EAAA,QAAA,KAAA,KAAA;YAAA,OAAAlD,QAAA,CAAAI,IAAA,EAAA,CAAA;EAAA,OAAA;EAAA,KAAA,EAAAX,OAAA,CAAA,CAAA;KACjB,CAAA,CAAA,CAAA;EAAA,EAAA,OAAA6+D,6BAAA,CAAA79D,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;EAAA;;ECjFD;EACA;EACA;AACO,MAAMg+D,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18,19,20,21,22,23,24,25,26,27,32,54,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,106,107,108,109,110,111,112]} -\ No newline at end of file -diff --git a/lib/index.iife.min.js b/lib/index.iife.min.js -index 1c0af5a3196c66090fee75cfac7a42fd0d4bec0e..03194d9f443c6041a10baf3d0c403e890568ebcc 100644 ---- a/lib/index.iife.min.js -+++ b/lib/index.iife.min.js -@@ -14,8 +14,8 @@ var solanaWeb3=function(exports){"use strict";function _iterableToArrayLimit(arr - /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$4=BigInt(0);const _1n$4=BigInt(1);function validateOpts$1(curve){validateObject(curve,{a:"bigint"},{montgomeryBits:"isSafeInteger",nByteLength:"isSafeInteger",adjustScalarBytes:"function",domain:"function",powPminus2:"function",Gu:"bigint"});return Object.freeze({...curve})}function montgomery(curveDef){const CURVE=validateOpts$1(curveDef);const{P:P}=CURVE;const modP=n=>mod(n,P);const montgomeryBits=CURVE.montgomeryBits;const montgomeryBytes=Math.ceil(montgomeryBits/8);const fieldLen=CURVE.nByteLength;const adjustScalarBytes=CURVE.adjustScalarBytes||(bytes=>bytes);const powPminus2=CURVE.powPminus2||(x=>pow(x,P-BigInt(2),P));function cswap(swap,x_2,x_3){const dummy=modP(swap*(x_2-x_3));x_2=modP(x_2-dummy);x_3=modP(x_3+dummy);return[x_2,x_3]}function assertFieldElement(n){if(typeof n==="bigint"&&_0n$4<=n&&n=_0n$4;t--){const k_t=k>>t&_1n$4;swap^=k_t;sw=cswap(swap,x_2,x_3);x_2=sw[0];x_3=sw[1];sw=cswap(swap,z_2,z_3);z_2=sw[0];z_3=sw[1];swap=k_t;const A=x_2+z_2;const AA=modP(A*A);const B=x_2-z_2;const BB=modP(B*B);const E=AA-BB;const C=x_3+z_3;const D=x_3-z_3;const DA=modP(D*A);const CB=modP(C*B);const dacb=DA+CB;const da_cb=DA-CB;x_3=modP(dacb*dacb);z_3=modP(x_1*modP(da_cb*da_cb));x_2=modP(AA*BB);z_2=modP(E*(AA+modP(a24*E)))}sw=cswap(swap,x_2,x_3);x_2=sw[0];x_3=sw[1];sw=cswap(swap,z_2,z_3);z_2=sw[0];z_3=sw[1];const z2=powPminus2(z_2);return modP(x_2*z2)}function encodeUCoordinate(u){return numberToBytesLE(modP(u),montgomeryBytes)}function decodeUCoordinate(uEnc){const u=ensureBytes("u coordinate",uEnc,montgomeryBytes);if(fieldLen===montgomeryBytes)u[fieldLen-1]&=127;return bytesToNumberLE(u)}function decodeScalar(n){const bytes=ensureBytes("scalar",n);if(bytes.length!==montgomeryBytes&&bytes.length!==fieldLen)throw new Error(`Expected ${montgomeryBytes} or ${fieldLen} bytes, got ${bytes.length}`);return bytesToNumberLE(adjustScalarBytes(bytes))}function scalarMult(scalar,u){const pointU=decodeUCoordinate(u);const _scalar=decodeScalar(scalar);const pu=montgomeryLadder(pointU,_scalar);if(pu===_0n$4)throw new Error("Invalid private or public key received");return encodeUCoordinate(pu)}const GuBytes=encodeUCoordinate(CURVE.Gu);function scalarMultBase(scalar){return scalarMult(scalar,GuBytes)}return{scalarMult:scalarMult,scalarMultBase:scalarMultBase,getSharedSecret:(privateKey,publicKey)=>scalarMult(privateKey,publicKey),getPublicKey:privateKey=>scalarMultBase(privateKey),utils:{randomPrivateKey:()=>CURVE.randomBytes(CURVE.nByteLength)},GuBytes:GuBytes}}function validateDST(dst){if(dst instanceof Uint8Array)return dst;if(typeof dst==="string")return utf8ToBytes$1(dst);throw new Error("DST must be Uint8Array or string")}const os2ip=bytesToNumberBE;function i2osp(value,length){if(value<0||value>=1<<8*length){throw new Error(`bad I2OSP call: value=${value} length=${length}`)}const res=Array.from({length:length}).fill(0);for(let i=length-1;i>=0;i--){res[i]=value&255;value>>>=8}return new Uint8Array(res)}function strxor(a,b){const arr=new Uint8Array(a.length);for(let i=0;i255)DST=H(concatBytes(utf8ToBytes$1("H2C-OVERSIZE-DST-"),DST));const{outputLen:b_in_bytes,blockLen:r_in_bytes}=H;const ell=Math.ceil(lenInBytes/b_in_bytes);if(ell>255)throw new Error("Invalid xmd length");const DST_prime=concatBytes(DST,i2osp(DST.length,1));const Z_pad=i2osp(0,r_in_bytes);const l_i_b_str=i2osp(lenInBytes,2);const b=new Array(ell);const b_0=H(concatBytes(Z_pad,msg,l_i_b_str,i2osp(0,1),DST_prime));b[0]=H(concatBytes(b_0,i2osp(1,1),DST_prime));for(let i=1;i<=ell;i++){const args=[strxor(b_0,b[i-1]),i2osp(i+1,1),DST_prime];b[i]=H(concatBytes(...args))}const pseudo_random_bytes=concatBytes(...b);return pseudo_random_bytes.slice(0,lenInBytes)}function expand_message_xof(msg,DST,lenInBytes,k,H){isBytes(msg);isBytes(DST);isNum(lenInBytes);if(DST.length>255){const dkLen=Math.ceil(2*k/8);DST=H.create({dkLen:dkLen}).update(utf8ToBytes$1("H2C-OVERSIZE-DST-")).update(DST).digest()}if(lenInBytes>65535||DST.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return H.create({dkLen:lenInBytes}).update(msg).update(i2osp(lenInBytes,2)).update(DST).update(i2osp(DST.length,1)).digest()}function hash_to_field(msg,count,options){validateObject(options,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:p,k:k,m:m,hash:hash,expand:expand,DST:_DST}=options;isBytes(msg);isNum(count);const DST=validateDST(_DST);const log2p=p.toString(2).length;const L=Math.ceil((log2p+k)/8);const len_in_bytes=count*m*L;let prb;if(expand==="xmd"){prb=expand_message_xmd(msg,DST,len_in_bytes,hash)}else if(expand==="xof"){prb=expand_message_xof(msg,DST,len_in_bytes,k,hash)}else if(expand==="_internal_pass"){prb=msg}else{throw new Error('expand must be "xmd" or "xof"')}const u=new Array(count);for(let i=0;iArray.from(i).reverse()));return(x,y)=>{const[xNum,xDen,yNum,yDen]=COEFF.map((val=>val.reduce(((acc,i)=>field.add(field.mul(acc,x),i)))));x=field.div(xNum,xDen);y=field.mul(y,field.div(yNum,yDen));return{x:x,y:y}}}function createHasher(Point,mapToCurve,def){if(typeof mapToCurve!=="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(msg,options){const u=hash_to_field(msg,2,{...def,DST:def.DST,...options});const u0=Point.fromAffine(mapToCurve(u[0]));const u1=Point.fromAffine(mapToCurve(u[1]));const P=u0.add(u1).clearCofactor();P.assertValidity();return P},encodeToCurve(msg,options){const u=hash_to_field(msg,1,{...def,DST:def.encodeDST,...options});const P=Point.fromAffine(mapToCurve(u[0])).clearCofactor();P.assertValidity();return P}}} - /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ED25519_P=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949");const ED25519_SQRT_M1=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");const _0n$3=BigInt(0),_1n$3=BigInt(1),_2n$3=BigInt(2),_5n=BigInt(5);const _10n=BigInt(10),_20n=BigInt(20),_40n=BigInt(40),_80n=BigInt(80);function ed25519_pow_2_252_3(x){const P=ED25519_P;const x2=x*x%P;const b2=x2*x%P;const b4=pow2(b2,_2n$3,P)*b2%P;const b5=pow2(b4,_1n$3,P)*x%P;const b10=pow2(b5,_5n,P)*b5%P;const b20=pow2(b10,_10n,P)*b10%P;const b40=pow2(b20,_20n,P)*b20%P;const b80=pow2(b40,_40n,P)*b40%P;const b160=pow2(b80,_80n,P)*b80%P;const b240=pow2(b160,_80n,P)*b80%P;const b250=pow2(b240,_10n,P)*b10%P;const pow_p_5_8=pow2(b250,_2n$3,P)*x%P;return{pow_p_5_8:pow_p_5_8,b2:b2}}function adjustScalarBytes(bytes){bytes[0]&=248;bytes[31]&=127;bytes[31]|=64;return bytes}function uvRatio(u,v){const P=ED25519_P;const v3=mod(v*v*v,P);const v7=mod(v3*v3*v,P);const pow=ed25519_pow_2_252_3(u*v7).pow_p_5_8;let x=mod(u*v3*pow,P);const vx2=mod(v*x*x,P);const root1=x;const root2=mod(x*ED25519_SQRT_M1,P);const useRoot1=vx2===u;const useRoot2=vx2===mod(-u,P);const noRoot=vx2===mod(-u*ED25519_SQRT_M1,P);if(useRoot1)x=root1;if(useRoot2||noRoot)x=root2;if(isNegativeLE(x,P))x=mod(-x,P);return{isValid:useRoot1||useRoot2,value:x}}const Fp$1=Field(ED25519_P,undefined,true);const ed25519Defaults={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:Fp$1,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:sha512,randomBytes:randomBytes,adjustScalarBytes:adjustScalarBytes,uvRatio:uvRatio};const ed25519=twistedEdwards(ed25519Defaults);function ed25519_domain(data,ctx,phflag){if(ctx.length>255)throw new Error("Context is too big");return concatBytes$1(utf8ToBytes$2("SigEd25519 no Ed25519 collisions"),new Uint8Array([phflag?1:0,ctx.length]),ctx,data)}twistedEdwards({...ed25519Defaults,domain:ed25519_domain});twistedEdwards({...ed25519Defaults,domain:ed25519_domain,prehash:sha512});montgomery({P:ED25519_P,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:x=>{const P=ED25519_P;const{pow_p_5_8:pow_p_5_8,b2:b2}=ed25519_pow_2_252_3(x);return mod(pow2(pow_p_5_8,BigInt(3),P)*b2,P)},adjustScalarBytes:adjustScalarBytes,randomBytes:randomBytes});const ELL2_C1=(Fp$1.ORDER+BigInt(3))/BigInt(8);const ELL2_C2=Fp$1.pow(_2n$3,ELL2_C1);const ELL2_C3=Fp$1.sqrt(Fp$1.neg(Fp$1.ONE));const ELL2_C4=(Fp$1.ORDER-BigInt(5))/BigInt(8);const ELL2_J=BigInt(486662);function map_to_curve_elligator2_curve25519(u){let tv1=Fp$1.sqr(u);tv1=Fp$1.mul(tv1,_2n$3);let xd=Fp$1.add(tv1,Fp$1.ONE);let x1n=Fp$1.neg(ELL2_J);let tv2=Fp$1.sqr(xd);let gxd=Fp$1.mul(tv2,xd);let gx1=Fp$1.mul(tv1,ELL2_J);gx1=Fp$1.mul(gx1,x1n);gx1=Fp$1.add(gx1,tv2);gx1=Fp$1.mul(gx1,x1n);let tv3=Fp$1.sqr(gxd);tv2=Fp$1.sqr(tv3);tv3=Fp$1.mul(tv3,gxd);tv3=Fp$1.mul(tv3,gx1);tv2=Fp$1.mul(tv2,tv3);let y11=Fp$1.pow(tv2,ELL2_C4);y11=Fp$1.mul(y11,tv3);let y12=Fp$1.mul(y11,ELL2_C3);tv2=Fp$1.sqr(y11);tv2=Fp$1.mul(tv2,gxd);let e1=Fp$1.eql(tv2,gx1);let y1=Fp$1.cmov(y12,y11,e1);let x2n=Fp$1.mul(x1n,tv1);let y21=Fp$1.mul(y11,u);y21=Fp$1.mul(y21,ELL2_C2);let y22=Fp$1.mul(y21,ELL2_C3);let gx2=Fp$1.mul(gx1,tv1);tv2=Fp$1.sqr(y21);tv2=Fp$1.mul(tv2,gxd);let e2=Fp$1.eql(tv2,gx2);let y2=Fp$1.cmov(y22,y21,e2);tv2=Fp$1.sqr(y1);tv2=Fp$1.mul(tv2,gxd);let e3=Fp$1.eql(tv2,gx1);let xn=Fp$1.cmov(x2n,x1n,e3);let y=Fp$1.cmov(y2,y1,e3);let e4=Fp$1.isOdd(y);y=Fp$1.cmov(y,Fp$1.neg(y),e3!==e4);return{xMn:xn,xMd:xd,yMn:y,yMd:_1n$3}}const ELL2_C1_EDWARDS=FpSqrtEven(Fp$1,Fp$1.neg(BigInt(486664)));function map_to_curve_elligator2_edwards25519(u){const{xMn:xMn,xMd:xMd,yMn:yMn,yMd:yMd}=map_to_curve_elligator2_curve25519(u);let xn=Fp$1.mul(xMn,yMd);xn=Fp$1.mul(xn,ELL2_C1_EDWARDS);let xd=Fp$1.mul(xMd,yMn);let yn=Fp$1.sub(xMn,xMd);let yd=Fp$1.add(xMn,xMd);let tv1=Fp$1.mul(xd,yd);let e=Fp$1.eql(tv1,Fp$1.ZERO);xn=Fp$1.cmov(xn,Fp$1.ZERO,e);xd=Fp$1.cmov(xd,Fp$1.ONE,e);yn=Fp$1.cmov(yn,Fp$1.ONE,e);yd=Fp$1.cmov(yd,Fp$1.ONE,e);const inv=Fp$1.invertBatch([xd,yd]);return{x:Fp$1.mul(xn,inv[0]),y:Fp$1.mul(yn,inv[1])}}createHasher(ed25519.ExtendedPoint,(scalars=>map_to_curve_elligator2_edwards25519(scalars[0])),{DST:"edwards25519_XMD:SHA-512_ELL2_RO_",encodeDST:"edwards25519_XMD:SHA-512_ELL2_NU_",p:Fp$1.ORDER,m:1,k:128,expand:"xmd",hash:sha512});function assertRstPoint(other){if(!(other instanceof RistrettoPoint))throw new Error("RistrettoPoint expected")}const SQRT_M1=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");const SQRT_AD_MINUS_ONE=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235");const INVSQRT_A_MINUS_D=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578");const ONE_MINUS_D_SQ=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838");const D_MINUS_ONE_SQ=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952");const invertSqrt=number=>uvRatio(_1n$3,number);const MAX_255B=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const bytes255ToNumberLE=bytes=>ed25519.CURVE.Fp.create(bytesToNumberLE(bytes)&MAX_255B);function calcElligatorRistrettoMap(r0){const{d:d}=ed25519.CURVE;const P=ed25519.CURVE.Fp.ORDER;const mod=ed25519.CURVE.Fp.create;const r=mod(SQRT_M1*r0*r0);const Ns=mod((r+_1n$3)*ONE_MINUS_D_SQ);let c=BigInt(-1);const D=mod((c-d*r)*mod(r+d));let{isValid:Ns_D_is_sq,value:s}=uvRatio(Ns,D);let s_=mod(s*r0);if(!isNegativeLE(s_,P))s_=mod(-s_);if(!Ns_D_is_sq)s=s_;if(!Ns_D_is_sq)c=r;const Nt=mod(c*(r-_1n$3)*D_MINUS_ONE_SQ-D);const s2=s*s;const W0=mod((s+s)*D);const W1=mod(Nt*SQRT_AD_MINUS_ONE);const W2=mod(_1n$3-s2);const W3=mod(_1n$3+s2);return new ed25519.ExtendedPoint(mod(W0*W3),mod(W2*W1),mod(W1*W3),mod(W0*W2))}class RistrettoPoint{constructor(ep){this.ep=ep}static fromAffine(ap){return new RistrettoPoint(ed25519.ExtendedPoint.fromAffine(ap))}static hashToCurve(hex){hex=ensureBytes("ristrettoHash",hex,64);const r1=bytes255ToNumberLE(hex.slice(0,32));const R1=calcElligatorRistrettoMap(r1);const r2=bytes255ToNumberLE(hex.slice(32,64));const R2=calcElligatorRistrettoMap(r2);return new RistrettoPoint(R1.add(R2))}static fromHex(hex){hex=ensureBytes("ristrettoHex",hex,32);const{a:a,d:d}=ed25519.CURVE;const P=ed25519.CURVE.Fp.ORDER;const mod=ed25519.CURVE.Fp.create;const emsg="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint";const s=bytes255ToNumberLE(hex);if(!equalBytes(numberToBytesLE(s,32),hex)||isNegativeLE(s,P))throw new Error(emsg);const s2=mod(s*s);const u1=mod(_1n$3+a*s2);const u2=mod(_1n$3-a*s2);const u1_2=mod(u1*u1);const u2_2=mod(u2*u2);const v=mod(a*d*u1_2-u2_2);const{isValid:isValid,value:I}=invertSqrt(mod(v*u2_2));const Dx=mod(I*u2);const Dy=mod(I*Dx*v);let x=mod((s+s)*Dx);if(isNegativeLE(x,P))x=mod(-x);const y=mod(u1*Dy);const t=mod(x*y);if(!isValid||isNegativeLE(t,P)||y===_0n$3)throw new Error(emsg);return new RistrettoPoint(new ed25519.ExtendedPoint(x,y,_1n$3,t))}toRawBytes(){let{ex:x,ey:y,ez:z,et:t}=this.ep;const P=ed25519.CURVE.Fp.ORDER;const mod=ed25519.CURVE.Fp.create;const u1=mod(mod(z+y)*mod(z-y));const u2=mod(x*y);const u2sq=mod(u2*u2);const{value:invsqrt}=invertSqrt(mod(u1*u2sq));const D1=mod(invsqrt*u1);const D2=mod(invsqrt*u2);const zInv=mod(D1*D2*t);let D;if(isNegativeLE(t*zInv,P)){let _x=mod(y*SQRT_M1);let _y=mod(x*SQRT_M1);x=_x;y=_y;D=mod(D1*INVSQRT_A_MINUS_D)}else{D=D2}if(isNegativeLE(x*zInv,P))y=mod(-y);let s=mod((z-y)*D);if(isNegativeLE(s,P))s=mod(-s);return numberToBytesLE(s,32)}toHex(){return bytesToHex(this.toRawBytes())}toString(){return this.toHex()}equals(other){assertRstPoint(other);const{ex:X1,ey:Y1}=this.ep;const{ex:X2,ey:Y2}=other.ep;const mod=ed25519.CURVE.Fp.create;const one=mod(X1*Y2)===mod(Y1*X2);const two=mod(Y1*Y2)===mod(X1*X2);return one||two}add(other){assertRstPoint(other);return new RistrettoPoint(this.ep.add(other.ep))}subtract(other){assertRstPoint(other);return new RistrettoPoint(this.ep.subtract(other.ep))}multiply(scalar){return new RistrettoPoint(this.ep.multiply(scalar))}multiplyUnsafe(scalar){return new RistrettoPoint(this.ep.multiplyUnsafe(scalar))}}RistrettoPoint.BASE=new RistrettoPoint(ed25519.ExtendedPoint.BASE);RistrettoPoint.ZERO=new RistrettoPoint(ed25519.ExtendedPoint.ZERO);var generatePrivateKey=ed25519.utils.randomPrivateKey;var generateKeypair=function generateKeypair(){var privateScalar=ed25519.utils.randomPrivateKey();var publicKey=getPublicKey(privateScalar);var secretKey=new Uint8Array(64);secretKey.set(privateScalar);secretKey.set(publicKey,32);return{publicKey:publicKey,secretKey:secretKey}};var getPublicKey=ed25519.getPublicKey;function isOnCurve(publicKey){try{ed25519.ExtendedPoint.fromHex(publicKey);return true}catch(_unused){return false}}var sign=function sign(message,secretKey){return ed25519.sign(message,secretKey.slice(0,32))};var verify=ed25519.verify;var toBuffer=function toBuffer(arr){if(buffer.Buffer.isBuffer(arr)){return arr}else if(arr instanceof Uint8Array){return buffer.Buffer.from(arr.buffer,arr.byteOffset,arr.byteLength)}else{return buffer.Buffer.from(arr)}};var bn={exports:{}};var _nodeResolve_empty={};var _nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty});var require$$0$1=getAugmentedNamespace(_nodeResolve_empty$1);bn.exports;(function(module){(function(module,exports){function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number)){return number}this.negative=0;this.words=null;this.length=0;this.red=null;if(number!==null){if(base==="le"||base==="be"){endian=base;base=10}this._init(number||0,base||10,endian||"be")}}if(typeof module==="object"){module.exports=BN}else{exports.BN=BN}BN.BN=BN;BN.wordSize=26;var Buffer;try{if(typeof window!=="undefined"&&typeof window.Buffer!=="undefined"){Buffer=window.Buffer}else{Buffer=require$$0$1.Buffer}}catch(e){}BN.isBN=function isBN(num){if(num instanceof BN){return true}return num!==null&&typeof num==="object"&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)};BN.max=function max(left,right){if(left.cmp(right)>0)return left;return right};BN.min=function min(left,right){if(left.cmp(right)<0)return left;return right};BN.prototype._init=function init(number,base,endian){if(typeof number==="number"){return this._initNumber(number,base,endian)}if(typeof number==="object"){return this._initArray(number,base,endian)}if(base==="hex"){base=16}assert(base===(base|0)&&base>=2&&base<=36);number=number.toString().replace(/\s+/g,"");var start=0;if(number[0]==="-"){start++;this.negative=1}if(start=0;i-=3){w=number[i]|number[i-1]<<8|number[i-2]<<16;this.words[j]|=w<>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}else if(endian==="le"){for(i=0,j=0;i>>26-off&67108863;off+=24;if(off>=26){off-=26;j++}}}return this._strip()};function parseHex4Bits(string,index){var c=string.charCodeAt(index);if(c>=48&&c<=57){return c-48}else if(c>=65&&c<=70){return c-55}else if(c>=97&&c<=102){return c-87}else{assert(false,"Invalid character in "+string)}}function parseHexByte(string,lowerBound,index){var r=parseHex4Bits(string,index);if(index-1>=lowerBound){r|=parseHex4Bits(string,index-1)<<4}return r}BN.prototype._parseHex=function _parseHex(number,start,endian){this.length=Math.ceil((number.length-start)/6);this.words=new Array(this.length);for(var i=0;i=start;i-=2){w=parseHexByte(number,start,i)<=18){off-=18;j+=1;this.words[j]|=w>>>26}else{off+=8}}}else{var parseLength=number.length-start;for(i=parseLength%2===0?start+1:start;i=18){off-=18;j+=1;this.words[j]|=w>>>26}else{off+=8}}}this._strip()};function parseBase(str,start,end,mul){var r=0;var b=0;var len=Math.min(str.length,end);for(var i=start;i=49){b=c-49+10}else if(c>=17){b=c-17+10}else{b=c}assert(c>=0&&b1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};if(typeof Symbol!=="undefined"&&typeof Symbol.for==="function"){try{BN.prototype[Symbol.for("nodejs.util.inspect.custom")]=inspect}catch(e){BN.prototype.inspect=inspect}}else{BN.prototype.inspect=inspect}function inspect(){return(this.red?""}var zeros=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"];var groupSizes=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];var groupBases=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];BN.prototype.toString=function toString(base,padding){base=base||10;padding=padding|0||1;var out;if(base===16||base==="hex"){out="";var off=0;var carry=0;for(var i=0;i>>24-off&16777215;off+=2;if(off>=26){off-=26;i--}if(carry!==0||i!==this.length-1){out=zeros[6-word.length]+word+out}else{out=word+out}}if(carry!==0){out=carry.toString(16)+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}if(base===(base|0)&&base>=2&&base<=36){var groupSize=groupSizes[base];var groupBase=groupBases[base];out="";var c=this.clone();c.negative=0;while(!c.isZero()){var r=c.modrn(groupBase).toString(base);c=c.idivn(groupBase);if(!c.isZero()){out=zeros[groupSize-r.length]+r+out}else{out=r+out}}if(this.isZero()){out="0"+out}while(out.length%padding!==0){out="0"+out}if(this.negative!==0){out="-"+out}return out}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var ret=this.words[0];if(this.length===2){ret+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){ret+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-ret:ret};BN.prototype.toJSON=function toJSON(){return this.toString(16,2)};if(Buffer){BN.prototype.toBuffer=function toBuffer(endian,length){return this.toArrayLike(Buffer,endian,length)}}BN.prototype.toArray=function toArray(endian,length){return this.toArrayLike(Array,endian,length)};var allocate=function allocate(ArrayType,size){if(ArrayType.allocUnsafe){return ArrayType.allocUnsafe(size)}return new ArrayType(size)};BN.prototype.toArrayLike=function toArrayLike(ArrayType,endian,length){this._strip();var byteLength=this.byteLength();var reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length");assert(reqLength>0,"Requested array length <= 0");var res=allocate(ArrayType,reqLength);var postfix=endian==="le"?"LE":"BE";this["_toArrayLike"+postfix](res,byteLength);return res};BN.prototype._toArrayLikeLE=function _toArrayLikeLE(res,byteLength){var position=0;var carry=0;for(var i=0,shift=0;i>8&255}if(position>16&255}if(shift===6){if(position>24&255}carry=0;shift=0}else{carry=word>>>24;shift+=2}}if(position=0){res[position--]=word>>8&255}if(position>=0){res[position--]=word>>16&255}if(shift===6){if(position>=0){res[position--]=word>>24&255}carry=0;shift=0}else{carry=word>>>24;shift+=2}}if(position>=0){res[position--]=carry;while(position>=0){res[position--]=0}}};if(Math.clz32){BN.prototype._countBits=function _countBits(w){return 32-Math.clz32(w)}}else{BN.prototype._countBits=function _countBits(w){var t=w;var r=0;if(t>=4096){r+=13;t>>>=13}if(t>=64){r+=7;t>>>=7}if(t>=8){r+=4;t>>>=4}if(t>=2){r+=2;t>>>=2}return r+t}}BN.prototype._zeroBits=function _zeroBits(w){if(w===0)return 26;var t=w;var r=0;if((t&8191)===0){r+=13;t>>>=13}if((t&127)===0){r+=7;t>>>=7}if((t&15)===0){r+=4;t>>>=4}if((t&3)===0){r+=2;t>>>=2}if((t&1)===0){r++}return r};BN.prototype.bitLength=function bitLength(){var w=this.words[this.length-1];var hi=this._countBits(w);return(this.length-1)*26+hi};function toBitArray(num){var w=new Array(num.bitLength());for(var bit=0;bit>>wbit&1}return w}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var r=0;for(var i=0;inum.length)return this.clone().ior(num);return num.clone().ior(this)};BN.prototype.uor=function uor(num){if(this.length>num.length)return this.clone().iuor(num);return num.clone().iuor(this)};BN.prototype.iuand=function iuand(num){var b;if(this.length>num.length){b=num}else{b=this}for(var i=0;inum.length)return this.clone().iand(num);return num.clone().iand(this)};BN.prototype.uand=function uand(num){if(this.length>num.length)return this.clone().iuand(num);return num.clone().iuand(this)};BN.prototype.iuxor=function iuxor(num){var a;var b;if(this.length>num.length){a=this;b=num}else{a=num;b=this}for(var i=0;inum.length)return this.clone().ixor(num);return num.clone().ixor(this)};BN.prototype.uxor=function uxor(num){if(this.length>num.length)return this.clone().iuxor(num);return num.clone().iuxor(this)};BN.prototype.inotn=function inotn(width){assert(typeof width==="number"&&width>=0);var bytesNeeded=Math.ceil(width/26)|0;var bitsLeft=width%26;this._expand(bytesNeeded);if(bitsLeft>0){bytesNeeded--}for(var i=0;i0){this.words[i]=~this.words[i]&67108863>>26-bitsLeft}return this._strip()};BN.prototype.notn=function notn(width){return this.clone().inotn(width)};BN.prototype.setn=function setn(bit,val){assert(typeof bit==="number"&&bit>=0);var off=bit/26|0;var wbit=bit%26;this._expand(off+1);if(val){this.words[off]=this.words[off]|1<num.length){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i>>26}for(;carry!==0&&i>>26}this.length=a.length;if(carry!==0){this.words[this.length]=carry;this.length++}else if(a!==this){for(;inum.length)return this.clone().iadd(num);return num.clone().iadd(this)};BN.prototype.isub=function isub(num){if(num.negative!==0){num.negative=0;var r=this.iadd(num);num.negative=1;return r._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(num);this.negative=1;return this._normSign()}var cmp=this.cmp(num);if(cmp===0){this.negative=0;this.length=1;this.words[0]=0;return this}var a,b;if(cmp>0){a=this;b=num}else{a=num;b=this}var carry=0;for(var i=0;i>26;this.words[i]=r&67108863}for(;carry!==0&&i>26;this.words[i]=r&67108863}if(carry===0&&i>>26;var rword=carry&67108863;var maxJ=Math.min(k,num.length-1);for(var j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;a=self.words[i]|0;b=num.words[j]|0;r=a*b+rword;ncarry+=r/67108864|0;rword=r&67108863}out.words[k]=rword|0;carry=ncarry|0}if(carry!==0){out.words[k]=carry|0}else{out.length--}return out._strip()}var comb10MulTo=function comb10MulTo(self,num,out){var a=self.words;var b=num.words;var o=out.words;var c=0;var lo;var mid;var hi;var a0=a[0]|0;var al0=a0&8191;var ah0=a0>>>13;var a1=a[1]|0;var al1=a1&8191;var ah1=a1>>>13;var a2=a[2]|0;var al2=a2&8191;var ah2=a2>>>13;var a3=a[3]|0;var al3=a3&8191;var ah3=a3>>>13;var a4=a[4]|0;var al4=a4&8191;var ah4=a4>>>13;var a5=a[5]|0;var al5=a5&8191;var ah5=a5>>>13;var a6=a[6]|0;var al6=a6&8191;var ah6=a6>>>13;var a7=a[7]|0;var al7=a7&8191;var ah7=a7>>>13;var a8=a[8]|0;var al8=a8&8191;var ah8=a8>>>13;var a9=a[9]|0;var al9=a9&8191;var ah9=a9>>>13;var b0=b[0]|0;var bl0=b0&8191;var bh0=b0>>>13;var b1=b[1]|0;var bl1=b1&8191;var bh1=b1>>>13;var b2=b[2]|0;var bl2=b2&8191;var bh2=b2>>>13;var b3=b[3]|0;var bl3=b3&8191;var bh3=b3>>>13;var b4=b[4]|0;var bl4=b4&8191;var bh4=b4>>>13;var b5=b[5]|0;var bl5=b5&8191;var bh5=b5>>>13;var b6=b[6]|0;var bl6=b6&8191;var bh6=b6>>>13;var b7=b[7]|0;var bl7=b7&8191;var bh7=b7>>>13;var b8=b[8]|0;var bl8=b8&8191;var bh8=b8>>>13;var b9=b[9]|0;var bl9=b9&8191;var bh9=b9>>>13;out.negative=self.negative^num.negative;out.length=19;lo=Math.imul(al0,bl0);mid=Math.imul(al0,bh0);mid=mid+Math.imul(ah0,bl0)|0;hi=Math.imul(ah0,bh0);var w0=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w0>>>26)|0;w0&=67108863;lo=Math.imul(al1,bl0);mid=Math.imul(al1,bh0);mid=mid+Math.imul(ah1,bl0)|0;hi=Math.imul(ah1,bh0);lo=lo+Math.imul(al0,bl1)|0;mid=mid+Math.imul(al0,bh1)|0;mid=mid+Math.imul(ah0,bl1)|0;hi=hi+Math.imul(ah0,bh1)|0;var w1=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w1>>>26)|0;w1&=67108863;lo=Math.imul(al2,bl0);mid=Math.imul(al2,bh0);mid=mid+Math.imul(ah2,bl0)|0;hi=Math.imul(ah2,bh0);lo=lo+Math.imul(al1,bl1)|0;mid=mid+Math.imul(al1,bh1)|0;mid=mid+Math.imul(ah1,bl1)|0;hi=hi+Math.imul(ah1,bh1)|0;lo=lo+Math.imul(al0,bl2)|0;mid=mid+Math.imul(al0,bh2)|0;mid=mid+Math.imul(ah0,bl2)|0;hi=hi+Math.imul(ah0,bh2)|0;var w2=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w2>>>26)|0;w2&=67108863;lo=Math.imul(al3,bl0);mid=Math.imul(al3,bh0);mid=mid+Math.imul(ah3,bl0)|0;hi=Math.imul(ah3,bh0);lo=lo+Math.imul(al2,bl1)|0;mid=mid+Math.imul(al2,bh1)|0;mid=mid+Math.imul(ah2,bl1)|0;hi=hi+Math.imul(ah2,bh1)|0;lo=lo+Math.imul(al1,bl2)|0;mid=mid+Math.imul(al1,bh2)|0;mid=mid+Math.imul(ah1,bl2)|0;hi=hi+Math.imul(ah1,bh2)|0;lo=lo+Math.imul(al0,bl3)|0;mid=mid+Math.imul(al0,bh3)|0;mid=mid+Math.imul(ah0,bl3)|0;hi=hi+Math.imul(ah0,bh3)|0;var w3=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w3>>>26)|0;w3&=67108863;lo=Math.imul(al4,bl0);mid=Math.imul(al4,bh0);mid=mid+Math.imul(ah4,bl0)|0;hi=Math.imul(ah4,bh0);lo=lo+Math.imul(al3,bl1)|0;mid=mid+Math.imul(al3,bh1)|0;mid=mid+Math.imul(ah3,bl1)|0;hi=hi+Math.imul(ah3,bh1)|0;lo=lo+Math.imul(al2,bl2)|0;mid=mid+Math.imul(al2,bh2)|0;mid=mid+Math.imul(ah2,bl2)|0;hi=hi+Math.imul(ah2,bh2)|0;lo=lo+Math.imul(al1,bl3)|0;mid=mid+Math.imul(al1,bh3)|0;mid=mid+Math.imul(ah1,bl3)|0;hi=hi+Math.imul(ah1,bh3)|0;lo=lo+Math.imul(al0,bl4)|0;mid=mid+Math.imul(al0,bh4)|0;mid=mid+Math.imul(ah0,bl4)|0;hi=hi+Math.imul(ah0,bh4)|0;var w4=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w4>>>26)|0;w4&=67108863;lo=Math.imul(al5,bl0);mid=Math.imul(al5,bh0);mid=mid+Math.imul(ah5,bl0)|0;hi=Math.imul(ah5,bh0);lo=lo+Math.imul(al4,bl1)|0;mid=mid+Math.imul(al4,bh1)|0;mid=mid+Math.imul(ah4,bl1)|0;hi=hi+Math.imul(ah4,bh1)|0;lo=lo+Math.imul(al3,bl2)|0;mid=mid+Math.imul(al3,bh2)|0;mid=mid+Math.imul(ah3,bl2)|0;hi=hi+Math.imul(ah3,bh2)|0;lo=lo+Math.imul(al2,bl3)|0;mid=mid+Math.imul(al2,bh3)|0;mid=mid+Math.imul(ah2,bl3)|0;hi=hi+Math.imul(ah2,bh3)|0;lo=lo+Math.imul(al1,bl4)|0;mid=mid+Math.imul(al1,bh4)|0;mid=mid+Math.imul(ah1,bl4)|0;hi=hi+Math.imul(ah1,bh4)|0;lo=lo+Math.imul(al0,bl5)|0;mid=mid+Math.imul(al0,bh5)|0;mid=mid+Math.imul(ah0,bl5)|0;hi=hi+Math.imul(ah0,bh5)|0;var w5=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w5>>>26)|0;w5&=67108863;lo=Math.imul(al6,bl0);mid=Math.imul(al6,bh0);mid=mid+Math.imul(ah6,bl0)|0;hi=Math.imul(ah6,bh0);lo=lo+Math.imul(al5,bl1)|0;mid=mid+Math.imul(al5,bh1)|0;mid=mid+Math.imul(ah5,bl1)|0;hi=hi+Math.imul(ah5,bh1)|0;lo=lo+Math.imul(al4,bl2)|0;mid=mid+Math.imul(al4,bh2)|0;mid=mid+Math.imul(ah4,bl2)|0;hi=hi+Math.imul(ah4,bh2)|0;lo=lo+Math.imul(al3,bl3)|0;mid=mid+Math.imul(al3,bh3)|0;mid=mid+Math.imul(ah3,bl3)|0;hi=hi+Math.imul(ah3,bh3)|0;lo=lo+Math.imul(al2,bl4)|0;mid=mid+Math.imul(al2,bh4)|0;mid=mid+Math.imul(ah2,bl4)|0;hi=hi+Math.imul(ah2,bh4)|0;lo=lo+Math.imul(al1,bl5)|0;mid=mid+Math.imul(al1,bh5)|0;mid=mid+Math.imul(ah1,bl5)|0;hi=hi+Math.imul(ah1,bh5)|0;lo=lo+Math.imul(al0,bl6)|0;mid=mid+Math.imul(al0,bh6)|0;mid=mid+Math.imul(ah0,bl6)|0;hi=hi+Math.imul(ah0,bh6)|0;var w6=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w6>>>26)|0;w6&=67108863;lo=Math.imul(al7,bl0);mid=Math.imul(al7,bh0);mid=mid+Math.imul(ah7,bl0)|0;hi=Math.imul(ah7,bh0);lo=lo+Math.imul(al6,bl1)|0;mid=mid+Math.imul(al6,bh1)|0;mid=mid+Math.imul(ah6,bl1)|0;hi=hi+Math.imul(ah6,bh1)|0;lo=lo+Math.imul(al5,bl2)|0;mid=mid+Math.imul(al5,bh2)|0;mid=mid+Math.imul(ah5,bl2)|0;hi=hi+Math.imul(ah5,bh2)|0;lo=lo+Math.imul(al4,bl3)|0;mid=mid+Math.imul(al4,bh3)|0;mid=mid+Math.imul(ah4,bl3)|0;hi=hi+Math.imul(ah4,bh3)|0;lo=lo+Math.imul(al3,bl4)|0;mid=mid+Math.imul(al3,bh4)|0;mid=mid+Math.imul(ah3,bl4)|0;hi=hi+Math.imul(ah3,bh4)|0;lo=lo+Math.imul(al2,bl5)|0;mid=mid+Math.imul(al2,bh5)|0;mid=mid+Math.imul(ah2,bl5)|0;hi=hi+Math.imul(ah2,bh5)|0;lo=lo+Math.imul(al1,bl6)|0;mid=mid+Math.imul(al1,bh6)|0;mid=mid+Math.imul(ah1,bl6)|0;hi=hi+Math.imul(ah1,bh6)|0;lo=lo+Math.imul(al0,bl7)|0;mid=mid+Math.imul(al0,bh7)|0;mid=mid+Math.imul(ah0,bl7)|0;hi=hi+Math.imul(ah0,bh7)|0;var w7=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w7>>>26)|0;w7&=67108863;lo=Math.imul(al8,bl0);mid=Math.imul(al8,bh0);mid=mid+Math.imul(ah8,bl0)|0;hi=Math.imul(ah8,bh0);lo=lo+Math.imul(al7,bl1)|0;mid=mid+Math.imul(al7,bh1)|0;mid=mid+Math.imul(ah7,bl1)|0;hi=hi+Math.imul(ah7,bh1)|0;lo=lo+Math.imul(al6,bl2)|0;mid=mid+Math.imul(al6,bh2)|0;mid=mid+Math.imul(ah6,bl2)|0;hi=hi+Math.imul(ah6,bh2)|0;lo=lo+Math.imul(al5,bl3)|0;mid=mid+Math.imul(al5,bh3)|0;mid=mid+Math.imul(ah5,bl3)|0;hi=hi+Math.imul(ah5,bh3)|0;lo=lo+Math.imul(al4,bl4)|0;mid=mid+Math.imul(al4,bh4)|0;mid=mid+Math.imul(ah4,bl4)|0;hi=hi+Math.imul(ah4,bh4)|0;lo=lo+Math.imul(al3,bl5)|0;mid=mid+Math.imul(al3,bh5)|0;mid=mid+Math.imul(ah3,bl5)|0;hi=hi+Math.imul(ah3,bh5)|0;lo=lo+Math.imul(al2,bl6)|0;mid=mid+Math.imul(al2,bh6)|0;mid=mid+Math.imul(ah2,bl6)|0;hi=hi+Math.imul(ah2,bh6)|0;lo=lo+Math.imul(al1,bl7)|0;mid=mid+Math.imul(al1,bh7)|0;mid=mid+Math.imul(ah1,bl7)|0;hi=hi+Math.imul(ah1,bh7)|0;lo=lo+Math.imul(al0,bl8)|0;mid=mid+Math.imul(al0,bh8)|0;mid=mid+Math.imul(ah0,bl8)|0;hi=hi+Math.imul(ah0,bh8)|0;var w8=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w8>>>26)|0;w8&=67108863;lo=Math.imul(al9,bl0);mid=Math.imul(al9,bh0);mid=mid+Math.imul(ah9,bl0)|0;hi=Math.imul(ah9,bh0);lo=lo+Math.imul(al8,bl1)|0;mid=mid+Math.imul(al8,bh1)|0;mid=mid+Math.imul(ah8,bl1)|0;hi=hi+Math.imul(ah8,bh1)|0;lo=lo+Math.imul(al7,bl2)|0;mid=mid+Math.imul(al7,bh2)|0;mid=mid+Math.imul(ah7,bl2)|0;hi=hi+Math.imul(ah7,bh2)|0;lo=lo+Math.imul(al6,bl3)|0;mid=mid+Math.imul(al6,bh3)|0;mid=mid+Math.imul(ah6,bl3)|0;hi=hi+Math.imul(ah6,bh3)|0;lo=lo+Math.imul(al5,bl4)|0;mid=mid+Math.imul(al5,bh4)|0;mid=mid+Math.imul(ah5,bl4)|0;hi=hi+Math.imul(ah5,bh4)|0;lo=lo+Math.imul(al4,bl5)|0;mid=mid+Math.imul(al4,bh5)|0;mid=mid+Math.imul(ah4,bl5)|0;hi=hi+Math.imul(ah4,bh5)|0;lo=lo+Math.imul(al3,bl6)|0;mid=mid+Math.imul(al3,bh6)|0;mid=mid+Math.imul(ah3,bl6)|0;hi=hi+Math.imul(ah3,bh6)|0;lo=lo+Math.imul(al2,bl7)|0;mid=mid+Math.imul(al2,bh7)|0;mid=mid+Math.imul(ah2,bl7)|0;hi=hi+Math.imul(ah2,bh7)|0;lo=lo+Math.imul(al1,bl8)|0;mid=mid+Math.imul(al1,bh8)|0;mid=mid+Math.imul(ah1,bl8)|0;hi=hi+Math.imul(ah1,bh8)|0;lo=lo+Math.imul(al0,bl9)|0;mid=mid+Math.imul(al0,bh9)|0;mid=mid+Math.imul(ah0,bl9)|0;hi=hi+Math.imul(ah0,bh9)|0;var w9=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w9>>>26)|0;w9&=67108863;lo=Math.imul(al9,bl1);mid=Math.imul(al9,bh1);mid=mid+Math.imul(ah9,bl1)|0;hi=Math.imul(ah9,bh1);lo=lo+Math.imul(al8,bl2)|0;mid=mid+Math.imul(al8,bh2)|0;mid=mid+Math.imul(ah8,bl2)|0;hi=hi+Math.imul(ah8,bh2)|0;lo=lo+Math.imul(al7,bl3)|0;mid=mid+Math.imul(al7,bh3)|0;mid=mid+Math.imul(ah7,bl3)|0;hi=hi+Math.imul(ah7,bh3)|0;lo=lo+Math.imul(al6,bl4)|0;mid=mid+Math.imul(al6,bh4)|0;mid=mid+Math.imul(ah6,bl4)|0;hi=hi+Math.imul(ah6,bh4)|0;lo=lo+Math.imul(al5,bl5)|0;mid=mid+Math.imul(al5,bh5)|0;mid=mid+Math.imul(ah5,bl5)|0;hi=hi+Math.imul(ah5,bh5)|0;lo=lo+Math.imul(al4,bl6)|0;mid=mid+Math.imul(al4,bh6)|0;mid=mid+Math.imul(ah4,bl6)|0;hi=hi+Math.imul(ah4,bh6)|0;lo=lo+Math.imul(al3,bl7)|0;mid=mid+Math.imul(al3,bh7)|0;mid=mid+Math.imul(ah3,bl7)|0;hi=hi+Math.imul(ah3,bh7)|0;lo=lo+Math.imul(al2,bl8)|0;mid=mid+Math.imul(al2,bh8)|0;mid=mid+Math.imul(ah2,bl8)|0;hi=hi+Math.imul(ah2,bh8)|0;lo=lo+Math.imul(al1,bl9)|0;mid=mid+Math.imul(al1,bh9)|0;mid=mid+Math.imul(ah1,bl9)|0;hi=hi+Math.imul(ah1,bh9)|0;var w10=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w10>>>26)|0;w10&=67108863;lo=Math.imul(al9,bl2);mid=Math.imul(al9,bh2);mid=mid+Math.imul(ah9,bl2)|0;hi=Math.imul(ah9,bh2);lo=lo+Math.imul(al8,bl3)|0;mid=mid+Math.imul(al8,bh3)|0;mid=mid+Math.imul(ah8,bl3)|0;hi=hi+Math.imul(ah8,bh3)|0;lo=lo+Math.imul(al7,bl4)|0;mid=mid+Math.imul(al7,bh4)|0;mid=mid+Math.imul(ah7,bl4)|0;hi=hi+Math.imul(ah7,bh4)|0;lo=lo+Math.imul(al6,bl5)|0;mid=mid+Math.imul(al6,bh5)|0;mid=mid+Math.imul(ah6,bl5)|0;hi=hi+Math.imul(ah6,bh5)|0;lo=lo+Math.imul(al5,bl6)|0;mid=mid+Math.imul(al5,bh6)|0;mid=mid+Math.imul(ah5,bl6)|0;hi=hi+Math.imul(ah5,bh6)|0;lo=lo+Math.imul(al4,bl7)|0;mid=mid+Math.imul(al4,bh7)|0;mid=mid+Math.imul(ah4,bl7)|0;hi=hi+Math.imul(ah4,bh7)|0;lo=lo+Math.imul(al3,bl8)|0;mid=mid+Math.imul(al3,bh8)|0;mid=mid+Math.imul(ah3,bl8)|0;hi=hi+Math.imul(ah3,bh8)|0;lo=lo+Math.imul(al2,bl9)|0;mid=mid+Math.imul(al2,bh9)|0;mid=mid+Math.imul(ah2,bl9)|0;hi=hi+Math.imul(ah2,bh9)|0;var w11=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w11>>>26)|0;w11&=67108863;lo=Math.imul(al9,bl3);mid=Math.imul(al9,bh3);mid=mid+Math.imul(ah9,bl3)|0;hi=Math.imul(ah9,bh3);lo=lo+Math.imul(al8,bl4)|0;mid=mid+Math.imul(al8,bh4)|0;mid=mid+Math.imul(ah8,bl4)|0;hi=hi+Math.imul(ah8,bh4)|0;lo=lo+Math.imul(al7,bl5)|0;mid=mid+Math.imul(al7,bh5)|0;mid=mid+Math.imul(ah7,bl5)|0;hi=hi+Math.imul(ah7,bh5)|0;lo=lo+Math.imul(al6,bl6)|0;mid=mid+Math.imul(al6,bh6)|0;mid=mid+Math.imul(ah6,bl6)|0;hi=hi+Math.imul(ah6,bh6)|0;lo=lo+Math.imul(al5,bl7)|0;mid=mid+Math.imul(al5,bh7)|0;mid=mid+Math.imul(ah5,bl7)|0;hi=hi+Math.imul(ah5,bh7)|0;lo=lo+Math.imul(al4,bl8)|0;mid=mid+Math.imul(al4,bh8)|0;mid=mid+Math.imul(ah4,bl8)|0;hi=hi+Math.imul(ah4,bh8)|0;lo=lo+Math.imul(al3,bl9)|0;mid=mid+Math.imul(al3,bh9)|0;mid=mid+Math.imul(ah3,bl9)|0;hi=hi+Math.imul(ah3,bh9)|0;var w12=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w12>>>26)|0;w12&=67108863;lo=Math.imul(al9,bl4);mid=Math.imul(al9,bh4);mid=mid+Math.imul(ah9,bl4)|0;hi=Math.imul(ah9,bh4);lo=lo+Math.imul(al8,bl5)|0;mid=mid+Math.imul(al8,bh5)|0;mid=mid+Math.imul(ah8,bl5)|0;hi=hi+Math.imul(ah8,bh5)|0;lo=lo+Math.imul(al7,bl6)|0;mid=mid+Math.imul(al7,bh6)|0;mid=mid+Math.imul(ah7,bl6)|0;hi=hi+Math.imul(ah7,bh6)|0;lo=lo+Math.imul(al6,bl7)|0;mid=mid+Math.imul(al6,bh7)|0;mid=mid+Math.imul(ah6,bl7)|0;hi=hi+Math.imul(ah6,bh7)|0;lo=lo+Math.imul(al5,bl8)|0;mid=mid+Math.imul(al5,bh8)|0;mid=mid+Math.imul(ah5,bl8)|0;hi=hi+Math.imul(ah5,bh8)|0;lo=lo+Math.imul(al4,bl9)|0;mid=mid+Math.imul(al4,bh9)|0;mid=mid+Math.imul(ah4,bl9)|0;hi=hi+Math.imul(ah4,bh9)|0;var w13=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w13>>>26)|0;w13&=67108863;lo=Math.imul(al9,bl5);mid=Math.imul(al9,bh5);mid=mid+Math.imul(ah9,bl5)|0;hi=Math.imul(ah9,bh5);lo=lo+Math.imul(al8,bl6)|0;mid=mid+Math.imul(al8,bh6)|0;mid=mid+Math.imul(ah8,bl6)|0;hi=hi+Math.imul(ah8,bh6)|0;lo=lo+Math.imul(al7,bl7)|0;mid=mid+Math.imul(al7,bh7)|0;mid=mid+Math.imul(ah7,bl7)|0;hi=hi+Math.imul(ah7,bh7)|0;lo=lo+Math.imul(al6,bl8)|0;mid=mid+Math.imul(al6,bh8)|0;mid=mid+Math.imul(ah6,bl8)|0;hi=hi+Math.imul(ah6,bh8)|0;lo=lo+Math.imul(al5,bl9)|0;mid=mid+Math.imul(al5,bh9)|0;mid=mid+Math.imul(ah5,bl9)|0;hi=hi+Math.imul(ah5,bh9)|0;var w14=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w14>>>26)|0;w14&=67108863;lo=Math.imul(al9,bl6);mid=Math.imul(al9,bh6);mid=mid+Math.imul(ah9,bl6)|0;hi=Math.imul(ah9,bh6);lo=lo+Math.imul(al8,bl7)|0;mid=mid+Math.imul(al8,bh7)|0;mid=mid+Math.imul(ah8,bl7)|0;hi=hi+Math.imul(ah8,bh7)|0;lo=lo+Math.imul(al7,bl8)|0;mid=mid+Math.imul(al7,bh8)|0;mid=mid+Math.imul(ah7,bl8)|0;hi=hi+Math.imul(ah7,bh8)|0;lo=lo+Math.imul(al6,bl9)|0;mid=mid+Math.imul(al6,bh9)|0;mid=mid+Math.imul(ah6,bl9)|0;hi=hi+Math.imul(ah6,bh9)|0;var w15=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w15>>>26)|0;w15&=67108863;lo=Math.imul(al9,bl7);mid=Math.imul(al9,bh7);mid=mid+Math.imul(ah9,bl7)|0;hi=Math.imul(ah9,bh7);lo=lo+Math.imul(al8,bl8)|0;mid=mid+Math.imul(al8,bh8)|0;mid=mid+Math.imul(ah8,bl8)|0;hi=hi+Math.imul(ah8,bh8)|0;lo=lo+Math.imul(al7,bl9)|0;mid=mid+Math.imul(al7,bh9)|0;mid=mid+Math.imul(ah7,bl9)|0;hi=hi+Math.imul(ah7,bh9)|0;var w16=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w16>>>26)|0;w16&=67108863;lo=Math.imul(al9,bl8);mid=Math.imul(al9,bh8);mid=mid+Math.imul(ah9,bl8)|0;hi=Math.imul(ah9,bh8);lo=lo+Math.imul(al8,bl9)|0;mid=mid+Math.imul(al8,bh9)|0;mid=mid+Math.imul(ah8,bl9)|0;hi=hi+Math.imul(ah8,bh9)|0;var w17=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w17>>>26)|0;w17&=67108863;lo=Math.imul(al9,bl9);mid=Math.imul(al9,bh9);mid=mid+Math.imul(ah9,bl9)|0;hi=Math.imul(ah9,bh9);var w18=(c+lo|0)+((mid&8191)<<13)|0;c=(hi+(mid>>>13)|0)+(w18>>>26)|0;w18&=67108863;o[0]=w0;o[1]=w1;o[2]=w2;o[3]=w3;o[4]=w4;o[5]=w5;o[6]=w6;o[7]=w7;o[8]=w8;o[9]=w9;o[10]=w10;o[11]=w11;o[12]=w12;o[13]=w13;o[14]=w14;o[15]=w15;o[16]=w16;o[17]=w17;o[18]=w18;if(c!==0){o[19]=c;out.length++}return out};if(!Math.imul){comb10MulTo=smallMulTo}function bigMulTo(self,num,out){out.negative=num.negative^self.negative;out.length=self.length+num.length;var carry=0;var hncarry=0;for(var k=0;k>>26)|0;hncarry+=ncarry>>>26;ncarry&=67108863}out.words[k]=rword;carry=ncarry;ncarry=hncarry}if(carry!==0){out.words[k]=carry}else{out.length--}return out._strip()}function jumboMulTo(self,num,out){return bigMulTo(self,num,out)}BN.prototype.mulTo=function mulTo(num,out){var res;var len=this.length+num.length;if(this.length===10&&num.length===10){res=comb10MulTo(this,num,out)}else if(len<63){res=smallMulTo(this,num,out)}else if(len<1024){res=bigMulTo(this,num,out)}else{res=jumboMulTo(this,num,out)}return res};BN.prototype.mul=function mul(num){var out=new BN(null);out.words=new Array(this.length+num.length);return this.mulTo(num,out)};BN.prototype.mulf=function mulf(num){var out=new BN(null);out.words=new Array(this.length+num.length);return jumboMulTo(this,num,out)};BN.prototype.imul=function imul(num){return this.clone().mulTo(num,this)};BN.prototype.imuln=function imuln(num){var isNegNum=num<0;if(isNegNum)num=-num;assert(typeof num==="number");assert(num<67108864);var carry=0;for(var i=0;i>=26;carry+=w/67108864|0;carry+=lo>>>26;this.words[i]=lo&67108863}if(carry!==0){this.words[i]=carry;this.length++}return isNegNum?this.ineg():this};BN.prototype.muln=function muln(num){return this.clone().imuln(num)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(num){var w=toBitArray(num);if(w.length===0)return new BN(1);var res=this;for(var i=0;i=0);var r=bits%26;var s=(bits-r)/26;var carryMask=67108863>>>26-r<<26-r;var i;if(r!==0){var carry=0;for(i=0;i>>26-r}if(carry){this.words[i]=carry;this.length++}}if(s!==0){for(i=this.length-1;i>=0;i--){this.words[i+s]=this.words[i]}for(i=0;i=0);var h;if(hint){h=(hint-hint%26)/26}else{h=0}var r=bits%26;var s=Math.min((bits-r)/26,this.length);var mask=67108863^67108863>>>r<s){this.length-=s;for(i=0;i=0&&(carry!==0||i>=h);i--){var word=this.words[i]|0;this.words[i]=carry<<26-r|word>>>r;carry=word&mask}if(maskedWords&&carry!==0){maskedWords.words[maskedWords.length++]=carry}if(this.length===0){this.words[0]=0;this.length=1}return this._strip()};BN.prototype.ishrn=function ishrn(bits,hint,extended){assert(this.negative===0);return this.iushrn(bits,hint,extended)};BN.prototype.shln=function shln(bits){return this.clone().ishln(bits)};BN.prototype.ushln=function ushln(bits){return this.clone().iushln(bits)};BN.prototype.shrn=function shrn(bits){return this.clone().ishrn(bits)};BN.prototype.ushrn=function ushrn(bits){return this.clone().iushrn(bits)};BN.prototype.testn=function testn(bit){assert(typeof bit==="number"&&bit>=0);var r=bit%26;var s=(bit-r)/26;var q=1<=0);var r=bits%26;var s=(bits-r)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=s){return this}if(r!==0){s++}this.length=Math.min(s,this.length);if(r!==0){var mask=67108863^67108863>>>r<=67108864;i++){this.words[i]-=67108864;if(i===this.length-1){this.words[i+1]=1}else{this.words[i+1]++}}this.length=Math.max(this.length,i+1);return this};BN.prototype.isubn=function isubn(num){assert(typeof num==="number");assert(num<67108864);if(num<0)return this.iaddn(-num);if(this.negative!==0){this.negative=0;this.iaddn(num);this.negative=1;return this}this.words[0]-=num;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var i=0;i>26)-(right/67108864|0);this.words[i+shift]=w&67108863}for(;i>26;this.words[i+shift]=w&67108863}if(carry===0)return this._strip();assert(carry===-1);carry=0;for(i=0;i>26;this.words[i]=w&67108863}this.negative=1;return this._strip()};BN.prototype._wordDiv=function _wordDiv(num,mode){var shift=this.length-num.length;var a=this.clone();var b=num;var bhi=b.words[b.length-1]|0;var bhiBits=this._countBits(bhi);shift=26-bhiBits;if(shift!==0){b=b.ushln(shift);a.iushln(shift);bhi=b.words[b.length-1]|0}var m=a.length-b.length;var q;if(mode!=="mod"){q=new BN(null);q.length=m+1;q.words=new Array(q.length);for(var i=0;i=0;j--){var qj=(a.words[b.length+j]|0)*67108864+(a.words[b.length+j-1]|0);qj=Math.min(qj/bhi|0,67108863);a._ishlnsubmul(b,qj,j);while(a.negative!==0){qj--;a.negative=0;a._ishlnsubmul(b,1,j);if(!a.isZero()){a.negative^=1}}if(q){q.words[j]=qj}}if(q){q._strip()}a._strip();if(mode!=="div"&&shift!==0){a.iushrn(shift)}return{div:q||null,mod:a}};BN.prototype.divmod=function divmod(num,mode,positive){assert(!num.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var div,mod,res;if(this.negative!==0&&num.negative===0){res=this.neg().divmod(num,mode);if(mode!=="mod"){div=res.div.neg()}if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.iadd(num)}}return{div:div,mod:mod}}if(this.negative===0&&num.negative!==0){res=this.divmod(num.neg(),mode);if(mode!=="mod"){div=res.div.neg()}return{div:div,mod:res.mod}}if((this.negative&num.negative)!==0){res=this.neg().divmod(num.neg(),mode);if(mode!=="div"){mod=res.mod.neg();if(positive&&mod.negative!==0){mod.isub(num)}}return{div:res.div,mod:mod}}if(num.length>this.length||this.cmp(num)<0){return{div:new BN(0),mod:this}}if(num.length===1){if(mode==="div"){return{div:this.divn(num.words[0]),mod:null}}if(mode==="mod"){return{div:null,mod:new BN(this.modrn(num.words[0]))}}return{div:this.divn(num.words[0]),mod:new BN(this.modrn(num.words[0]))}}return this._wordDiv(num,mode)};BN.prototype.div=function div(num){return this.divmod(num,"div",false).div};BN.prototype.mod=function mod(num){return this.divmod(num,"mod",false).mod};BN.prototype.umod=function umod(num){return this.divmod(num,"mod",true).mod};BN.prototype.divRound=function divRound(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=dm.div.negative!==0?dm.mod.isub(num):dm.mod;var half=num.ushrn(1);var r2=num.andln(1);var cmp=mod.cmp(half);if(cmp<0||r2===1&&cmp===0)return dm.div;return dm.div.negative!==0?dm.div.isubn(1):dm.div.iaddn(1)};BN.prototype.modrn=function modrn(num){var isNegNum=num<0;if(isNegNum)num=-num;assert(num<=67108863);var p=(1<<26)%num;var acc=0;for(var i=this.length-1;i>=0;i--){acc=(p*acc+(this.words[i]|0))%num}return isNegNum?-acc:acc};BN.prototype.modn=function modn(num){return this.modrn(num)};BN.prototype.idivn=function idivn(num){var isNegNum=num<0;if(isNegNum)num=-num;assert(num<=67108863);var carry=0;for(var i=this.length-1;i>=0;i--){var w=(this.words[i]|0)+carry*67108864;this.words[i]=w/num|0;carry=w%num}this._strip();return isNegNum?this.ineg():this};BN.prototype.divn=function divn(num){return this.clone().idivn(num)};BN.prototype.egcd=function egcd(p){assert(p.negative===0);assert(!p.isZero());var x=this;var y=p.clone();if(x.negative!==0){x=x.umod(p)}else{x=x.clone()}var A=new BN(1);var B=new BN(0);var C=new BN(0);var D=new BN(1);var g=0;while(x.isEven()&&y.isEven()){x.iushrn(1);y.iushrn(1);++g}var yp=y.clone();var xp=x.clone();while(!x.isZero()){for(var i=0,im=1;(x.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){x.iushrn(i);while(i-- >0){if(A.isOdd()||B.isOdd()){A.iadd(yp);B.isub(xp)}A.iushrn(1);B.iushrn(1)}}for(var j=0,jm=1;(y.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){y.iushrn(j);while(j-- >0){if(C.isOdd()||D.isOdd()){C.iadd(yp);D.isub(xp)}C.iushrn(1);D.iushrn(1)}}if(x.cmp(y)>=0){x.isub(y);A.isub(C);B.isub(D)}else{y.isub(x);C.isub(A);D.isub(B)}}return{a:C,b:D,gcd:y.iushln(g)}};BN.prototype._invmp=function _invmp(p){assert(p.negative===0);assert(!p.isZero());var a=this;var b=p.clone();if(a.negative!==0){a=a.umod(p)}else{a=a.clone()}var x1=new BN(1);var x2=new BN(0);var delta=b.clone();while(a.cmpn(1)>0&&b.cmpn(1)>0){for(var i=0,im=1;(a.words[0]&im)===0&&i<26;++i,im<<=1);if(i>0){a.iushrn(i);while(i-- >0){if(x1.isOdd()){x1.iadd(delta)}x1.iushrn(1)}}for(var j=0,jm=1;(b.words[0]&jm)===0&&j<26;++j,jm<<=1);if(j>0){b.iushrn(j);while(j-- >0){if(x2.isOdd()){x2.iadd(delta)}x2.iushrn(1)}}if(a.cmp(b)>=0){a.isub(b);x1.isub(x2)}else{b.isub(a);x2.isub(x1)}}var res;if(a.cmpn(1)===0){res=x1}else{res=x2}if(res.cmpn(0)<0){res.iadd(p)}return res};BN.prototype.gcd=function gcd(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone();var b=num.clone();a.negative=0;b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++){a.iushrn(1);b.iushrn(1)}do{while(a.isEven()){a.iushrn(1)}while(b.isEven()){b.iushrn(1)}var r=a.cmp(b);if(r<0){var t=a;a=b;b=t}else if(r===0||b.cmpn(1)===0){break}a.isub(b)}while(true);return b.iushln(shift)};BN.prototype.invm=function invm(num){return this.egcd(num).a.umod(num)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(num){return this.words[0]&num};BN.prototype.bincn=function bincn(bit){assert(typeof bit==="number");var r=bit%26;var s=(bit-r)/26;var q=1<>>26;w&=67108863;this.words[i]=w}if(carry!==0){this.words[i]=carry;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(num){var negative=num<0;if(this.negative!==0&&!negative)return-1;if(this.negative===0&&negative)return 1;this._strip();var res;if(this.length>1){res=1}else{if(negative){num=-num}assert(num<=67108863,"Number is too big");var w=this.words[0]|0;res=w===num?0:wnum.length)return 1;if(this.length=0;i--){var a=this.words[i]|0;var b=num.words[i]|0;if(a===b)continue;if(ab){res=1}break}return res};BN.prototype.gtn=function gtn(num){return this.cmpn(num)===1};BN.prototype.gt=function gt(num){return this.cmp(num)===1};BN.prototype.gten=function gten(num){return this.cmpn(num)>=0};BN.prototype.gte=function gte(num){return this.cmp(num)>=0};BN.prototype.ltn=function ltn(num){return this.cmpn(num)===-1};BN.prototype.lt=function lt(num){return this.cmp(num)===-1};BN.prototype.lten=function lten(num){return this.cmpn(num)<=0};BN.prototype.lte=function lte(num){return this.cmp(num)<=0};BN.prototype.eqn=function eqn(num){return this.cmpn(num)===0};BN.prototype.eq=function eq(num){return this.cmp(num)===0};BN.red=function red(num){return new Red(num)};BN.prototype.toRed=function toRed(ctx){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return ctx.convertTo(this)._forceRed(ctx)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(ctx){this.red=ctx;return this};BN.prototype.forceRed=function forceRed(ctx){assert(!this.red,"Already a number in reduction context");return this._forceRed(ctx)};BN.prototype.redAdd=function redAdd(num){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,num)};BN.prototype.redIAdd=function redIAdd(num){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,num)};BN.prototype.redSub=function redSub(num){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,num)};BN.prototype.redISub=function redISub(num){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,num)};BN.prototype.redShl=function redShl(num){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,num)};BN.prototype.redMul=function redMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.mul(this,num)};BN.prototype.redIMul=function redIMul(num){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,num);return this.red.imul(this,num)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(num){assert(this.red&&!num.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name;this.p=new BN(p,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var tmp=new BN(null);tmp.words=new Array(Math.ceil(this.n/13));return tmp};MPrime.prototype.ireduce=function ireduce(num){var r=num;var rlen;do{this.split(r,this.tmp);r=this.imulK(r);r=r.iadd(this.tmp);rlen=r.bitLength()}while(rlen>this.n);var cmp=rlen0){r.isub(this.p)}else{if(r.strip!==undefined){r.strip()}else{r._strip()}}return r};MPrime.prototype.split=function split(input,out){input.iushrn(this.n,0,out)};MPrime.prototype.imulK=function imulK(num){return num.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(input,output){var mask=4194303;var outLen=Math.min(input.length,9);for(var i=0;i>>22;prev=next}prev>>>=22;input.words[i-10]=prev;if(prev===0&&input.length>10){input.length-=10}else{input.length-=9}};K256.prototype.imulK=function imulK(num){num.words[num.length]=0;num.words[num.length+1]=0;num.length+=2;var lo=0;for(var i=0;i>>=26;num.words[i]=lo;carry=hi}if(carry!==0){num.words[num.length++]=carry}return num};BN._prime=function prime(name){if(primes[name])return primes[name];var prime;if(name==="k256"){prime=new K256}else if(name==="p224"){prime=new P224}else if(name==="p192"){prime=new P192}else if(name==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+name)}primes[name]=prime;return prime};function Red(m){if(typeof m==="string"){var prime=BN._prime(m);this.m=prime.p;this.prime=prime}else{assert(m.gtn(1),"modulus must be greater than 1");this.m=m;this.prime=null}}Red.prototype._verify1=function _verify1(a){assert(a.negative===0,"red works only with positives");assert(a.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(a,b){assert((a.negative|b.negative)===0,"red works only with positives");assert(a.red&&a.red===b.red,"red works only with red numbers")};Red.prototype.imod=function imod(a){if(this.prime)return this.prime.ireduce(a)._forceRed(this);move(a,a.umod(this.m)._forceRed(this));return a};Red.prototype.neg=function neg(a){if(a.isZero()){return a.clone()}return this.m.sub(a)._forceRed(this)};Red.prototype.add=function add(a,b){this._verify2(a,b);var res=a.add(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res._forceRed(this)};Red.prototype.iadd=function iadd(a,b){this._verify2(a,b);var res=a.iadd(b);if(res.cmp(this.m)>=0){res.isub(this.m)}return res};Red.prototype.sub=function sub(a,b){this._verify2(a,b);var res=a.sub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res._forceRed(this)};Red.prototype.isub=function isub(a,b){this._verify2(a,b);var res=a.isub(b);if(res.cmpn(0)<0){res.iadd(this.m)}return res};Red.prototype.shl=function shl(a,num){this._verify1(a);return this.imod(a.ushln(num))};Red.prototype.imul=function imul(a,b){this._verify2(a,b);return this.imod(a.imul(b))};Red.prototype.mul=function mul(a,b){this._verify2(a,b);return this.imod(a.mul(b))};Red.prototype.isqr=function isqr(a){return this.imul(a,a.clone())};Red.prototype.sqr=function sqr(a){return this.mul(a,a)};Red.prototype.sqrt=function sqrt(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);assert(mod3%2===1);if(mod3===3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}var q=this.m.subn(1);var s=0;while(!q.isZero()&&q.andln(1)===0){s++;q.iushrn(1)}assert(!q.isZero());var one=new BN(1).toRed(this);var nOne=one.redNeg();var lpow=this.m.subn(1).iushrn(1);var z=this.m.bitLength();z=new BN(2*z*z).toRed(this);while(this.pow(z,lpow).cmp(nOne)!==0){z.redIAdd(nOne)}var c=this.pow(z,q);var r=this.pow(a,q.addn(1).iushrn(1));var t=this.pow(a,q);var m=s;while(t.cmp(one)!==0){var tmp=t;for(var i=0;tmp.cmp(one)!==0;i++){tmp=tmp.redSqr()}assert(i=0;i--){var word=num.words[i];for(var j=start-1;j>=0;j--){var bit=word>>j&1;if(res!==wnd[0]){res=this.sqr(res)}if(bit===0&¤t===0){currentLen=0;continue}current<<=1;current|=bit;currentLen++;if(currentLen!==windowSize&&(i!==0||j!==0))continue;res=this.mul(res,wnd[current]);currentLen=0;current=0}start=26}return res};Red.prototype.convertTo=function convertTo(num){var r=num.umod(this.m);return r===num?r.clone():r};Red.prototype.convertFrom=function convertFrom(num){var res=num.clone();res.red=null;return res};BN.mont=function mont(num){return new Mont(num)};function Mont(m){Red.call(this,m);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new BN(1).iushln(this.shift);this.r2=this.imod(this.r.sqr());this.rinv=this.r._invmp(this.m);this.minv=this.rinv.mul(this.r).isubn(1).div(this.m);this.minv=this.minv.umod(this.r);this.minv=this.r.sub(this.minv)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(num){return this.imod(num.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(num){var r=this.imod(num.mul(this.rinv));r.red=null;return r};Mont.prototype.imul=function imul(a,b){if(a.isZero()||b.isZero()){a.words[0]=0;a.length=1;return a}var t=a.imul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.mul=function mul(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b);var c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var u=t.isub(c).iushrn(this.shift);var res=u;if(u.cmp(this.m)>=0){res=u.isub(this.m)}else if(u.cmpn(0)<0){res=u.iadd(this.m)}return res._forceRed(this)};Mont.prototype.invm=function invm(a){var res=this.imod(a._invmp(this.m).mul(this.r2));return res._forceRed(this)}})(module,commonjsGlobal)})(bn);var bnExports=bn.exports;var BN=getDefaultExportFromCjs(bnExports);var safeBuffer={exports:{}}; - /*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(module,exports){var buffer$1=buffer;var Buffer=buffer$1.Buffer;function copyProps(src,dst){for(var key in src){dst[key]=src[key]}}if(Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow){module.exports=buffer$1}else{copyProps(buffer$1,exports);exports.Buffer=SafeBuffer}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length)}SafeBuffer.prototype=Object.create(Buffer.prototype);copyProps(Buffer,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg==="number"){throw new TypeError("Argument must not be a number")}return Buffer(arg,encodingOrOffset,length)};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!=="number"){throw new TypeError("Argument must be a number")}var buf=Buffer(size);if(fill!==undefined){if(typeof encoding==="string"){buf.fill(fill,encoding)}else{buf.fill(fill)}}else{buf.fill(0)}return buf};SafeBuffer.allocUnsafe=function(size){if(typeof size!=="number"){throw new TypeError("Argument must be a number")}return Buffer(size)};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!=="number"){throw new TypeError("Argument must be a number")}return buffer$1.SlowBuffer(size)}})(safeBuffer,safeBuffer.exports);var safeBufferExports=safeBuffer.exports;var _Buffer=safeBufferExports.Buffer;function base(ALPHABET){if(ALPHABET.length>=255){throw new TypeError("Alphabet too long")}var BASE_MAP=new Uint8Array(256);for(var j=0;j>>0;var b58=new Uint8Array(size);while(pbegin!==pend){var carry=source[pbegin];var i=0;for(var it1=size-1;(carry!==0||i>>0;b58[it1]=carry%BASE>>>0;carry=carry/BASE>>>0}if(carry!==0){throw new Error("Non-zero carry")}length=i;pbegin++}var it2=size-length;while(it2!==size&&b58[it2]===0){it2++}var str=LEADER.repeat(zeroes);for(;it2>>0;var b256=new Uint8Array(size);while(source[psz]){var carry=BASE_MAP[source.charCodeAt(psz)];if(carry===255){return}var i=0;for(var it3=size-1;(carry!==0||i>>0;b256[it3]=carry%256>>>0;carry=carry/256>>>0}if(carry!==0){throw new Error("Non-zero carry")}length=i;psz++}var it4=size-length;while(it4!==size&&b256[it4]===0){it4++}var vch=_Buffer.allocUnsafe(zeroes+(size-it4));vch.fill(0,0,zeroes);var j=zeroes;while(it4!==size){vch[j++]=b256[it4++]}return vch}function decode(string){var buffer=decodeUnsafe(string);if(buffer){return buffer}throw new Error("Non-base"+BASE+" character")}return{encode:encode,decodeUnsafe:decodeUnsafe,decode:decode}}var src=base;var basex=src;var ALPHABET="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var bs58=basex(ALPHABET);var bs58$1=getDefaultExportFromCjs(bs58);function number$1(n){if(!Number.isSafeInteger(n)||n<0)throw new Error(`Wrong positive integer: ${n}`)}function bool(b){if(typeof b!=="boolean")throw new Error(`Expected boolean, not ${b}`)}function bytes(b,...lengths){if(!(b instanceof Uint8Array))throw new Error("Expected Uint8Array");if(lengths.length>0&&!lengths.includes(b.length))throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`)}function hash(hash){if(typeof hash!=="function"||typeof hash.create!=="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");number$1(hash.outputLen);number$1(hash.blockLen)}function exists(instance,checkFinished=true){if(instance.destroyed)throw new Error("Hash instance has been destroyed");if(checkFinished&&instance.finished)throw new Error("Hash#digest() has already been called")}function output(out,instance){bytes(out);const min=instance.outputLen;if(out.lengtha instanceof Uint8Array;const u32$1=arr=>new Uint32Array(arr.buffer,arr.byteOffset,Math.floor(arr.byteLength/4));const createView=arr=>new DataView(arr.buffer,arr.byteOffset,arr.byteLength);const rotr=(word,shift)=>word<<32-shift|word>>>shift;const isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!isLE)throw new Error("Non little-endian hardware is not supported");Array.from({length:256},((v,i)=>i.toString(16).padStart(2,"0")));function utf8ToBytes(str){if(typeof str!=="string")throw new Error(`utf8ToBytes expected string, got ${typeof str}`);return new Uint8Array((new TextEncoder).encode(str))}function toBytes(data){if(typeof data==="string")data=utf8ToBytes(data);if(!u8a(data))throw new Error(`expected Uint8Array, got ${typeof data}`);return data}class Hash{clone(){return this._cloneInto()}}function wrapConstructor(hashCons){const hashC=msg=>hashCons().update(toBytes(msg)).digest();const tmp=hashCons();hashC.outputLen=tmp.outputLen;hashC.blockLen=tmp.blockLen;hashC.create=()=>hashCons();return hashC}function wrapXOFConstructorWithOpts(hashCons){const hashC=(msg,opts)=>hashCons(opts).update(toBytes(msg)).digest();const tmp=hashCons({});hashC.outputLen=tmp.outputLen;hashC.blockLen=tmp.blockLen;hashC.create=opts=>hashCons(opts);return hashC}function setBigUint64(view,byteOffset,value,isLE){if(typeof view.setBigUint64==="function")return view.setBigUint64(byteOffset,value,isLE);const _32n=BigInt(32);const _u32_max=BigInt(4294967295);const wh=Number(value>>_32n&_u32_max);const wl=Number(value&_u32_max);const h=isLE?4:0;const l=isLE?0:4;view.setUint32(byteOffset+h,wh,isLE);view.setUint32(byteOffset+l,wl,isLE)}class SHA2 extends Hash{constructor(blockLen,outputLen,padOffset,isLE){super();this.blockLen=blockLen;this.outputLen=outputLen;this.padOffset=padOffset;this.isLE=isLE;this.finished=false;this.length=0;this.pos=0;this.destroyed=false;this.buffer=new Uint8Array(blockLen);this.view=createView(this.buffer)}update(data){assert$3.exists(this);const{view:view,buffer:buffer,blockLen:blockLen}=this;data=toBytes(data);const len=data.length;for(let pos=0;posblockLen-pos){this.process(view,0);pos=0}for(let i=pos;istate.length)throw new Error("_sha2: outputLen bigger than state");for(let i=0;ia&b^~a&c;const Maj$1=(a,b,c)=>a&b^a&c^b&c;const SHA256_K$1=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);const IV$1=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);const SHA256_W$1=new Uint32Array(64);let SHA256$1=class SHA256 extends SHA2{constructor(){super(64,32,8,false);this.A=IV$1[0]|0;this.B=IV$1[1]|0;this.C=IV$1[2]|0;this.D=IV$1[3]|0;this.E=IV$1[4]|0;this.F=IV$1[5]|0;this.G=IV$1[6]|0;this.H=IV$1[7]|0}get(){const{A:A,B:B,C:C,D:D,E:E,F:F,G:G,H:H}=this;return[A,B,C,D,E,F,G,H]}set(A,B,C,D,E,F,G,H){this.A=A|0;this.B=B|0;this.C=C|0;this.D=D|0;this.E=E|0;this.F=F|0;this.G=G|0;this.H=H|0}process(view,offset){for(let i=0;i<16;i++,offset+=4)SHA256_W$1[i]=view.getUint32(offset,false);for(let i=16;i<64;i++){const W15=SHA256_W$1[i-15];const W2=SHA256_W$1[i-2];const s0=rotr(W15,7)^rotr(W15,18)^W15>>>3;const s1=rotr(W2,17)^rotr(W2,19)^W2>>>10;SHA256_W$1[i]=s1+SHA256_W$1[i-7]+s0+SHA256_W$1[i-16]|0}let{A:A,B:B,C:C,D:D,E:E,F:F,G:G,H:H}=this;for(let i=0;i<64;i++){const sigma1=rotr(E,6)^rotr(E,11)^rotr(E,25);const T1=H+sigma1+Chi$1(E,F,G)+SHA256_K$1[i]+SHA256_W$1[i]|0;const sigma0=rotr(A,2)^rotr(A,13)^rotr(A,22);const T2=sigma0+Maj$1(A,B,C)|0;H=G;G=F;F=E;E=D+T1|0;D=C;C=B;B=A;A=T1+T2|0}A=A+this.A|0;B=B+this.B|0;C=C+this.C|0;D=D+this.D|0;E=E+this.E|0;F=F+this.F|0;G=G+this.G|0;H=H+this.H|0;this.set(A,B,C,D,E,F,G,H)}roundClean(){SHA256_W$1.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0);this.buffer.fill(0)}};let SHA224$1=class SHA224 extends SHA256$1{constructor(){super();this.A=3238371032|0;this.B=914150663|0;this.C=812702999|0;this.D=4144912697|0;this.E=4290775857|0;this.F=1750603025|0;this.G=1694076839|0;this.H=3204075428|0;this.outputLen=28}};const sha256$1=wrapConstructor((()=>new SHA256$1));wrapConstructor((()=>new SHA224$1));var lib={};var encoding_lib={};function inRange(a,min,max){return min<=a&&a<=max}function ToDictionary(o){if(o===undefined)return{};if(o===Object(o))return o;throw TypeError("Could not convert argument to dictionary")}function stringToCodePoints(string){var s=String(string);var n=s.length;var i=0;var u=[];while(i57343){u.push(c)}else if(56320<=c&&c<=57343){u.push(65533)}else if(55296<=c&&c<=56319){if(i===n-1){u.push(65533)}else{var d=string.charCodeAt(i+1);if(56320<=d&&d<=57343){var a=c&1023;var b=d&1023;u.push(65536+(a<<10)+b);i+=1}else{u.push(65533)}}}i+=1}return u}function codePointsToString(code_points){var s="";for(var i=0;i>10)+55296,(cp&1023)+56320)}}return s}var end_of_stream=-1;function Stream(tokens){this.tokens=[].slice.call(tokens)}Stream.prototype={endOfStream:function(){return!this.tokens.length},read:function(){if(!this.tokens.length)return end_of_stream;return this.tokens.shift()},prepend:function(token){if(Array.isArray(token)){var tokens=token;while(tokens.length)this.tokens.unshift(tokens.pop())}else{this.tokens.unshift(token)}},push:function(token){if(Array.isArray(token)){var tokens=token;while(tokens.length)this.tokens.push(tokens.shift())}else{this.tokens.push(token)}}};var finished=-1;function decoderError(fatal,opt_code_point){if(fatal)throw TypeError("Decoder error");return opt_code_point||65533}var DEFAULT_ENCODING="utf-8";function TextDecoder$1(encoding,options){if(!(this instanceof TextDecoder$1)){return new TextDecoder$1(encoding,options)}encoding=encoding!==undefined?String(encoding).toLowerCase():DEFAULT_ENCODING;if(encoding!==DEFAULT_ENCODING){throw new Error("Encoding not supported. Only utf-8 is supported")}options=ToDictionary(options);this._streaming=false;this._BOMseen=false;this._decoder=null;this._fatal=Boolean(options["fatal"]);this._ignoreBOM=Boolean(options["ignoreBOM"]);Object.defineProperty(this,"encoding",{value:"utf-8"});Object.defineProperty(this,"fatal",{value:this._fatal});Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}TextDecoder$1.prototype={decode:function decode(input,options){var bytes;if(typeof input==="object"&&input instanceof ArrayBuffer){bytes=new Uint8Array(input)}else if(typeof input==="object"&&"buffer"in input&&input.buffer instanceof ArrayBuffer){bytes=new Uint8Array(input.buffer,input.byteOffset,input.byteLength)}else{bytes=new Uint8Array(0)}options=ToDictionary(options);if(!this._streaming){this._decoder=new UTF8Decoder({fatal:this._fatal});this._BOMseen=false}this._streaming=Boolean(options["stream"]);var input_stream=new Stream(bytes);var code_points=[];var result;while(!input_stream.endOfStream()){result=this._decoder.handler(input_stream,input_stream.read());if(result===finished)break;if(result===null)continue;if(Array.isArray(result))code_points.push.apply(code_points,result);else code_points.push(result)}if(!this._streaming){do{result=this._decoder.handler(input_stream,input_stream.read());if(result===finished)break;if(result===null)continue;if(Array.isArray(result))code_points.push.apply(code_points,result);else code_points.push(result)}while(!input_stream.endOfStream());this._decoder=null}if(code_points.length){if(["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen){if(code_points[0]===65279){this._BOMseen=true;code_points.shift()}else{this._BOMseen=true}}}return codePointsToString(code_points)}};function TextEncoder$1(encoding,options){if(!(this instanceof TextEncoder$1))return new TextEncoder$1(encoding,options);encoding=encoding!==undefined?String(encoding).toLowerCase():DEFAULT_ENCODING;if(encoding!==DEFAULT_ENCODING){throw new Error("Encoding not supported. Only utf-8 is supported")}options=ToDictionary(options);this._streaming=false;this._encoder=null;this._options={fatal:Boolean(options["fatal"])};Object.defineProperty(this,"encoding",{value:"utf-8"})}TextEncoder$1.prototype={encode:function encode(opt_string,options){opt_string=opt_string?String(opt_string):"";options=ToDictionary(options);if(!this._streaming)this._encoder=new UTF8Encoder(this._options);this._streaming=Boolean(options["stream"]);var bytes=[];var input_stream=new Stream(stringToCodePoints(opt_string));var result;while(!input_stream.endOfStream()){result=this._encoder.handler(input_stream,input_stream.read());if(result===finished)break;if(Array.isArray(result))bytes.push.apply(bytes,result);else bytes.push(result)}if(!this._streaming){while(true){result=this._encoder.handler(input_stream,input_stream.read());if(result===finished)break;if(Array.isArray(result))bytes.push.apply(bytes,result);else bytes.push(result)}this._encoder=null}return new Uint8Array(bytes)}};function UTF8Decoder(options){var fatal=options.fatal;var utf8_code_point=0,utf8_bytes_seen=0,utf8_bytes_needed=0,utf8_lower_boundary=128,utf8_upper_boundary=191;this.handler=function(stream,bite){if(bite===end_of_stream&&utf8_bytes_needed!==0){utf8_bytes_needed=0;return decoderError(fatal)}if(bite===end_of_stream)return finished;if(utf8_bytes_needed===0){if(inRange(bite,0,127)){return bite}if(inRange(bite,194,223)){utf8_bytes_needed=1;utf8_code_point=bite-192}else if(inRange(bite,224,239)){if(bite===224)utf8_lower_boundary=160;if(bite===237)utf8_upper_boundary=159;utf8_bytes_needed=2;utf8_code_point=bite-224}else if(inRange(bite,240,244)){if(bite===240)utf8_lower_boundary=144;if(bite===244)utf8_upper_boundary=143;utf8_bytes_needed=3;utf8_code_point=bite-240}else{return decoderError(fatal)}utf8_code_point=utf8_code_point<<6*utf8_bytes_needed;return null}if(!inRange(bite,utf8_lower_boundary,utf8_upper_boundary)){utf8_code_point=utf8_bytes_needed=utf8_bytes_seen=0;utf8_lower_boundary=128;utf8_upper_boundary=191;stream.prepend(bite);return decoderError(fatal)}utf8_lower_boundary=128;utf8_upper_boundary=191;utf8_bytes_seen+=1;utf8_code_point+=bite-128<<6*(utf8_bytes_needed-utf8_bytes_seen);if(utf8_bytes_seen!==utf8_bytes_needed)return null;var code_point=utf8_code_point;utf8_code_point=utf8_bytes_needed=utf8_bytes_seen=0;return code_point}}function UTF8Encoder(options){options.fatal;this.handler=function(stream,code_point){if(code_point===end_of_stream)return finished;if(inRange(code_point,0,127))return code_point;var count,offset;if(inRange(code_point,128,2047)){count=1;offset=192}else if(inRange(code_point,2048,65535)){count=2;offset=224}else if(inRange(code_point,65536,1114111)){count=3;offset=240}var bytes=[(code_point>>6*count)+offset];while(count>0){var temp=code_point>>6*(count-1);bytes.push(128|temp&63);count-=1}return bytes}}encoding_lib.TextEncoder=TextEncoder$1;encoding_lib.TextDecoder=TextDecoder$1;var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;Object.defineProperty(o,k2,{enumerable:true,get:function(){return m[k]}})}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:true,value:v})}:function(o,v){o["default"]=v});var __decorate=commonjsGlobal&&commonjsGlobal.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};var __importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)if(k!=="default"&&Object.hasOwnProperty.call(mod,k))__createBinding(result,mod,k);__setModuleDefault(result,mod);return result};var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(lib,"__esModule",{value:true});var deserializeUnchecked_1=lib.deserializeUnchecked=deserialize_1=lib.deserialize=serialize_1=lib.serialize=lib.BinaryReader=lib.BinaryWriter=lib.BorshError=lib.baseDecode=lib.baseEncode=void 0;const bn_js_1=__importDefault(bnExports);const bs58_1=__importDefault(bs58);const encoding=__importStar(encoding_lib);const ResolvedTextDecoder=typeof TextDecoder!=="function"?encoding.TextDecoder:TextDecoder;const textDecoder=new ResolvedTextDecoder("utf-8",{fatal:true});function baseEncode(value){if(typeof value==="string"){value=Buffer.from(value,"utf8")}return bs58_1.default.encode(Buffer.from(value))}lib.baseEncode=baseEncode;function baseDecode(value){return Buffer.from(bs58_1.default.decode(value))}lib.baseDecode=baseDecode;const INITIAL_LENGTH=1024;class BorshError extends Error{constructor(message){super(message);this.fieldPath=[];this.originalMessage=message}addToFieldPath(fieldName){this.fieldPath.splice(0,0,fieldName);this.message=this.originalMessage+": "+this.fieldPath.join(".")}}lib.BorshError=BorshError;class BinaryWriter{constructor(){this.buf=Buffer.alloc(INITIAL_LENGTH);this.length=0}maybeResize(){if(this.buf.length<16+this.length){this.buf=Buffer.concat([this.buf,Buffer.alloc(INITIAL_LENGTH)])}}writeU8(value){this.maybeResize();this.buf.writeUInt8(value,this.length);this.length+=1}writeU16(value){this.maybeResize();this.buf.writeUInt16LE(value,this.length);this.length+=2}writeU32(value){this.maybeResize();this.buf.writeUInt32LE(value,this.length);this.length+=4}writeU64(value){this.maybeResize();this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray("le",8)))}writeU128(value){this.maybeResize();this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray("le",16)))}writeU256(value){this.maybeResize();this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray("le",32)))}writeU512(value){this.maybeResize();this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray("le",64)))}writeBuffer(buffer){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),buffer,Buffer.alloc(INITIAL_LENGTH)]);this.length+=buffer.length}writeString(str){this.maybeResize();const b=Buffer.from(str,"utf8");this.writeU32(b.length);this.writeBuffer(b)}writeFixedArray(array){this.writeBuffer(Buffer.from(array))}writeArray(array,fn){this.maybeResize();this.writeU32(array.length);for(const elem of array){this.maybeResize();fn(elem)}}toArray(){return this.buf.subarray(0,this.length)}}lib.BinaryWriter=BinaryWriter;function handlingRangeError(target,propertyKey,propertyDescriptor){const originalMethod=propertyDescriptor.value;propertyDescriptor.value=function(...args){try{return originalMethod.apply(this,args)}catch(e){if(e instanceof RangeError){const code=e.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(code)>=0){throw new BorshError("Reached the end of buffer when deserializing")}}throw e}}}class BinaryReader{constructor(buf){this.buf=buf;this.offset=0}readU8(){const value=this.buf.readUInt8(this.offset);this.offset+=1;return value}readU16(){const value=this.buf.readUInt16LE(this.offset);this.offset+=2;return value}readU32(){const value=this.buf.readUInt32LE(this.offset);this.offset+=4;return value}readU64(){const buf=this.readBuffer(8);return new bn_js_1.default(buf,"le")}readU128(){const buf=this.readBuffer(16);return new bn_js_1.default(buf,"le")}readU256(){const buf=this.readBuffer(32);return new bn_js_1.default(buf,"le")}readU512(){const buf=this.readBuffer(64);return new bn_js_1.default(buf,"le")}readBuffer(len){if(this.offset+len>this.buf.length){throw new BorshError(`Expected buffer length ${len} isn't within bounds`)}const result=this.buf.slice(this.offset,this.offset+len);this.offset+=len;return result}readString(){const len=this.readU32();const buf=this.readBuffer(len);try{return textDecoder.decode(buf)}catch(e){throw new BorshError(`Error decoding UTF-8 string: ${e}`)}}readFixedArray(len){return new Uint8Array(this.readBuffer(len))}readArray(fn){const len=this.readU32();const result=Array();for(let i=0;i{serializeField(schema,fieldName,item,fieldType[0],writer)}))}}else if(fieldType.kind!==undefined){switch(fieldType.kind){case"option":{if(value===null||value===undefined){writer.writeU8(0)}else{writer.writeU8(1);serializeField(schema,fieldName,value,fieldType.type,writer)}break}case"map":{writer.writeU32(value.size);value.forEach(((val,key)=>{serializeField(schema,fieldName,key,fieldType.key,writer);serializeField(schema,fieldName,val,fieldType.value,writer)}));break}default:throw new BorshError(`FieldType ${fieldType} unrecognized`)}}else{serializeStruct(schema,value,writer)}}catch(error){if(error instanceof BorshError){error.addToFieldPath(fieldName)}throw error}}function serializeStruct(schema,obj,writer){if(typeof obj.borshSerialize==="function"){obj.borshSerialize(writer);return}const structSchema=schema.get(obj.constructor);if(!structSchema){throw new BorshError(`Class ${obj.constructor.name} is missing in schema`)}if(structSchema.kind==="struct"){structSchema.fields.map((([fieldName,fieldType])=>{serializeField(schema,fieldName,obj[fieldName],fieldType,writer)}))}else if(structSchema.kind==="enum"){const name=obj[structSchema.field];for(let idx=0;idxdeserializeField(schema,fieldName,fieldType[0],reader)))}}if(fieldType.kind==="option"){const option=reader.readU8();if(option){return deserializeField(schema,fieldName,fieldType.type,reader)}return undefined}if(fieldType.kind==="map"){let map=new Map;const length=reader.readU32();for(let i=0;i=structSchema.values.length){throw new BorshError(`Enum index: ${idx} is out of range`)}const[fieldName,fieldType]=structSchema.values[idx];const fieldValue=deserializeField(schema,fieldName,fieldType,reader);return new classType({[fieldName]:fieldValue})}throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`)}function deserialize(schema,classType,buffer,Reader=BinaryReader){const reader=new Reader(buffer);const result=deserializeStruct(schema,classType,reader);if(reader.offsetPUBLIC_KEY_LENGTH){throw new Error("Invalid public key input")}}return _this}_createClass(PublicKey,[{key:"equals",value:function equals(publicKey){return this._bn.eq(publicKey._bn)}},{key:"toBase58",value:function toBase58(){return bs58$1.encode(this.toBytes())}},{key:"toJSON",value:function toJSON(){return this.toBase58()}},{key:"toBytes",value:function toBytes(){var buf=this.toBuffer();return new Uint8Array(buf.buffer,buf.byteOffset,buf.byteLength)}},{key:"toBuffer",value:function toBuffer(){var b=this._bn.toArrayLike(buffer.Buffer);if(b.length===PUBLIC_KEY_LENGTH){return b}var zeroPad=buffer.Buffer.alloc(32);b.copy(zeroPad,32-b.length);return zeroPad}},{key:_Symbol$toStringTag,get:function get(){return"PublicKey(".concat(this.toString(),")")}},{key:"toString",value:function toString(){return this.toBase58()}}],[{key:"unique",value:function unique(){var key=new PublicKey(uniquePublicKeyCounter);uniquePublicKeyCounter+=1;return new PublicKey(key.toBuffer())}},{key:"createWithSeed",value:function(){var _createWithSeed=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(fromPublicKey,seed,programId){var buffer$1,publicKeyBytes;return _regeneratorRuntime().wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:buffer$1=buffer.Buffer.concat([fromPublicKey.toBuffer(),buffer.Buffer.from(seed),programId.toBuffer()]);publicKeyBytes=sha256$1(buffer$1);return _context.abrupt("return",new PublicKey(publicKeyBytes));case 3:case"end":return _context.stop()}}),_callee)})));function createWithSeed(_x,_x2,_x3){return _createWithSeed.apply(this,arguments)}return createWithSeed}()},{key:"createProgramAddressSync",value:function createProgramAddressSync(seeds,programId){var buffer$1=buffer.Buffer.alloc(0);seeds.forEach((function(seed){if(seed.length>MAX_SEED_LENGTH){throw new TypeError("Max seed length exceeded")}buffer$1=buffer.Buffer.concat([buffer$1,toBuffer(seed)])}));buffer$1=buffer.Buffer.concat([buffer$1,programId.toBuffer(),buffer.Buffer.from("ProgramDerivedAddress")]);var publicKeyBytes=sha256$1(buffer$1);if(isOnCurve(publicKeyBytes)){throw new Error("Invalid seeds, address must fall off the curve")}return new PublicKey(publicKeyBytes)}},{key:"createProgramAddress",value:function(){var _createProgramAddress=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(seeds,programId){return _regeneratorRuntime().wrap((function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:return _context2.abrupt("return",this.createProgramAddressSync(seeds,programId));case 1:case"end":return _context2.stop()}}),_callee2,this)})));function createProgramAddress(_x4,_x5){return _createProgramAddress.apply(this,arguments)}return createProgramAddress}()},{key:"findProgramAddressSync",value:function findProgramAddressSync(seeds,programId){var nonce=255;var address;while(nonce!=0){try{var seedsWithNonce=seeds.concat(buffer.Buffer.from([nonce]));address=this.createProgramAddressSync(seedsWithNonce,programId)}catch(err){if(err instanceof TypeError){throw err}nonce--;continue}return[address,nonce]}throw new Error("Unable to find a viable program address nonce")}},{key:"findProgramAddress",value:function(){var _findProgramAddress=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(seeds,programId){return _regeneratorRuntime().wrap((function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:return _context3.abrupt("return",this.findProgramAddressSync(seeds,programId));case 1:case"end":return _context3.stop()}}),_callee3,this)})));function findProgramAddress(_x6,_x7){return _findProgramAddress.apply(this,arguments)}return findProgramAddress}()},{key:"isOnCurve",value:function isOnCurve$1(pubkeyData){var pubkey=new PublicKey(pubkeyData);return isOnCurve(pubkey.toBytes())}}]);return PublicKey}(Struct$1);PublicKey["default"]=new PublicKey("11111111111111111111111111111111");SOLANA_SCHEMA.set(PublicKey,{kind:"struct",fields:[["_bn","u256"]]});var Account=function(){function Account(secretKey){_classCallCheck(this,Account);this._publicKey=void 0;this._secretKey=void 0;if(secretKey){var secretKeyBuffer=toBuffer(secretKey);if(secretKey.length!==64){throw new Error("bad secret key size")}this._publicKey=secretKeyBuffer.slice(32,64);this._secretKey=secretKeyBuffer.slice(0,32)}else{this._secretKey=toBuffer(generatePrivateKey());this._publicKey=toBuffer(getPublicKey(this._secretKey))}}_createClass(Account,[{key:"publicKey",get:function get(){return new PublicKey(this._publicKey)}},{key:"secretKey",get:function get(){return buffer.Buffer.concat([this._secretKey,this._publicKey],64)}}]);return Account}();var BPF_LOADER_DEPRECATED_PROGRAM_ID=new PublicKey("BPFLoader1111111111111111111111111111111111");var Layout$1={};Object.defineProperty(Layout$1,"__esModule",{value:true});Layout$1.s16=Layout$1.s8=Layout$1.nu64be=Layout$1.u48be=Layout$1.u40be=Layout$1.u32be=Layout$1.u24be=Layout$1.u16be=nu64=Layout$1.nu64=Layout$1.u48=Layout$1.u40=u32=Layout$1.u32=Layout$1.u24=u16=Layout$1.u16=u8=Layout$1.u8=offset=Layout$1.offset=Layout$1.greedy=Layout$1.Constant=Layout$1.UTF8=Layout$1.CString=Layout$1.Blob=Layout$1.Boolean=Layout$1.BitField=Layout$1.BitStructure=Layout$1.VariantLayout=Layout$1.Union=Layout$1.UnionLayoutDiscriminator=Layout$1.UnionDiscriminator=Layout$1.Structure=Layout$1.Sequence=Layout$1.DoubleBE=Layout$1.Double=Layout$1.FloatBE=Layout$1.Float=Layout$1.NearInt64BE=Layout$1.NearInt64=Layout$1.NearUInt64BE=Layout$1.NearUInt64=Layout$1.IntBE=Layout$1.Int=Layout$1.UIntBE=Layout$1.UInt=Layout$1.OffsetLayout=Layout$1.GreedyCount=Layout$1.ExternalLayout=Layout$1.bindConstructorLayout=Layout$1.nameWithProperty=Layout$1.Layout=Layout$1.uint8ArrayToBuffer=Layout$1.checkUint8Array=void 0;Layout$1.constant=Layout$1.utf8=Layout$1.cstr=blob=Layout$1.blob=Layout$1.unionLayoutDiscriminator=Layout$1.union=seq=Layout$1.seq=Layout$1.bits=struct=Layout$1.struct=Layout$1.f64be=Layout$1.f64=Layout$1.f32be=Layout$1.f32=Layout$1.ns64be=Layout$1.s48be=Layout$1.s40be=Layout$1.s32be=Layout$1.s24be=Layout$1.s16be=ns64=Layout$1.ns64=Layout$1.s48=Layout$1.s40=Layout$1.s32=Layout$1.s24=void 0;const buffer_1=buffer;function checkUint8Array(b){if(!(b instanceof Uint8Array)){throw new TypeError("b must be a Uint8Array")}}Layout$1.checkUint8Array=checkUint8Array;function uint8ArrayToBuffer(b){checkUint8Array(b);return buffer_1.Buffer.from(b.buffer,b.byteOffset,b.length)}Layout$1.uint8ArrayToBuffer=uint8ArrayToBuffer;class Layout{constructor(span,property){if(!Number.isInteger(span)){throw new TypeError("span must be an integer")}this.span=span;this.property=property}makeDestinationObject(){return{}}getSpan(b,offset){if(0>this.span){throw new RangeError("indeterminate span")}return this.span}replicate(property){const rv=Object.create(this.constructor.prototype);Object.assign(rv,this);rv.property=property;return rv}fromArray(values){return undefined}}Layout$1.Layout=Layout;function nameWithProperty(name,lo){if(lo.property){return name+"["+lo.property+"]"}return name}Layout$1.nameWithProperty=nameWithProperty;function bindConstructorLayout(Class,layout){if("function"!==typeof Class){throw new TypeError("Class must be constructor")}if(Object.prototype.hasOwnProperty.call(Class,"layout_")){throw new Error("Class is already bound to a layout")}if(!(layout&&layout instanceof Layout)){throw new TypeError("layout must be a Layout")}if(Object.prototype.hasOwnProperty.call(layout,"boundConstructor_")){throw new Error("layout is already bound to a constructor")}Class.layout_=layout;layout.boundConstructor_=Class;layout.makeDestinationObject=()=>new Class;Object.defineProperty(Class.prototype,"encode",{value(b,offset){return layout.encode(this,b,offset)},writable:true});Object.defineProperty(Class,"decode",{value(b,offset){return layout.decode(b,offset)},writable:true})}Layout$1.bindConstructorLayout=bindConstructorLayout;class ExternalLayout extends Layout{isCount(){throw new Error("ExternalLayout is abstract")}}Layout$1.ExternalLayout=ExternalLayout;class GreedyCount extends ExternalLayout{constructor(elementSpan=1,property){if(!Number.isInteger(elementSpan)||0>=elementSpan){throw new TypeError("elementSpan must be a (positive) integer")}super(-1,property);this.elementSpan=elementSpan}isCount(){return true}decode(b,offset=0){checkUint8Array(b);const rem=b.length-offset;return Math.floor(rem/this.elementSpan)}encode(src,b,offset){return 0}}Layout$1.GreedyCount=GreedyCount;class OffsetLayout extends ExternalLayout{constructor(layout,offset=0,property){if(!(layout instanceof Layout)){throw new TypeError("layout must be a Layout")}if(!Number.isInteger(offset)){throw new TypeError("offset must be integer or undefined")}super(layout.span,property||layout.property);this.layout=layout;this.offset=offset}isCount(){return this.layout instanceof UInt||this.layout instanceof UIntBE}decode(b,offset=0){return this.layout.decode(b,offset+this.offset)}encode(src,b,offset=0){return this.layout.encode(src,b,offset+this.offset)}}Layout$1.OffsetLayout=OffsetLayout;class UInt extends Layout{constructor(span,property){super(span,property);if(6span+elo.encode(v,b,offset+span)),0);if(this.count instanceof ExternalLayout){this.count.encode(src.length,b,offset)}return span}}Layout$1.Sequence=Sequence;class Structure extends Layout{constructor(fields,property,decodePrefixes){if(!(Array.isArray(fields)&&fields.reduce(((acc,v)=>acc&&v instanceof Layout),true))){throw new TypeError("fields must be array of Layout instances")}if("boolean"===typeof property&&undefined===decodePrefixes){decodePrefixes=property;property=undefined}for(const fd of fields){if(0>fd.span&&undefined===fd.property){throw new Error("fields cannot contain unnamed variable-length layout")}}let span=-1;try{span=fields.reduce(((span,fd)=>span+fd.getSpan()),0)}catch(e){}super(span,property);this.fields=fields;this.decodePrefixes=!!decodePrefixes}getSpan(b,offset=0){if(0<=this.span){return this.span}let span=0;try{span=this.fields.reduce(((span,fd)=>{const fsp=fd.getSpan(b,offset);offset+=fsp;return span+fsp}),0)}catch(e){throw new RangeError("indeterminate span")}return span}decode(b,offset=0){checkUint8Array(b);const dest=this.makeDestinationObject();for(const fd of this.fields){if(undefined!==fd.property){dest[fd.property]=fd.decode(b,offset)}offset+=fd.getSpan(b,offset);if(this.decodePrefixes&&b.length===offset){break}}return dest}encode(src,b,offset=0){const firstOffset=offset;let lastOffset=0;let lastWrote=0;for(const fd of this.fields){let span=fd.span;lastWrote=0span){span=fd.getSpan(b,offset)}}}lastOffset=offset;offset+=span}return lastOffset+lastWrote-firstOffset}fromArray(values){const dest=this.makeDestinationObject();for(const fd of this.fields){if(undefined!==fd.property&&0fd.span){offset=-1}else if(0<=offset){offset+=fd.span}}return undefined}}Layout$1.Structure=Structure;class UnionDiscriminator{constructor(property){this.property=property}decode(b,offset){throw new Error("UnionDiscriminator is abstract")}encode(src,b,offset){throw new Error("UnionDiscriminator is abstract")}}Layout$1.UnionDiscriminator=UnionDiscriminator;class UnionLayoutDiscriminator extends UnionDiscriminator{constructor(layout,property){if(!(layout instanceof ExternalLayout&&layout.isCount())){throw new TypeError("layout must be an unsigned integer ExternalLayout")}super(property||layout.property||"variant");this.layout=layout}decode(b,offset){return this.layout.decode(b,offset)}encode(src,b,offset){return this.layout.encode(src,b,offset)}}Layout$1.UnionLayoutDiscriminator=UnionLayoutDiscriminator;class Union extends Layout{constructor(discr,defaultLayout,property){let discriminator;if(discr instanceof UInt||discr instanceof UIntBE){discriminator=new UnionLayoutDiscriminator(new OffsetLayout(discr))}else if(discr instanceof ExternalLayout&&discr.isCount()){discriminator=new UnionLayoutDiscriminator(discr)}else if(!(discr instanceof UnionDiscriminator)){throw new TypeError("discr must be a UnionDiscriminator "+"or an unsigned integer layout")}else{discriminator=discr}if(undefined===defaultLayout){defaultLayout=null}if(!(null===defaultLayout||defaultLayout instanceof Layout)){throw new TypeError("defaultLayout must be null or a Layout")}if(null!==defaultLayout){if(0>defaultLayout.span){throw new Error("defaultLayout must have constant span")}if(undefined===defaultLayout.property){defaultLayout=defaultLayout.replicate("content")}}let span=-1;if(defaultLayout){span=defaultLayout.span;if(0<=span&&(discr instanceof UInt||discr instanceof UIntBE)){span+=discriminator.layout.span}}super(span,property);this.discriminator=discriminator;this.usesPrefixDiscriminator=discr instanceof UInt||discr instanceof UIntBE;this.defaultLayout=defaultLayout;this.registry={};let boundGetSourceVariant=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(src){return boundGetSourceVariant(src)};this.configGetSourceVariant=function(gsv){boundGetSourceVariant=gsv.bind(this)}}getSpan(b,offset=0){if(0<=this.span){return this.span}const vlo=this.getVariant(b,offset);if(!vlo){throw new Error("unable to determine span for unrecognized variant")}return vlo.getSpan(b,offset)}defaultGetSourceVariant(src){if(Object.prototype.hasOwnProperty.call(src,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(src,this.defaultLayout.property)){return undefined}const vlo=this.registry[src[this.discriminator.property]];if(vlo&&(!vlo.layout||vlo.property&&Object.prototype.hasOwnProperty.call(src,vlo.property))){return vlo}}else{for(const tag in this.registry){const vlo=this.registry[tag];if(vlo.property&&Object.prototype.hasOwnProperty.call(src,vlo.property)){return vlo}}}throw new Error("unable to infer src variant")}decode(b,offset=0){let dest;const dlo=this.discriminator;const discr=dlo.decode(b,offset);const clo=this.registry[discr];if(undefined===clo){const defaultLayout=this.defaultLayout;let contentOffset=0;if(this.usesPrefixDiscriminator){contentOffset=dlo.layout.span}dest=this.makeDestinationObject();dest[dlo.property]=discr;dest[defaultLayout.property]=defaultLayout.decode(b,offset+contentOffset)}else{dest=clo.decode(b,offset)}return dest}encode(src,b,offset=0){const vlo=this.getSourceVariant(src);if(undefined===vlo){const dlo=this.discriminator;const clo=this.defaultLayout;let contentOffset=0;if(this.usesPrefixDiscriminator){contentOffset=dlo.layout.span}dlo.encode(src[dlo.property],b,offset);return contentOffset+clo.encode(src[clo.property],b,offset+contentOffset)}return vlo.encode(src,b,offset)}addVariant(variant,layout,property){const rv=new VariantLayout(this,variant,layout,property);this.registry[variant]=rv;return rv}getVariant(vb,offset=0){let variant;if(vb instanceof Uint8Array){variant=this.discriminator.decode(vb,offset)}else{variant=vb}return this.registry[variant]}}Layout$1.Union=Union;class VariantLayout extends Layout{constructor(union,variant,layout,property){if(!(union instanceof Union)){throw new TypeError("union must be a Union")}if(!Number.isInteger(variant)||0>variant){throw new TypeError("variant must be a (non-negative) integer")}if("string"===typeof layout&&undefined===property){property=layout;layout=null}if(layout){if(!(layout instanceof Layout)){throw new TypeError("layout must be a Layout")}if(null!==union.defaultLayout&&0<=layout.span&&layout.span>union.defaultLayout.span){throw new Error("variant span exceeds span of containing union")}if("string"!==typeof property){throw new TypeError("variant must have a String property")}}let span=union.span;if(0>union.span){span=layout?layout.span:0;if(0<=span&&union.usesPrefixDiscriminator){span+=union.discriminator.layout.span}}super(span,property);this.union=union;this.variant=variant;this.layout=layout||null}getSpan(b,offset=0){if(0<=this.span){return this.span}let contentOffset=0;if(this.union.usesPrefixDiscriminator){contentOffset=this.union.discriminator.layout.span}let span=0;if(this.layout){span=this.layout.getSpan(b,offset+contentOffset)}return contentOffset+span}decode(b,offset=0){const dest=this.makeDestinationObject();if(this!==this.union.getVariant(b,offset)){throw new Error("variant mismatch")}let contentOffset=0;if(this.union.usesPrefixDiscriminator){contentOffset=this.union.discriminator.layout.span}if(this.layout){dest[this.property]=this.layout.decode(b,offset+contentOffset)}else if(this.property){dest[this.property]=true}else if(this.union.usesPrefixDiscriminator){dest[this.union.discriminator.property]=this.variant}return dest}encode(src,b,offset=0){let contentOffset=0;if(this.union.usesPrefixDiscriminator){contentOffset=this.union.discriminator.layout.span}if(this.layout&&!Object.prototype.hasOwnProperty.call(src,this.property)){throw new TypeError("variant lacks property "+this.property)}this.union.discriminator.encode(this.variant,b,offset);let span=contentOffset;if(this.layout){this.layout.encode(src[this.property],b,offset+contentOffset);span+=this.layout.getSpan(b,offset+contentOffset);if(0<=this.union.span&&span>this.union.span){throw new Error("encoded variant overruns containing union")}}return span}fromArray(values){if(this.layout){return this.layout.fromArray(values)}return undefined}}Layout$1.VariantLayout=VariantLayout;function fixBitwiseResult(v){if(0>v){v+=4294967296}return v}class BitStructure extends Layout{constructor(word,msb,property){if(!(word instanceof UInt||word instanceof UIntBE)){throw new TypeError("word must be a UInt or UIntBE layout")}if("string"===typeof msb&&undefined===property){property=msb;msb=false}if(4=bits){throw new TypeError("bits must be positive integer")}const totalBits=8*container.span;const usedBits=container.fields.reduce(((sum,fd)=>sum+fd.bits),0);if(bits+usedBits>totalBits){throw new Error("bits too long for span remainder ("+(totalBits-usedBits)+" of "+totalBits+" remain)")}this.container=container;this.bits=bits;this.valueMask=(1<>>this.start;return value}encode(value){if("number"!==typeof value||!Number.isInteger(value)||value!==fixBitwiseResult(value&this.valueMask)){throw new TypeError(nameWithProperty("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask)}const word=this.container._packedGetValue();const wordValue=fixBitwiseResult(value<span){span=this.length.decode(b,offset)}return span}decode(b,offset=0){let span=this.span;if(0>span){span=this.length.decode(b,offset)}return uint8ArrayToBuffer(b).slice(offset,offset+span)}encode(src,b,offset){let span=this.length;if(this.length instanceof ExternalLayout){span=src.length}if(!(src instanceof Uint8Array&&span===src.length)){throw new TypeError(nameWithProperty("Blob.encode",this)+" requires (length "+span+") Uint8Array as src")}if(offset+span>b.length){throw new RangeError("encoding overruns Uint8Array")}const srcBuffer=uint8ArrayToBuffer(src);uint8ArrayToBuffer(b).write(srcBuffer.toString("hex"),offset,span,"hex");if(this.length instanceof ExternalLayout){this.length.encode(span,b,offset)}return span}}Layout$1.Blob=Blob;class CString extends Layout{constructor(property){super(-1,property)}getSpan(b,offset=0){checkUint8Array(b);let idx=offset;while(idxb.length){throw new RangeError("encoding overruns Buffer")}const buffer=uint8ArrayToBuffer(b);srcb.copy(buffer,offset);buffer[offset+span]=0;return span+1}}Layout$1.CString=CString;class UTF8 extends Layout{constructor(maxSpan,property){if("string"===typeof maxSpan&&undefined===property){property=maxSpan;maxSpan=undefined}if(undefined===maxSpan){maxSpan=-1}else if(!Number.isInteger(maxSpan)){throw new TypeError("maxSpan must be an integer")}super(-1,property);this.maxSpan=maxSpan}getSpan(b,offset=0){checkUint8Array(b);return b.length-offset}decode(b,offset=0){const span=this.getSpan(b,offset);if(0<=this.maxSpan&&this.maxSpanb.length){throw new RangeError("encoding overruns Buffer")}srcb.copy(uint8ArrayToBuffer(b),offset);return span}}Layout$1.UTF8=UTF8;class Constant extends Layout{constructor(value,property){super(0,property);this.value=value}decode(b,offset){return this.value}encode(src,b,offset){return 0}}Layout$1.Constant=Constant;Layout$1.greedy=(elementSpan,property)=>new GreedyCount(elementSpan,property);var offset=Layout$1.offset=(layout,offset,property)=>new OffsetLayout(layout,offset,property);var u8=Layout$1.u8=property=>new UInt(1,property);var u16=Layout$1.u16=property=>new UInt(2,property);Layout$1.u24=property=>new UInt(3,property);var u32=Layout$1.u32=property=>new UInt(4,property);Layout$1.u40=property=>new UInt(5,property);Layout$1.u48=property=>new UInt(6,property);var nu64=Layout$1.nu64=property=>new NearUInt64(property);Layout$1.u16be=property=>new UIntBE(2,property);Layout$1.u24be=property=>new UIntBE(3,property);Layout$1.u32be=property=>new UIntBE(4,property);Layout$1.u40be=property=>new UIntBE(5,property);Layout$1.u48be=property=>new UIntBE(6,property);Layout$1.nu64be=property=>new NearUInt64BE(property);Layout$1.s8=property=>new Int(1,property);Layout$1.s16=property=>new Int(2,property);Layout$1.s24=property=>new Int(3,property);Layout$1.s32=property=>new Int(4,property);Layout$1.s40=property=>new Int(5,property);Layout$1.s48=property=>new Int(6,property);var ns64=Layout$1.ns64=property=>new NearInt64(property);Layout$1.s16be=property=>new IntBE(2,property);Layout$1.s24be=property=>new IntBE(3,property);Layout$1.s32be=property=>new IntBE(4,property);Layout$1.s40be=property=>new IntBE(5,property);Layout$1.s48be=property=>new IntBE(6,property);Layout$1.ns64be=property=>new NearInt64BE(property);Layout$1.f32=property=>new Float(property);Layout$1.f32be=property=>new FloatBE(property);Layout$1.f64=property=>new Double(property);Layout$1.f64be=property=>new DoubleBE(property);var struct=Layout$1.struct=(fields,property,decodePrefixes)=>new Structure(fields,property,decodePrefixes);Layout$1.bits=(word,msb,property)=>new BitStructure(word,msb,property);var seq=Layout$1.seq=(elementLayout,count,property)=>new Sequence(elementLayout,count,property);Layout$1.union=(discr,defaultLayout,property)=>new Union(discr,defaultLayout,property);Layout$1.unionLayoutDiscriminator=(layout,property)=>new UnionLayoutDiscriminator(layout,property);var blob=Layout$1.blob=(length,property)=>new Blob(length,property);Layout$1.cstr=property=>new CString(property);Layout$1.utf8=(maxSpan,property)=>new UTF8(maxSpan,property);Layout$1.constant=(value,property)=>new Constant(value,property);var PACKET_DATA_SIZE=1280-40-8;var VERSION_PREFIX_MASK=127;var SIGNATURE_LENGTH_IN_BYTES=64;var TransactionExpiredBlockheightExceededError=function(_Error){_inherits(TransactionExpiredBlockheightExceededError,_Error);var _super=_createSuper(TransactionExpiredBlockheightExceededError);function TransactionExpiredBlockheightExceededError(signature){var _this;_classCallCheck(this,TransactionExpiredBlockheightExceededError);_this=_super.call(this,"Signature ".concat(signature," has expired: block height exceeded."));_this.signature=void 0;_this.signature=signature;return _this}return _createClass(TransactionExpiredBlockheightExceededError)}(_wrapNativeSuper(Error));Object.defineProperty(TransactionExpiredBlockheightExceededError.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});var TransactionExpiredTimeoutError=function(_Error2){_inherits(TransactionExpiredTimeoutError,_Error2);var _super2=_createSuper(TransactionExpiredTimeoutError);function TransactionExpiredTimeoutError(signature,timeoutSeconds){var _this2;_classCallCheck(this,TransactionExpiredTimeoutError);_this2=_super2.call(this,"Transaction was not confirmed in ".concat(timeoutSeconds.toFixed(2)," seconds. It is ")+"unknown if it succeeded or failed. Check signature "+"".concat(signature," using the Solana Explorer or CLI tools."));_this2.signature=void 0;_this2.signature=signature;return _this2}return _createClass(TransactionExpiredTimeoutError)}(_wrapNativeSuper(Error));Object.defineProperty(TransactionExpiredTimeoutError.prototype,"name",{value:"TransactionExpiredTimeoutError"});var TransactionExpiredNonceInvalidError=function(_Error3){_inherits(TransactionExpiredNonceInvalidError,_Error3);var _super3=_createSuper(TransactionExpiredNonceInvalidError);function TransactionExpiredNonceInvalidError(signature){var _this3;_classCallCheck(this,TransactionExpiredNonceInvalidError);_this3=_super3.call(this,"Signature ".concat(signature," has expired: the nonce is no longer valid."));_this3.signature=void 0;_this3.signature=signature;return _this3}return _createClass(TransactionExpiredNonceInvalidError)}(_wrapNativeSuper(Error));Object.defineProperty(TransactionExpiredNonceInvalidError.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});var MessageAccountKeys=function(){function MessageAccountKeys(staticAccountKeys,accountKeysFromLookups){_classCallCheck(this,MessageAccountKeys);this.staticAccountKeys=void 0;this.accountKeysFromLookups=void 0;this.staticAccountKeys=staticAccountKeys;this.accountKeysFromLookups=accountKeysFromLookups}_createClass(MessageAccountKeys,[{key:"keySegments",value:function keySegments(){var keySegments=[this.staticAccountKeys];if(this.accountKeysFromLookups){keySegments.push(this.accountKeysFromLookups.writable);keySegments.push(this.accountKeysFromLookups.readonly)}return keySegments}},{key:"get",value:function get(index){var _iterator=_createForOfIteratorHelper(this.keySegments()),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var keySegment=_step.value;if(indexU8_MAX+1){throw new Error("Account index overflow encountered during compilation")}var keyIndexMap=new Map;this.keySegments().flat().forEach((function(key,index){keyIndexMap.set(key.toBase58(),index)}));var findKeyIndex=function findKeyIndex(key){var keyIndex=keyIndexMap.get(key.toBase58());if(keyIndex===undefined)throw new Error("Encountered an unknown instruction account key during compilation");return keyIndex};return instructions.map((function(instruction){return{programIdIndex:findKeyIndex(instruction.programId),accountKeyIndexes:instruction.keys.map((function(meta){return findKeyIndex(meta.pubkey)})),data:instruction.data}}))}}]);return MessageAccountKeys}();var publicKey=function publicKey(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"publicKey";return blob(32,property)};var signature=function signature(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"signature";return blob(64,property)};var rustString=function rustString(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"string";var rsl=struct([u32("length"),u32("lengthPadding"),blob(offset(u32(),-8),"chars")],property);var _decode=rsl.decode.bind(rsl);var _encode=rsl.encode.bind(rsl);var rslShim=rsl;rslShim.decode=function(b,offset){var data=_decode(b,offset);return data["chars"].toString()};rslShim.encode=function(str,b,offset){var data={chars:buffer.Buffer.from(str,"utf8")};return _encode(data,b,offset)};rslShim.alloc=function(str){return u32().span+u32().span+buffer.Buffer.from(str,"utf8").length};return rslShim};var authorized=function authorized(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"authorized";return struct([publicKey("staker"),publicKey("withdrawer")],property)};var lockup=function lockup(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"lockup";return struct([ns64("unixTimestamp"),ns64("epoch"),publicKey("custodian")],property)};var voteInit=function voteInit(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"voteInit";return struct([publicKey("nodePubkey"),publicKey("authorizedVoter"),publicKey("authorizedWithdrawer"),u8("commission")],property)};var voteAuthorizeWithSeedArgs=function voteAuthorizeWithSeedArgs(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"voteAuthorizeWithSeedArgs";return struct([u32("voteAuthorizationType"),publicKey("currentAuthorityDerivedKeyOwnerPubkey"),rustString("currentAuthorityDerivedKeySeed"),publicKey("newAuthorized")],property)};function getAlloc(type,fields){var getItemAlloc=function getItemAlloc(item){if(item.span>=0){return item.span}else if(typeof item.alloc==="function"){return item.alloc(fields[item.property])}else if("count"in item&&"elementLayout"in item){var field=fields[item.property];if(Array.isArray(field)){return field.length*getItemAlloc(item.elementLayout)}}else if("fields"in item){return getAlloc({layout:item},fields[item.property])}return 0};var alloc=0;type.layout.fields.forEach((function(item){alloc+=getItemAlloc(item)}));return alloc}function decodeLength(bytes){var len=0;var size=0;for(;;){var elem=bytes.shift();len|=(elem&127)<>=7;if(rem_len==0){bytes.push(elem);break}else{elem|=128;bytes.push(elem)}}}function assert$1(condition,message){if(!condition){throw new Error(message||"Assertion failed")}}var CompiledKeys=function(){function CompiledKeys(payer,keyMetaMap){_classCallCheck(this,CompiledKeys);this.payer=void 0;this.keyMetaMap=void 0;this.payer=payer;this.keyMetaMap=keyMetaMap}_createClass(CompiledKeys,[{key:"getMessageComponents",value:function getMessageComponents(){var mapEntries=_toConsumableArray(this.keyMetaMap.entries());assert$1(mapEntries.length<=256,"Max static account keys length exceeded");var writableSigners=mapEntries.filter((function(_ref){var _ref2=_slicedToArray(_ref,2),meta=_ref2[1];return meta.isSigner&&meta.isWritable}));var readonlySigners=mapEntries.filter((function(_ref3){var _ref4=_slicedToArray(_ref3,2),meta=_ref4[1];return meta.isSigner&&!meta.isWritable}));var writableNonSigners=mapEntries.filter((function(_ref5){var _ref6=_slicedToArray(_ref5,2),meta=_ref6[1];return!meta.isSigner&&meta.isWritable}));var readonlyNonSigners=mapEntries.filter((function(_ref7){var _ref8=_slicedToArray(_ref7,2),meta=_ref8[1];return!meta.isSigner&&!meta.isWritable}));var header={numRequiredSignatures:writableSigners.length+readonlySigners.length,numReadonlySignedAccounts:readonlySigners.length,numReadonlyUnsignedAccounts:readonlyNonSigners.length};{assert$1(writableSigners.length>0,"Expected at least one writable signer key");var _writableSigners$=_slicedToArray(writableSigners[0],1),payerAddress=_writableSigners$[0];assert$1(payerAddress===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}var staticAccountKeys=[].concat(_toConsumableArray(writableSigners.map((function(_ref9){var _ref10=_slicedToArray(_ref9,1),address=_ref10[0];return new PublicKey(address)}))),_toConsumableArray(readonlySigners.map((function(_ref11){var _ref12=_slicedToArray(_ref11,1),address=_ref12[0];return new PublicKey(address)}))),_toConsumableArray(writableNonSigners.map((function(_ref13){var _ref14=_slicedToArray(_ref13,1),address=_ref14[0];return new PublicKey(address)}))),_toConsumableArray(readonlyNonSigners.map((function(_ref15){var _ref16=_slicedToArray(_ref15,1),address=_ref16[0];return new PublicKey(address)}))));return[header,staticAccountKeys]}},{key:"extractTableLookup",value:function extractTableLookup(lookupTable){var _this$drainKeysFoundI=this.drainKeysFoundInLookupTable(lookupTable.state.addresses,(function(keyMeta){return!keyMeta.isSigner&&!keyMeta.isInvoked&&keyMeta.isWritable})),_this$drainKeysFoundI2=_slicedToArray(_this$drainKeysFoundI,2),writableIndexes=_this$drainKeysFoundI2[0],drainedWritableKeys=_this$drainKeysFoundI2[1];var _this$drainKeysFoundI3=this.drainKeysFoundInLookupTable(lookupTable.state.addresses,(function(keyMeta){return!keyMeta.isSigner&&!keyMeta.isInvoked&&!keyMeta.isWritable})),_this$drainKeysFoundI4=_slicedToArray(_this$drainKeysFoundI3,2),readonlyIndexes=_this$drainKeysFoundI4[0],drainedReadonlyKeys=_this$drainKeysFoundI4[1];if(writableIndexes.length===0&&readonlyIndexes.length===0){return}return[{accountKey:lookupTable.key,writableIndexes:writableIndexes,readonlyIndexes:readonlyIndexes},{writable:drainedWritableKeys,readonly:drainedReadonlyKeys}]}},{key:"drainKeysFoundInLookupTable",value:function drainKeysFoundInLookupTable(lookupTableEntries,keyMetaFilter){var _this=this;var lookupTableIndexes=new Array;var drainedKeys=new Array;var _iterator=_createForOfIteratorHelper(this.keyMetaMap.entries()),_step;try{var _loop=function _loop(){var _step$value=_slicedToArray(_step.value,2),address=_step$value[0],keyMeta=_step$value[1];if(keyMetaFilter(keyMeta)){var key=new PublicKey(address);var lookupTableIndex=lookupTableEntries.findIndex((function(entry){return entry.equals(key)}));if(lookupTableIndex>=0){assert$1(lookupTableIndex<256,"Max lookup table index exceeded");lookupTableIndexes.push(lookupTableIndex);drainedKeys.push(key);_this.keyMetaMap["delete"](address)}}};for(_iterator.s();!(_step=_iterator.n()).done;){_loop()}}catch(err){_iterator.e(err)}finally{_iterator.f()}return[lookupTableIndexes,drainedKeys]}}],[{key:"compile",value:function compile(instructions,payer){var keyMetaMap=new Map;var getOrInsertDefault=function getOrInsertDefault(pubkey){var address=pubkey.toBase58();var keyMeta=keyMetaMap.get(address);if(keyMeta===undefined){keyMeta={isSigner:false,isWritable:false,isInvoked:false};keyMetaMap.set(address,keyMeta)}return keyMeta};var payerKeyMeta=getOrInsertDefault(payer);payerKeyMeta.isSigner=true;payerKeyMeta.isWritable=true;var _iterator2=_createForOfIteratorHelper(instructions),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var ix=_step2.value;getOrInsertDefault(ix.programId).isInvoked=true;var _iterator3=_createForOfIteratorHelper(ix.keys),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var accountMeta=_step3.value;var _keyMeta=getOrInsertDefault(accountMeta.pubkey);_keyMeta.isSigner||(_keyMeta.isSigner=accountMeta.isSigner);_keyMeta.isWritable||(_keyMeta.isWritable=accountMeta.isWritable)}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}return new CompiledKeys(payer,keyMetaMap)}}]);return CompiledKeys}();var Message=function(){function Message(args){var _this=this;_classCallCheck(this,Message);this.header=void 0;this.accountKeys=void 0;this.recentBlockhash=void 0;this.instructions=void 0;this.indexToProgramIds=new Map;this.header=args.header;this.accountKeys=args.accountKeys.map((function(account){return new PublicKey(account)}));this.recentBlockhash=args.recentBlockhash;this.instructions=args.instructions;this.instructions.forEach((function(ix){return _this.indexToProgramIds.set(ix.programIdIndex,_this.accountKeys[ix.programIdIndex])}))}_createClass(Message,[{key:"version",get:function get(){return"legacy"}},{key:"staticAccountKeys",get:function get(){return this.accountKeys}},{key:"compiledInstructions",get:function get(){return this.instructions.map((function(ix){return{programIdIndex:ix.programIdIndex,accountKeyIndexes:ix.accounts,data:bs58$1.decode(ix.data)}}))}},{key:"addressTableLookups",get:function get(){return[]}},{key:"getAccountKeys",value:function getAccountKeys(){return new MessageAccountKeys(this.staticAccountKeys)}},{key:"isAccountSigner",value:function isAccountSigner(index){return index=this.header.numRequiredSignatures){var unsignedAccountIndex=index-numSignedAccounts;var numUnsignedAccounts=this.accountKeys.length-numSignedAccounts;var numWritableUnsignedAccounts=numUnsignedAccounts-this.header.numReadonlyUnsignedAccounts;return unsignedAccountIndex0){throw new Error("Failed to get account keys because address table lookups were not resolved")}return new MessageAccountKeys(this.staticAccountKeys,accountKeysFromLookups)}},{key:"isAccountSigner",value:function isAccountSigner(index){return index=numStaticAccountKeys){var lookupAccountKeysIndex=index-numStaticAccountKeys;var numWritableLookupAccountKeys=this.addressTableLookups.reduce((function(count,lookup){return count+lookup.writableIndexes.length}),0);return lookupAccountKeysIndex=this.header.numRequiredSignatures){var unsignedAccountIndex=index-numSignedAccounts;var numUnsignedAccounts=numStaticAccountKeys-numSignedAccounts;var numWritableUnsignedAccounts=numUnsignedAccounts-this.header.numReadonlyUnsignedAccounts;return unsignedAccountIndex0){return this.signatures[0].signature}return null}},{key:"toJSON",value:function toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map((function(instruction){return instruction.toJSON()})),signers:this.signatures.map((function(_ref5){var publicKey=_ref5.publicKey;return publicKey.toJSON()}))}}},{key:"add",value:function add(){var _this=this;for(var _len=arguments.length,items=new Array(_len),_key=0;_key<_len;_key++){items[_key]=arguments[_key]}if(items.length===0){throw new Error("No instructions")}items.forEach((function(item){if("instructions"in item){_this.instructions=_this.instructions.concat(item.instructions)}else if("data"in item&&"programId"in item&&"keys"in item){_this.instructions.push(item)}else{_this.instructions.push(new TransactionInstruction(item))}}));return this}},{key:"compileMessage",value:function compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json)){return this._message}var recentBlockhash;var instructions;if(this.nonceInfo){recentBlockhash=this.nonceInfo.nonce;if(this.instructions[0]!=this.nonceInfo.nonceInstruction){instructions=[this.nonceInfo.nonceInstruction].concat(_toConsumableArray(this.instructions))}else{instructions=this.instructions}}else{recentBlockhash=this.recentBlockhash;instructions=this.instructions}if(!recentBlockhash){throw new Error("Transaction recentBlockhash required")}if(instructions.length<1){console.warn("No instructions provided")}var feePayer;if(this.feePayer){feePayer=this.feePayer}else if(this.signatures.length>0&&this.signatures[0].publicKey){feePayer=this.signatures[0].publicKey}else{throw new Error("Transaction fee payer required")}for(var i=0;i-1){uniqueMetas[uniqueIndex].isWritable=uniqueMetas[uniqueIndex].isWritable||accountMeta.isWritable;uniqueMetas[uniqueIndex].isSigner=uniqueMetas[uniqueIndex].isSigner||accountMeta.isSigner}else{uniqueMetas.push(accountMeta)}}));uniqueMetas.sort((function(x,y){if(x.isSigner!==y.isSigner){return x.isSigner?-1:1}if(x.isWritable!==y.isWritable){return x.isWritable?-1:1}var options={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:false,numeric:false,caseFirst:"lower"};return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58(),"en",options)}));var feePayerIndex=uniqueMetas.findIndex((function(x){return x.pubkey.equals(feePayer)}));if(feePayerIndex>-1){var _uniqueMetas$splice=uniqueMetas.splice(feePayerIndex,1),_uniqueMetas$splice2=_slicedToArray(_uniqueMetas$splice,1),payerMeta=_uniqueMetas$splice2[0];payerMeta.isSigner=true;payerMeta.isWritable=true;uniqueMetas.unshift(payerMeta)}else{uniqueMetas.unshift({pubkey:feePayer,isSigner:true,isWritable:true})}var _iterator=_createForOfIteratorHelper(this.signatures),_step;try{var _loop=function _loop(){var signature=_step.value;var uniqueIndex=uniqueMetas.findIndex((function(x){return x.pubkey.equals(signature.publicKey)}));if(uniqueIndex>-1){if(!uniqueMetas[uniqueIndex].isSigner){uniqueMetas[uniqueIndex].isSigner=true;console.warn("Transaction references a signature that is unnecessary, "+"only the fee payer and instruction signer accounts should sign a transaction. "+"This behavior is deprecated and will throw an error in the next major version release.")}}else{throw new Error("unknown signer: ".concat(signature.publicKey.toString()))}};for(_iterator.s();!(_step=_iterator.n()).done;){_loop()}}catch(err){_iterator.e(err)}finally{_iterator.f()}var numRequiredSignatures=0;var numReadonlySignedAccounts=0;var numReadonlyUnsignedAccounts=0;var signedKeys=[];var unsignedKeys=[];uniqueMetas.forEach((function(_ref6){var pubkey=_ref6.pubkey,isSigner=_ref6.isSigner,isWritable=_ref6.isWritable;if(isSigner){signedKeys.push(pubkey.toString());numRequiredSignatures+=1;if(!isWritable){numReadonlySignedAccounts+=1}}else{unsignedKeys.push(pubkey.toString());if(!isWritable){numReadonlyUnsignedAccounts+=1}}}));var accountKeys=signedKeys.concat(unsignedKeys);var compiledInstructions=instructions.map((function(instruction){var data=instruction.data,programId=instruction.programId;return{programIdIndex:accountKeys.indexOf(programId.toString()),accounts:instruction.keys.map((function(meta){return accountKeys.indexOf(meta.pubkey.toString())})),data:bs58$1.encode(data)}}));compiledInstructions.forEach((function(instruction){assert$1(instruction.programIdIndex>=0);instruction.accounts.forEach((function(keyIndex){return assert$1(keyIndex>=0)}))}));return new Message({header:{numRequiredSignatures:numRequiredSignatures,numReadonlySignedAccounts:numReadonlySignedAccounts,numReadonlyUnsignedAccounts:numReadonlyUnsignedAccounts},accountKeys:accountKeys,recentBlockhash:recentBlockhash,instructions:compiledInstructions})}},{key:"_compile",value:function _compile(){var message=this.compileMessage();var signedKeys=message.accountKeys.slice(0,message.header.numRequiredSignatures);if(this.signatures.length===signedKeys.length){var valid=this.signatures.every((function(pair,index){return signedKeys[index].equals(pair.publicKey)}));if(valid)return message}this.signatures=signedKeys.map((function(publicKey){return{signature:null,publicKey:publicKey}}));return message}},{key:"serializeMessage",value:function serializeMessage(){return this._compile().serialize()}},{key:"getEstimatedFee",value:function(){var _getEstimatedFee=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(connection){return _regeneratorRuntime().wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return connection.getFeeForMessage(this.compileMessage());case 2:return _context.abrupt("return",_context.sent.value);case 3:case"end":return _context.stop()}}),_callee,this)})));function getEstimatedFee(_x){return _getEstimatedFee.apply(this,arguments)}return getEstimatedFee}()},{key:"setSigners",value:function setSigners(){for(var _len2=arguments.length,signers=new Array(_len2),_key2=0;_key2<_len2;_key2++){signers[_key2]=arguments[_key2]}if(signers.length===0){throw new Error("No signers")}var seen=new Set;this.signatures=signers.filter((function(publicKey){var key=publicKey.toString();if(seen.has(key)){return false}else{seen.add(key);return true}})).map((function(publicKey){return{signature:null,publicKey:publicKey}}))}},{key:"sign",value:function sign(){for(var _len3=arguments.length,signers=new Array(_len3),_key3=0;_key3<_len3;_key3++){signers[_key3]=arguments[_key3]}if(signers.length===0){throw new Error("No signers")}var seen=new Set;var uniqueSigners=[];for(var _i=0,_signers=signers;_i<_signers.length;_i++){var signer=_signers[_i];var key=signer.publicKey.toString();if(seen.has(key)){continue}else{seen.add(key);uniqueSigners.push(signer)}}this.signatures=uniqueSigners.map((function(signer){return{signature:null,publicKey:signer.publicKey}}));var message=this._compile();this._partialSign.apply(this,[message].concat(uniqueSigners))}},{key:"partialSign",value:function partialSign(){for(var _len4=arguments.length,signers=new Array(_len4),_key4=0;_key4<_len4;_key4++){signers[_key4]=arguments[_key4]}if(signers.length===0){throw new Error("No signers")}var seen=new Set;var uniqueSigners=[];for(var _i2=0,_signers2=signers;_i2<_signers2.length;_i2++){var signer=_signers2[_i2];var key=signer.publicKey.toString();if(seen.has(key)){continue}else{seen.add(key);uniqueSigners.push(signer)}}var message=this._compile();this._partialSign.apply(this,[message].concat(uniqueSigners))}},{key:"_partialSign",value:function _partialSign(message){var _this2=this;var signData=message.serialize();for(var _len5=arguments.length,signers=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++){signers[_key5-1]=arguments[_key5]}signers.forEach((function(signer){var signature=sign(signData,signer.secretKey);_this2._addSignature(signer.publicKey,toBuffer(signature))}))}},{key:"addSignature",value:function addSignature(pubkey,signature){this._compile();this._addSignature(pubkey,signature)}},{key:"_addSignature",value:function _addSignature(pubkey,signature){assert$1(signature.length===64);var index=this.signatures.findIndex((function(sigpair){return pubkey.equals(sigpair.publicKey)}));if(index<0){throw new Error("unknown signer: ".concat(pubkey.toString()))}this.signatures[index].signature=buffer.Buffer.from(signature)}},{key:"verifySignatures",value:function verifySignatures(requireAllSignatures){return this._verifySignatures(this.serializeMessage(),requireAllSignatures===undefined?true:requireAllSignatures)}},{key:"_verifySignatures",value:function _verifySignatures(signData,requireAllSignatures){var _iterator2=_createForOfIteratorHelper(this.signatures),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _step2$value=_step2.value,signature=_step2$value.signature,publicKey=_step2$value.publicKey;if(signature===null){if(requireAllSignatures){return false}}else{if(!verify(signature,signData,publicKey.toBytes())){return false}}}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}return true}},{key:"serialize",value:function serialize(config){var _Object$assign=Object.assign({requireAllSignatures:true,verifySignatures:true},config),requireAllSignatures=_Object$assign.requireAllSignatures,verifySignatures=_Object$assign.verifySignatures;var signData=this.serializeMessage();if(verifySignatures&&!this._verifySignatures(signData,requireAllSignatures)){throw new Error("Signature verification failed")}return this._serialize(signData)}},{key:"_serialize",value:function _serialize(signData){var signatures=this.signatures;var signatureCount=[];encodeLength(signatureCount,signatures.length);var transactionLength=signatureCount.length+signatures.length*64+signData.length;var wireTransaction=buffer.Buffer.alloc(transactionLength);assert$1(signatures.length<256);buffer.Buffer.from(signatureCount).copy(wireTransaction,0);signatures.forEach((function(_ref7,index){var signature=_ref7.signature;if(signature!==null){assert$1(signature.length===64,"signature has invalid length");buffer.Buffer.from(signature).copy(wireTransaction,signatureCount.length+index*64)}}));signData.copy(wireTransaction,signatureCount.length+signatures.length*64);assert$1(wireTransaction.length<=PACKET_DATA_SIZE,"Transaction too large: ".concat(wireTransaction.length," > ").concat(PACKET_DATA_SIZE));return wireTransaction}},{key:"keys",get:function get(){assert$1(this.instructions.length===1);return this.instructions[0].keys.map((function(keyObj){return keyObj.pubkey}))}},{key:"programId",get:function get(){assert$1(this.instructions.length===1);return this.instructions[0].programId}},{key:"data",get:function get(){assert$1(this.instructions.length===1);return this.instructions[0].data}}],[{key:"from",value:function from(buffer$1){var byteArray=_toConsumableArray(buffer$1);var signatureCount=decodeLength(byteArray);var signatures=[];for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:[];var transaction=new Transaction;transaction.recentBlockhash=message.recentBlockhash;if(message.header.numRequiredSignatures>0){transaction.feePayer=message.accountKeys[0]}signatures.forEach((function(signature,index){var sigPubkeyPair={signature:signature==bs58$1.encode(DEFAULT_SIGNATURE)?null:bs58$1.decode(signature),publicKey:message.accountKeys[index]};transaction.signatures.push(sigPubkeyPair)}));message.instructions.forEach((function(instruction){var keys=instruction.accounts.map((function(account){var pubkey=message.accountKeys[account];return{pubkey:pubkey,isSigner:transaction.signatures.some((function(keyObj){return keyObj.publicKey.toString()===pubkey.toString()}))||message.isAccountSigner(account),isWritable:message.isAccountWritable(account)}}));transaction.instructions.push(new TransactionInstruction({keys:keys,programId:message.accountKeys[instruction.programIdIndex],data:bs58$1.decode(instruction.data)}))}));transaction._message=message;transaction._json=transaction.toJSON();return transaction}}]);return Transaction}();var TransactionMessage=function(){function TransactionMessage(args){_classCallCheck(this,TransactionMessage);this.payerKey=void 0;this.instructions=void 0;this.recentBlockhash=void 0;this.payerKey=args.payerKey;this.instructions=args.instructions;this.recentBlockhash=args.recentBlockhash}_createClass(TransactionMessage,[{key:"compileToLegacyMessage",value:function compileToLegacyMessage(){return Message.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions})}},{key:"compileToV0Message",value:function compileToV0Message(addressLookupTableAccounts){return MessageV0.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions,addressLookupTableAccounts:addressLookupTableAccounts})}}],[{key:"decompile",value:function decompile(message,args){var header=message.header,compiledInstructions=message.compiledInstructions,recentBlockhash=message.recentBlockhash;var numRequiredSignatures=header.numRequiredSignatures,numReadonlySignedAccounts=header.numReadonlySignedAccounts,numReadonlyUnsignedAccounts=header.numReadonlyUnsignedAccounts;var numWritableSignedAccounts=numRequiredSignatures-numReadonlySignedAccounts;assert$1(numWritableSignedAccounts>0,"Message header is invalid");var numWritableUnsignedAccounts=message.staticAccountKeys.length-numRequiredSignatures-numReadonlyUnsignedAccounts;assert$1(numWritableUnsignedAccounts>=0,"Message header is invalid");var accountKeys=message.getAccountKeys(args);var payerKey=accountKeys.get(0);if(payerKey===undefined){throw new Error("Failed to decompile message because no account keys were found")}var instructions=[];var _iterator=_createForOfIteratorHelper(compiledInstructions),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var compiledIx=_step.value;var keys=[];var _iterator2=_createForOfIteratorHelper(compiledIx.accountKeyIndexes),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var keyIndex=_step2.value;var pubkey=accountKeys.get(keyIndex);if(pubkey===undefined){throw new Error("Failed to find key for account key index ".concat(keyIndex))}var isSigner=keyIndex=0,"Cannot sign with non signer key ".concat(signer.publicKey.toBase58()));_this.signatures[signerIndex]=sign(messageData,signer.secretKey)};for(_iterator.s();!(_step=_iterator.n()).done;){_loop()}}catch(err){_iterator.e(err)}finally{_iterator.f()}}},{key:"addSignature",value:function addSignature(publicKey,signature){assert$1(signature.byteLength===64,"Signature must be 64 bytes long");var signerPubkeys=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);var signerIndex=signerPubkeys.findIndex((function(pubkey){return pubkey.equals(publicKey)}));assert$1(signerIndex>=0,"Can not add signature; `".concat(publicKey.toBase58(),"` is not required to sign this transaction"));this.signatures[signerIndex]=signature}}],[{key:"deserialize",value:function deserialize(serializedTransaction){var byteArray=_toConsumableArray(serializedTransaction);var signatures=[];var signaturesLength=decodeLength(byteArray);for(var i=0;i=0?type.layout.span:getAlloc(type,fields);var data=buffer.Buffer.alloc(allocLength);var layoutFields=Object.assign({instruction:type.index},fields);type.layout.encode(layoutFields,data);return data}function decodeData$1(type,buffer){var data;try{data=type.layout.decode(buffer)}catch(err){throw new Error("invalid instruction; "+err)}if(data.instruction!==type.index){throw new Error("invalid instruction; instruction index mismatch ".concat(data.instruction," != ").concat(type.index))}return data}var FeeCalculatorLayout=nu64("lamportsPerSignature");var NonceAccountLayout=struct([u32("version"),u32("state"),publicKey("authorizedPubkey"),publicKey("nonce"),struct([FeeCalculatorLayout],"feeCalculator")]);var NONCE_ACCOUNT_LENGTH=NonceAccountLayout.span;var NonceAccount=function(){function NonceAccount(args){_classCallCheck(this,NonceAccount);this.authorizedPubkey=void 0;this.nonce=void 0;this.feeCalculator=void 0;this.authorizedPubkey=args.authorizedPubkey;this.nonce=args.nonce;this.feeCalculator=args.feeCalculator}_createClass(NonceAccount,null,[{key:"fromAccountData",value:function fromAccountData(buffer){var nonceAccount=NonceAccountLayout.decode(toBuffer(buffer),0);return new NonceAccount({authorizedPubkey:new PublicKey(nonceAccount.authorizedPubkey),nonce:new PublicKey(nonceAccount.nonce).toString(),feeCalculator:nonceAccount.feeCalculator})}}]);return NonceAccount}();var browser$1={};Object.defineProperty(browser$1,"__esModule",{value:true});function toBigIntLE(buf){{const reversed=Buffer.from(buf);reversed.reverse();const hex=reversed.toString("hex");if(hex.length===0){return BigInt(0)}return BigInt(`0x${hex}`)}}var toBigIntLE_1=browser$1.toBigIntLE=toBigIntLE;function toBigIntBE(buf){{const hex=buf.toString("hex");if(hex.length===0){return BigInt(0)}return BigInt(`0x${hex}`)}}browser$1.toBigIntBE=toBigIntBE;function toBufferLE(num,width){{const hex=num.toString(16);const buffer=Buffer.from(hex.padStart(width*2,"0").slice(0,width*2),"hex");buffer.reverse();return buffer}}var toBufferLE_1=browser$1.toBufferLE=toBufferLE;function toBufferBE(num,width){{const hex=num.toString(16);return Buffer.from(hex.padStart(width*2,"0").slice(0,width*2),"hex")}}browser$1.toBufferBE=toBufferBE;var encodeDecode=function encodeDecode(layout){var decode=layout.decode.bind(layout);var encode=layout.encode.bind(layout);return{decode:decode,encode:encode}};var bigInt=function bigInt(length){return function(property){var layout=blob(length,property);var _encodeDecode=encodeDecode(layout),encode=_encodeDecode.encode,decode=_encodeDecode.decode;var bigIntLayout=layout;bigIntLayout.decode=function(buffer$1,offset){var src=decode(buffer$1,offset);return toBigIntLE_1(buffer.Buffer.from(src))};bigIntLayout.encode=function(bigInt,buffer,offset){var src=toBufferLE_1(bigInt,length);return encode(src,buffer,offset)};return bigIntLayout}};var u64$2=bigInt(8);var SystemInstruction=function(){function SystemInstruction(){_classCallCheck(this,SystemInstruction)}_createClass(SystemInstruction,null,[{key:"decodeInstructionType",value:function decodeInstructionType(instruction){this.checkProgramId(instruction.programId);var instructionTypeLayout=u32("instruction");var typeIndex=instructionTypeLayout.decode(instruction.data);var type;for(var _i=0,_Object$entries=Object.entries(SYSTEM_INSTRUCTION_LAYOUTS);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),ixType=_Object$entries$_i[0],layout=_Object$entries$_i[1];if(layout.index==typeIndex){type=ixType;break}}if(!type){throw new Error("Instruction type incorrect; not a SystemInstruction")}return type}},{key:"decodeCreateAccount",value:function decodeCreateAccount(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Create,instruction.data),lamports=_decodeData.lamports,space=_decodeData.space,programId=_decodeData.programId;return{fromPubkey:instruction.keys[0].pubkey,newAccountPubkey:instruction.keys[1].pubkey,lamports:lamports,space:space,programId:new PublicKey(programId)}}},{key:"decodeTransfer",value:function decodeTransfer(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData2=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Transfer,instruction.data),lamports=_decodeData2.lamports;return{fromPubkey:instruction.keys[0].pubkey,toPubkey:instruction.keys[1].pubkey,lamports:lamports}}},{key:"decodeTransferWithSeed",value:function decodeTransferWithSeed(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);var _decodeData3=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,instruction.data),lamports=_decodeData3.lamports,seed=_decodeData3.seed,programId=_decodeData3.programId;return{fromPubkey:instruction.keys[0].pubkey,basePubkey:instruction.keys[1].pubkey,toPubkey:instruction.keys[2].pubkey,lamports:lamports,seed:seed,programId:new PublicKey(programId)}}},{key:"decodeAllocate",value:function decodeAllocate(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,1);var _decodeData4=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Allocate,instruction.data),space=_decodeData4.space;return{accountPubkey:instruction.keys[0].pubkey,space:space}}},{key:"decodeAllocateWithSeed",value:function decodeAllocateWithSeed(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,1);var _decodeData5=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,instruction.data),base=_decodeData5.base,seed=_decodeData5.seed,space=_decodeData5.space,programId=_decodeData5.programId;return{accountPubkey:instruction.keys[0].pubkey,basePubkey:new PublicKey(base),seed:seed,space:space,programId:new PublicKey(programId)}}},{key:"decodeAssign",value:function decodeAssign(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,1);var _decodeData6=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Assign,instruction.data),programId=_decodeData6.programId;return{accountPubkey:instruction.keys[0].pubkey,programId:new PublicKey(programId)}}},{key:"decodeAssignWithSeed",value:function decodeAssignWithSeed(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,1);var _decodeData7=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,instruction.data),base=_decodeData7.base,seed=_decodeData7.seed,programId=_decodeData7.programId;return{accountPubkey:instruction.keys[0].pubkey,basePubkey:new PublicKey(base),seed:seed,programId:new PublicKey(programId)}}},{key:"decodeCreateWithSeed",value:function decodeCreateWithSeed(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData8=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,instruction.data),base=_decodeData8.base,seed=_decodeData8.seed,lamports=_decodeData8.lamports,space=_decodeData8.space,programId=_decodeData8.programId;return{fromPubkey:instruction.keys[0].pubkey,newAccountPubkey:instruction.keys[1].pubkey,basePubkey:new PublicKey(base),seed:seed,lamports:lamports,space:space,programId:new PublicKey(programId)}}},{key:"decodeNonceInitialize",value:function decodeNonceInitialize(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);var _decodeData9=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,instruction.data),authorized=_decodeData9.authorized;return{noncePubkey:instruction.keys[0].pubkey,authorizedPubkey:new PublicKey(authorized)}}},{key:"decodeNonceAdvance",value:function decodeNonceAdvance(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,instruction.data);return{noncePubkey:instruction.keys[0].pubkey,authorizedPubkey:instruction.keys[2].pubkey}}},{key:"decodeNonceWithdraw",value:function decodeNonceWithdraw(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,5);var _decodeData10=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,instruction.data),lamports=_decodeData10.lamports;return{noncePubkey:instruction.keys[0].pubkey,toPubkey:instruction.keys[1].pubkey,authorizedPubkey:instruction.keys[4].pubkey,lamports:lamports}}},{key:"decodeNonceAuthorize",value:function decodeNonceAuthorize(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData11=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,instruction.data),authorized=_decodeData11.authorized;return{noncePubkey:instruction.keys[0].pubkey,authorizedPubkey:instruction.keys[1].pubkey,newAuthorizedPubkey:new PublicKey(authorized)}}},{key:"checkProgramId",value:function checkProgramId(programId){if(!programId.equals(SystemProgram.programId)){throw new Error("invalid instruction; programId is not SystemProgram")}}},{key:"checkKeyLength",value:function checkKeyLength(keys,expectedLength){if(keys.length0?balanceNeeded:1,space:data.length,programId:programId}));case 17:if(!(transaction!==null)){_context.next=20;break}_context.next=20;return sendAndConfirmTransaction(connection,transaction,[payer,program],{commitment:"confirmed"});case 20:dataLayout=struct([u32("instruction"),u32("offset"),u32("bytesLength"),u32("bytesLengthPadding"),seq(u8("byte"),offset(u32(),-8),"bytes")]);chunkSize=Loader.chunkSize;offset$1=0;array=data;transactions=[];case 25:if(!(array.length>0)){_context.next=39;break}bytes=array.slice(0,chunkSize);_data=buffer.Buffer.alloc(chunkSize+16);dataLayout.encode({instruction:0,offset:offset$1,bytes:bytes,bytesLength:0,bytesLengthPadding:0},_data);_transaction=(new Transaction).add({keys:[{pubkey:program.publicKey,isSigner:true,isWritable:true}],programId:programId,data:_data});transactions.push(sendAndConfirmTransaction(connection,_transaction,[payer,program],{commitment:"confirmed"}));if(!connection._rpcEndpoint.includes("solana.com")){_context.next=35;break}REQUESTS_PER_SECOND=4;_context.next=35;return sleep(1e3/REQUESTS_PER_SECOND);case 35:offset$1+=chunkSize;array=array.slice(chunkSize);_context.next=25;break;case 39:_context.next=41;return Promise.all(transactions);case 41:_dataLayout=struct([u32("instruction")]);_data2=buffer.Buffer.alloc(_dataLayout.span);_dataLayout.encode({instruction:1},_data2);_transaction2=(new Transaction).add({keys:[{pubkey:program.publicKey,isSigner:true,isWritable:true},{pubkey:SYSVAR_RENT_PUBKEY,isSigner:false,isWritable:false}],programId:programId,data:_data2});deployCommitment="processed";_context.next=48;return connection.sendTransaction(_transaction2,[payer,program],{preflightCommitment:deployCommitment});case 48:finalizeSignature=_context.sent;_context.next=51;return connection.confirmTransaction({signature:finalizeSignature,lastValidBlockHeight:_transaction2.lastValidBlockHeight,blockhash:_transaction2.recentBlockhash},deployCommitment);case 51:_yield$connection$con=_context.sent;context=_yield$connection$con.context;value=_yield$connection$con.value;if(!value.err){_context.next=56;break}throw new Error("Transaction ".concat(finalizeSignature," failed (").concat(JSON.stringify(value),")"));case 56:_context.prev=57;_context.next=60;return connection.getSlot({commitment:deployCommitment});case 60:currentSlot=_context.sent;if(!(currentSlot>context.slot)){_context.next=63;break}return _context.abrupt("break",71);case 63:_context.next=67;break;case 65:_context.prev=65;_context.t0=_context["catch"](57);case 67:_context.next=69;return new Promise((function(resolve){return setTimeout(resolve,Math.round(MS_PER_SLOT/2))}));case 69:_context.next=56;break;case 71:return _context.abrupt("return",true);case 72:case"end":return _context.stop()}}),_callee,null,[[57,65]])})));function load(_x,_x2,_x3,_x4,_x5){return _load.apply(this,arguments)}return load}()}]);return Loader}();Loader.chunkSize=CHUNK_SIZE;var BPF_LOADER_PROGRAM_ID=new PublicKey("BPFLoader2111111111111111111111111111111111");var BpfLoader=function(){function BpfLoader(){_classCallCheck(this,BpfLoader)}_createClass(BpfLoader,null,[{key:"getMinNumSignatures",value:function getMinNumSignatures(dataLength){return Loader.getMinNumSignatures(dataLength)}},{key:"load",value:function load(connection,payer,program,elf,loaderProgramId){return Loader.load(connection,payer,program,loaderProgramId,elf)}}]);return BpfLoader}();var objToString=Object.prototype.toString;var objKeys=Object.keys||function(obj){var keys=[];for(var name in obj){keys.push(name)}return keys};function stringify$1(val,isArrayProp){var i,max,str,keys,key,propVal,toStr;if(val===true){return"true"}if(val===false){return"false"}switch(typeof val){case"object":if(val===null){return null}else if(val.toJSON&&typeof val.toJSON==="function"){return stringify$1(val.toJSON(),isArrayProp)}else{toStr=objToString.call(val);if(toStr==="[object Array]"){str="[";max=val.length-1;for(i=0;i-1){str+=stringify$1(val[i],true)}return str+"]"}else if(toStr==="[object Object]"){keys=objKeys(val).sort();max=keys.length;str="";i=0;while(i{var _cached;return(_cached=cached)!=null?_cached:cached=[failure,...failures()]}}}function isIterable(x){return isObject(x)&&typeof x[Symbol.iterator]==="function"}function isObject(x){return typeof x==="object"&&x!=null}function print(value){return typeof value==="string"?JSON.stringify(value):""+value}function shiftIterator(input){const{done:done,value:value}=input.next();return done?undefined:value}function toFailure(result,context,struct,value){if(result===true){return}else if(result===false){result={}}else if(typeof result==="string"){result={message:result}}const{path:path,branch:branch}=context;const{type:type}=struct;const{refinement:refinement,message:message="Expected a value of type `"+type+"`"+(refinement?" with refinement `"+refinement+"`":"")+", but received: `"+print(value)+"`"}=result;return{value:value,type:type,refinement:refinement,key:path[path.length-1],path:path,branch:branch,...result,message:message}}function*toFailures(result,context,struct,value){if(!isIterable(result)){result=[result]}for(const r of result){const failure=toFailure(r,context,struct,value);if(failure){yield failure}}}function*run(value,struct,options={}){const{path:path=[],branch:branch=[value],coerce:coerce=false,mask:mask=false}=options;const ctx={path:path,branch:branch};if(coerce){value=struct.coercer(value,ctx);if(mask&&struct.type!=="type"&&isObject(struct.schema)&&isObject(value)&&!Array.isArray(value)){for(const key in value){if(struct.schema[key]===undefined){delete value[key]}}}}let valid=true;for(const failure of struct.validator(value,ctx)){valid=false;yield[failure,undefined]}for(let[k,v,s]of struct.entries(value,ctx)){const ts=run(v,s,{path:k===undefined?path:[...path,k],branch:k===undefined?branch:[...branch,v],coerce:coerce,mask:mask});for(const t of ts){if(t[0]){valid=false;yield[t[0],undefined]}else if(coerce){v=t[1];if(k===undefined){value=v}else if(value instanceof Map){value.set(k,v)}else if(value instanceof Set){value.add(v)}else if(isObject(value)){value[k]=v}}}}if(valid){for(const failure of struct.refiner(value,ctx)){valid=false;yield[failure,undefined]}}if(valid){yield[undefined,value]}}class Struct{constructor(props){const{type:type,schema:schema,validator:validator,refiner:refiner,coercer:coercer=(value=>value),entries:entries=function*(){}}=props;this.type=type;this.schema=schema;this.entries=entries;this.coercer=coercer;if(validator){this.validator=(value,context)=>{const result=validator(value,context);return toFailures(result,context,this,value)}}else{this.validator=()=>[]}if(refiner){this.refiner=(value,context)=>{const result=refiner(value,context);return toFailures(result,context,this,value)}}else{this.refiner=()=>[]}}assert(value){return assert(value,this)}create(value){return create(value,this)}is(value){return is(value,this)}mask(value){return mask(value,this)}validate(value,options={}){return validate$1(value,this,options)}}function assert(value,struct){const result=validate$1(value,struct);if(result[0]){throw result[0]}}function create(value,struct){const result=validate$1(value,struct,{coerce:true});if(result[0]){throw result[0]}else{return result[1]}}function mask(value,struct){const result=validate$1(value,struct,{coerce:true,mask:true});if(result[0]){throw result[0]}else{return result[1]}}function is(value,struct){const result=validate$1(value,struct);return!result[0]}function validate$1(value,struct,options={}){const tuples=run(value,struct,options);const tuple=shiftIterator(tuples);if(tuple[0]){const error=new StructError(tuple[0],(function*(){for(const t of tuples){if(t[0]){yield t[0]}}}));return[error,undefined]}else{const v=tuple[1];return[undefined,v]}}function define(name,validator){return new Struct({type:name,schema:null,validator:validator})}function any(){return define("any",(()=>true))}function array(Element){return new Struct({type:"array",schema:Element,*entries(value){if(Element&&Array.isArray(value)){for(const[i,v]of value.entries()){yield[i,v,Element]}}},coercer(value){return Array.isArray(value)?value.slice():value},validator(value){return Array.isArray(value)||"Expected an array value, but received: "+print(value)}})}function boolean(){return define("boolean",(value=>typeof value==="boolean"))}function instance(Class){return define("instance",(value=>value instanceof Class||"Expected a `"+Class.name+"` instance, but received: "+print(value)))}function literal(constant){const description=print(constant);const t=typeof constant;return new Struct({type:"literal",schema:t==="string"||t==="number"||t==="boolean"?constant:null,validator(value){return value===constant||"Expected the literal `"+description+"`, but received: "+print(value)}})}function never(){return define("never",(()=>false))}function nullable(struct){return new Struct({...struct,validator:(value,ctx)=>value===null||struct.validator(value,ctx),refiner:(value,ctx)=>value===null||struct.refiner(value,ctx)})}function number(){return define("number",(value=>typeof value==="number"&&!isNaN(value)||"Expected a number, but received: "+print(value)))}function optional(struct){return new Struct({...struct,validator:(value,ctx)=>value===undefined||struct.validator(value,ctx),refiner:(value,ctx)=>value===undefined||struct.refiner(value,ctx)})}function record(Key,Value){return new Struct({type:"record",schema:null,*entries(value){if(isObject(value)){for(const k in value){const v=value[k];yield[k,k,Key];yield[k,v,Value]}}},validator(value){return isObject(value)||"Expected an object, but received: "+print(value)}})}function string(){return define("string",(value=>typeof value==="string"||"Expected a string, but received: "+print(value)))}function tuple(Elements){const Never=never();return new Struct({type:"tuple",schema:null,*entries(value){if(Array.isArray(value)){const length=Math.max(Elements.length,value.length);for(let i=0;is.type)).join(" | ");return new Struct({type:"union",schema:null,validator(value,ctx){const failures=[];for(const S of Structs){const[...tuples]=run(value,S,ctx);const[first]=tuples;if(!first[0]){return[]}else{for(const[failure]of tuples){if(failure){failures.push(failure)}}}}return["Expected the value to satisfy a union of `"+description+"`, but received: "+print(value),...failures]}})}function unknown(){return define("unknown",(()=>true))}function coerce(struct,condition,coercer){return new Struct({...struct,coercer:(value,ctx)=>is(value,condition)?struct.coercer(coercer(value,ctx),ctx):struct.coercer(value,ctx)})}var getRandomValues;var rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){getRandomValues=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=="undefined"&&typeof msCrypto.getRandomValues==="function"&&msCrypto.getRandomValues.bind(msCrypto);if(!getRandomValues){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return getRandomValues(rnds8)}var REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(uuid){return typeof uuid==="string"&®EX.test(uuid)}var byteToHex=[];for(var i=0;i<256;++i){byteToHex.push((i+256).toString(16).substr(1))}function stringify(arr){var offset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var uuid=(byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+"-"+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+"-"+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+"-"+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+"-"+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase();if(!validate(uuid)){throw TypeError("Stringified UUID is invalid")}return uuid}var _nodeId;var _clockseq;var _lastMSecs=0;var _lastNSecs=0;function v1(options,buf,offset){var i=buf&&offset||0;var b=buf||new Array(16);options=options||{};var node=options.node||_nodeId;var clockseq=options.clockseq!==undefined?options.clockseq:_clockseq;if(node==null||clockseq==null){var seedBytes=options.random||(options.rng||rng)();if(node==null){node=_nodeId=[seedBytes[0]|1,seedBytes[1],seedBytes[2],seedBytes[3],seedBytes[4],seedBytes[5]]}if(clockseq==null){clockseq=_clockseq=(seedBytes[6]<<8|seedBytes[7])&16383}}var msecs=options.msecs!==undefined?options.msecs:Date.now();var nsecs=options.nsecs!==undefined?options.nsecs:_lastNSecs+1;var dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/1e4;if(dt<0&&options.clockseq===undefined){clockseq=clockseq+1&16383}if((dt<0||msecs>_lastMSecs)&&options.nsecs===undefined){nsecs=0}if(nsecs>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}_lastMSecs=msecs;_lastNSecs=nsecs;_clockseq=clockseq;msecs+=122192928e5;var tl=((msecs&268435455)*1e4+nsecs)%4294967296;b[i++]=tl>>>24&255;b[i++]=tl>>>16&255;b[i++]=tl>>>8&255;b[i++]=tl&255;var tmh=msecs/4294967296*1e4&268435455;b[i++]=tmh>>>8&255;b[i++]=tmh&255;b[i++]=tmh>>>24&15|16;b[i++]=tmh>>>16&255;b[i++]=clockseq>>>8|128;b[i++]=clockseq&255;for(var n=0;n<6;++n){b[i+n]=node[n]}return buf||stringify(b)}function parse(uuid){if(!validate(uuid)){throw TypeError("Invalid UUID")}var v;var arr=new Uint8Array(16);arr[0]=(v=parseInt(uuid.slice(0,8),16))>>>24;arr[1]=v>>>16&255;arr[2]=v>>>8&255;arr[3]=v&255;arr[4]=(v=parseInt(uuid.slice(9,13),16))>>>8;arr[5]=v&255;arr[6]=(v=parseInt(uuid.slice(14,18),16))>>>8;arr[7]=v&255;arr[8]=(v=parseInt(uuid.slice(19,23),16))>>>8;arr[9]=v&255;arr[10]=(v=parseInt(uuid.slice(24,36),16))/1099511627776&255;arr[11]=v/4294967296&255;arr[12]=v>>>24&255;arr[13]=v>>>16&255;arr[14]=v>>>8&255;arr[15]=v&255;return arr}function stringToBytes(str){str=unescape(encodeURIComponent(str));var bytes=[];for(var i=0;i>5]>>>i%32&255;var hex=parseInt(hexTab.charAt(x>>>4&15)+hexTab.charAt(x&15),16);output.push(hex)}return output}function getOutputLength(inputLength8){return(inputLength8+64>>>9<<4)+14+1}function wordsToMd5(x,len){x[len>>5]|=128<>5]|=(input[i/8]&255)<>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}function bitRotateLeft(num,cnt){return num<>>32-cnt}function md5cmn(q,a,b,x,s,t){return safeAdd(bitRotateLeft(safeAdd(safeAdd(a,q),safeAdd(x,t)),s),b)}function md5ff(a,b,c,d,x,s,t){return md5cmn(b&c|~b&d,a,b,x,s,t)}function md5gg(a,b,c,d,x,s,t){return md5cmn(b&d|c&~d,a,b,x,s,t)}function md5hh(a,b,c,d,x,s,t){return md5cmn(b^c^d,a,b,x,s,t)}function md5ii(a,b,c,d,x,s,t){return md5cmn(c^(b|~d),a,b,x,s,t)}var v3=v35("v3",48,md5);var v3$1=v3;function v4(options,buf,offset){options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){offset=offset||0;for(var i=0;i<16;++i){buf[offset+i]=rnds[i]}return buf}return stringify(rnds)}function f(s,x,y,z){switch(s){case 0:return x&y^~x&z;case 1:return x^y^z;case 2:return x&y^x&z^y&z;case 3:return x^y^z}}function ROTL(x,n){return x<>>32-n}function sha1(bytes){var K=[1518500249,1859775393,2400959708,3395469782];var H=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof bytes==="string"){var msg=unescape(encodeURIComponent(bytes));bytes=[];for(var i=0;i>>0;e=d;d=c;c=ROTL(b,30)>>>0;b=a;a=T}H[0]=H[0]+a>>>0;H[1]=H[1]+b>>>0;H[2]=H[2]+c>>>0;H[3]=H[3]+d>>>0;H[4]=H[4]+e>>>0}return[H[0]>>24&255,H[0]>>16&255,H[0]>>8&255,H[0]&255,H[1]>>24&255,H[1]>>16&255,H[1]>>8&255,H[1]&255,H[2]>>24&255,H[2]>>16&255,H[2]>>8&255,H[2]&255,H[3]>>24&255,H[3]>>16&255,H[3]>>8&255,H[3]&255,H[4]>>24&255,H[4]>>16&255,H[4]>>8&255,H[4]&255]}var v5=v35("v5",80,sha1);var v5$1=v5;var nil="00000000-0000-0000-0000-000000000000";function version(uuid){if(!validate(uuid)){throw TypeError("Invalid UUID")}return parseInt(uuid.substr(14,1),16)}var esmBrowser=Object.freeze({__proto__:null,NIL:nil,parse:parse,stringify:stringify,v1:v1,v3:v3$1,v4:v4,v5:v5$1,validate:validate,version:version});var require$$0=getAugmentedNamespace(esmBrowser);const uuid$1=require$$0.v4;const generateRequest$1=function(method,params,id,options){if(typeof method!=="string"){throw new TypeError(method+" must be a string")}options=options||{};const version=typeof options.version==="number"?options.version:2;if(version!==1&&version!==2){throw new TypeError(version+" must be 1 or 2")}const request={method:method};if(version===2){request.jsonrpc="2.0"}if(params){if(typeof params!=="object"&&!Array.isArray(params)){throw new TypeError(params+" must be an object, array or omitted")}request.params=params}if(typeof id==="undefined"){const generator=typeof options.generator==="function"?options.generator:function(){return uuid$1()};request.id=generator(request,options)}else if(version===2&&id===null){if(options.notificationIdNull){request.id=null}}else{request.id=id}return request};var generateRequest_1=generateRequest$1;const uuid=require$$0.v4;const generateRequest=generateRequest_1;const ClientBrowser=function(callServer,options){if(!(this instanceof ClientBrowser)){return new ClientBrowser(callServer,options)}if(!options){options={}}this.options={reviver:typeof options.reviver!=="undefined"?options.reviver:null,replacer:typeof options.replacer!=="undefined"?options.replacer:null,generator:typeof options.generator!=="undefined"?options.generator:function(){return uuid()},version:typeof options.version!=="undefined"?options.version:2,notificationIdNull:typeof options.notificationIdNull==="boolean"?options.notificationIdNull:false};this.callServer=callServer};var browser=ClientBrowser;ClientBrowser.prototype.request=function(method,params,id,callback){const self=this;let request=null;const isBatch=Array.isArray(method)&&typeof params==="function";if(this.options.version===1&&isBatch){throw new TypeError("JSON-RPC 1.0 does not support batching")}const isRaw=!isBatch&&method&&typeof method==="object"&&typeof params==="function";if(isBatch||isRaw){callback=params;request=method}else{if(typeof id==="function"){callback=id;id=undefined}const hasCallback=typeof callback==="function";try{request=generateRequest(method,params,id,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(err){if(hasCallback){return callback(err)}throw err}if(!hasCallback){return request}}let message;try{message=JSON.stringify(request,this.options.replacer)}catch(err){return callback(err)}this.callServer(message,(function(err,response){self._parseResponse(err,response,callback)}));return request};ClientBrowser.prototype._parseResponse=function(err,responseText,callback){if(err){callback(err);return}if(!responseText){return callback()}let response;try{response=JSON.parse(responseText,this.options.reviver)}catch(err){return callback(err)}if(callback.length===3){if(Array.isArray(response)){const isError=function(res){return typeof res.error!=="undefined"};const isNotError=function(res){return!isError(res)};return callback(null,response.filter(isError),response.filter(isNotError))}else{return callback(null,response.error,response.result)}}callback(null,response)};var RpcClient=getDefaultExportFromCjs(browser);var MINIMUM_SLOT_PER_EPOCH=32;function trailingZeros(n){var trailingZeros=0;while(n>1){n/=2;trailingZeros++}return trailingZeros}function nextPowerOfTwo(n){if(n===0)return 1;n--;n|=n>>1;n|=n>>2;n|=n>>4;n|=n>>8;n|=n>>16;n|=n>>32;return n+1}var EpochSchedule=function(){function EpochSchedule(slotsPerEpoch,leaderScheduleSlotOffset,warmup,firstNormalEpoch,firstNormalSlot){_classCallCheck(this,EpochSchedule);this.slotsPerEpoch=void 0;this.leaderScheduleSlotOffset=void 0;this.warmup=void 0;this.firstNormalEpoch=void 0;this.firstNormalSlot=void 0;this.slotsPerEpoch=slotsPerEpoch;this.leaderScheduleSlotOffset=leaderScheduleSlotOffset;this.warmup=warmup;this.firstNormalEpoch=firstNormalEpoch;this.firstNormalSlot=firstNormalSlot}_createClass(EpochSchedule,[{key:"getEpoch",value:function getEpoch(slot){return this.getEpochAndSlotIndex(slot)[0]}},{key:"getEpochAndSlotIndex",value:function getEpochAndSlotIndex(slot){if(slot=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc},"next"===this.method&&(this.arg=undefined),ContinueSentinel}},exports}module.exports=_regeneratorRuntime,module.exports.__esModule=true,module.exports["default"]=module.exports})(regeneratorRuntime$1);return regeneratorRuntime$1.exports}var regenerator;var hasRequiredRegenerator;function requireRegenerator(){if(hasRequiredRegenerator)return regenerator;hasRequiredRegenerator=1;var runtime=requireRegeneratorRuntime()();regenerator=runtime;try{regeneratorRuntime=runtime}catch(accidentalStrictMode){if(typeof globalThis==="object"){globalThis.regeneratorRuntime=runtime}else{Function("r","regeneratorRuntime = r")(runtime)}}return regenerator}var asyncToGenerator={exports:{}};var hasRequiredAsyncToGenerator;function requireAsyncToGenerator(){if(hasRequiredAsyncToGenerator)return asyncToGenerator.exports;hasRequiredAsyncToGenerator=1;(function(module){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value}catch(error){reject(error);return}if(info.done){resolve(value)}else{Promise.resolve(value).then(_next,_throw)}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(undefined)}))}}module.exports=_asyncToGenerator,module.exports.__esModule=true,module.exports["default"]=module.exports})(asyncToGenerator);return asyncToGenerator.exports}var classCallCheck={exports:{}};var hasRequiredClassCallCheck;function requireClassCallCheck(){if(hasRequiredClassCallCheck)return classCallCheck.exports;hasRequiredClassCallCheck=1;(function(module){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}module.exports=_classCallCheck,module.exports.__esModule=true,module.exports["default"]=module.exports})(classCallCheck);return classCallCheck.exports}var createClass={exports:{}};var toPropertyKey={exports:{}};var toPrimitive={exports:{}};var hasRequiredToPrimitive;function requireToPrimitive(){if(hasRequiredToPrimitive)return toPrimitive.exports;hasRequiredToPrimitive=1;(function(module){var _typeof=require_typeof()["default"];function _toPrimitive(input,hint){if(_typeof(input)!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(_typeof(res)!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}module.exports=_toPrimitive,module.exports.__esModule=true,module.exports["default"]=module.exports})(toPrimitive);return toPrimitive.exports}var hasRequiredToPropertyKey;function requireToPropertyKey(){if(hasRequiredToPropertyKey)return toPropertyKey.exports;hasRequiredToPropertyKey=1;(function(module){var _typeof=require_typeof()["default"];var toPrimitive=requireToPrimitive();function _toPropertyKey(arg){var key=toPrimitive(arg,"string");return _typeof(key)==="symbol"?key:String(key)}module.exports=_toPropertyKey,module.exports.__esModule=true,module.exports["default"]=module.exports})(toPropertyKey);return toPropertyKey.exports}var hasRequiredCreateClass;function requireCreateClass(){if(hasRequiredCreateClass)return createClass.exports;hasRequiredCreateClass=1;(function(module){var toPropertyKey=requireToPropertyKey();function _defineProperties(target,props){for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:"ws://localhost:8080";var _a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var generate_request_id=arguments.length>3?arguments[3]:undefined;(0,_classCallCheck2["default"])(this,CommonClient);var _a$autoconnect=_a.autoconnect,autoconnect=_a$autoconnect===void 0?true:_a$autoconnect,_a$reconnect=_a.reconnect,reconnect=_a$reconnect===void 0?true:_a$reconnect,_a$reconnect_interval=_a.reconnect_interval,reconnect_interval=_a$reconnect_interval===void 0?1e3:_a$reconnect_interval,_a$max_reconnects=_a.max_reconnects,max_reconnects=_a$max_reconnects===void 0?5:_a$max_reconnects,rest_options=__rest(_a,["autoconnect","reconnect","reconnect_interval","max_reconnects"]);_this=_super.call(this);_this.webSocketFactory=webSocketFactory;_this.queue={};_this.rpc_id=0;_this.address=address;_this.autoconnect=autoconnect;_this.ready=false;_this.reconnect=reconnect;_this.reconnect_timer_id=undefined;_this.reconnect_interval=reconnect_interval;_this.max_reconnects=max_reconnects;_this.rest_options=rest_options;_this.current_reconnects=0;_this.generate_request_id=generate_request_id||function(){return++_this.rpc_id};if(_this.autoconnect)_this._connect(_this.address,Object.assign({autoconnect:_this.autoconnect,reconnect:_this.reconnect,reconnect_interval:_this.reconnect_interval,max_reconnects:_this.max_reconnects},_this.rest_options));return _this}(0,_createClass2["default"])(CommonClient,[{key:"connect",value:function connect(){if(this.socket)return;this._connect(this.address,Object.assign({autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects},this.rest_options))}},{key:"call",value:function call(method,params,timeout,ws_opts){var _this2=this;if(!ws_opts&&"object"===(0,_typeof2["default"])(timeout)){ws_opts=timeout;timeout=null}return new Promise((function(resolve,reject){if(!_this2.ready)return reject(new Error("socket not ready"));var rpc_id=_this2.generate_request_id(method,params);var message={jsonrpc:"2.0",method:method,params:params||null,id:rpc_id};_this2.socket.send(JSON.stringify(message),ws_opts,(function(error){if(error)return reject(error);_this2.queue[rpc_id]={promise:[resolve,reject]};if(timeout){_this2.queue[rpc_id].timeout=setTimeout((function(){delete _this2.queue[rpc_id];reject(new Error("reply timeout"))}),timeout)}}))}))}},{key:"login",value:function(){var _login=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark((function _callee(params){var resp;return _regenerator["default"].wrap((function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.next=2;return this.call("rpc.login",params);case 2:resp=_context.sent;if(resp){_context.next=5;break}throw new Error("authentication failed");case 5:return _context.abrupt("return",resp);case 6:case"end":return _context.stop()}}}),_callee,this)})));function login(_x){return _login.apply(this,arguments)}return login}()},{key:"listMethods",value:function(){var _listMethods=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark((function _callee2(){return _regenerator["default"].wrap((function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this.call("__listMethods");case 2:return _context2.abrupt("return",_context2.sent);case 3:case"end":return _context2.stop()}}}),_callee2,this)})));function listMethods(){return _listMethods.apply(this,arguments)}return listMethods}()},{key:"notify",value:function notify(method,params){var _this3=this;return new Promise((function(resolve,reject){if(!_this3.ready)return reject(new Error("socket not ready"));var message={jsonrpc:"2.0",method:method,params:params||null};_this3.socket.send(JSON.stringify(message),(function(error){if(error)return reject(error);resolve()}))}))}},{key:"subscribe",value:function(){var _subscribe=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark((function _callee3(event){var result;return _regenerator["default"].wrap((function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:if(typeof event==="string")event=[event];_context3.next=3;return this.call("rpc.on",event);case 3:result=_context3.sent;if(!(typeof event==="string"&&result[event]!=="ok")){_context3.next=6;break}throw new Error("Failed subscribing to an event '"+event+"' with: "+result[event]);case 6:return _context3.abrupt("return",result);case 7:case"end":return _context3.stop()}}}),_callee3,this)})));function subscribe(_x2){return _subscribe.apply(this,arguments)}return subscribe}()},{key:"unsubscribe",value:function(){var _unsubscribe=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark((function _callee4(event){var result;return _regenerator["default"].wrap((function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:if(typeof event==="string")event=[event];_context4.next=3;return this.call("rpc.off",event);case 3:result=_context4.sent;if(!(typeof event==="string"&&result[event]!=="ok")){_context4.next=6;break}throw new Error("Failed unsubscribing from an event with: "+result);case 6:return _context4.abrupt("return",result);case 7:case"end":return _context4.stop()}}}),_callee4,this)})));function unsubscribe(_x3){return _unsubscribe.apply(this,arguments)}return unsubscribe}()},{key:"close",value:function close(code,data){this.socket.close(code||1e3,data)}},{key:"_connect",value:function _connect(address,options){var _this4=this;clearTimeout(this.reconnect_timer_id);this.socket=this.webSocketFactory(address,options);this.socket.addEventListener("open",(function(){_this4.ready=true;_this4.emit("open");_this4.current_reconnects=0}));this.socket.addEventListener("message",(function(_ref){var message=_ref.data;if(message instanceof ArrayBuffer)message=Buffer.from(message).toString();try{message=JSON.parse(message)}catch(error){return}if(message.notification&&_this4.listeners(message.notification).length){if(!Object.keys(message.params).length)return _this4.emit(message.notification);var args=[message.notification];if(message.params.constructor===Object)args.push(message.params);else for(var i=0;i_this4.current_reconnects||_this4.max_reconnects===0))_this4.reconnect_timer_id=setTimeout((function(){return _this4._connect(address,options)}),_this4.reconnect_interval)}))}}]);return CommonClient}(_eventemitter.EventEmitter);exports["default"]=CommonClient})(client);var RpcWebSocketCommonClient=getDefaultExportFromCjs(client);var websocket_browser={};(function(exports){var _interopRequireDefault=interopRequireDefaultExports;Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=_default;var _classCallCheck2=_interopRequireDefault(requireClassCallCheck());var _createClass2=_interopRequireDefault(requireCreateClass());var _inherits2=_interopRequireDefault(requireInherits());var _possibleConstructorReturn2=_interopRequireDefault(requirePossibleConstructorReturn());var _getPrototypeOf2=_interopRequireDefault(requireGetPrototypeOf());var _eventemitter=requireEventemitter3();function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return true}catch(e){return false}}var WebSocketBrowserImpl=function(_EventEmitter){(0,_inherits2["default"])(WebSocketBrowserImpl,_EventEmitter);var _super=_createSuper(WebSocketBrowserImpl);function WebSocketBrowserImpl(address,options,protocols){var _this;(0,_classCallCheck2["default"])(this,WebSocketBrowserImpl);_this=_super.call(this);_this.socket=new window.WebSocket(address,protocols);_this.socket.onopen=function(){return _this.emit("open")};_this.socket.onmessage=function(event){return _this.emit("message",event.data)};_this.socket.onerror=function(error){return _this.emit("error",error)};_this.socket.onclose=function(event){_this.emit("close",event.code,event.reason)};return _this}(0,_createClass2["default"])(WebSocketBrowserImpl,[{key:"send",value:function send(data,optionsOrCallback,callback){var cb=callback||optionsOrCallback;try{this.socket.send(data);cb()}catch(error){cb(error)}}},{key:"close",value:function close(code,reason){this.socket.close(code,reason)}},{key:"addEventListener",value:function addEventListener(type,listener,options){this.socket.addEventListener(type,listener,options)}}]);return WebSocketBrowserImpl}(_eventemitter.EventEmitter);function _default(address,options){return new WebSocketBrowserImpl(address,options)}})(websocket_browser);var createRpc=getDefaultExportFromCjs(websocket_browser);var RpcWebSocketClient=function(_RpcWebSocketCommonCl){_inherits(RpcWebSocketClient,_RpcWebSocketCommonCl);var _super=_createSuper(RpcWebSocketClient);function RpcWebSocketClient(address,options,generate_request_id){var _this;_classCallCheck(this,RpcWebSocketClient);var webSocketFactory=function webSocketFactory(url){var rpc=createRpc(url,_objectSpread2({autoconnect:true,max_reconnects:5,reconnect:true,reconnect_interval:1e3},options));if("socket"in rpc){_this.underlyingSocket=rpc.socket}else{_this.underlyingSocket=rpc}return rpc};_this=_super.call(this,webSocketFactory,address,options,generate_request_id);_this.underlyingSocket=void 0;return _this}_createClass(RpcWebSocketClient,[{key:"call",value:function call(){var _this$underlyingSocke;var readyState=(_this$underlyingSocke=this.underlyingSocket)===null||_this$underlyingSocke===void 0?void 0:_this$underlyingSocke.readyState;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}if(readyState===1){var _get2;return(_get2=_get(_getPrototypeOf(RpcWebSocketClient.prototype),"call",this)).call.apply(_get2,[this].concat(args))}return Promise.reject(new Error("Tried to call a JSON-RPC method `"+args[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+readyState+")"))}},{key:"notify",value:function notify(){var _this$underlyingSocke2;var readyState=(_this$underlyingSocke2=this.underlyingSocket)===null||_this$underlyingSocke2===void 0?void 0:_this$underlyingSocke2.readyState;for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2]}if(readyState===1){var _get3;return(_get3=_get(_getPrototypeOf(RpcWebSocketClient.prototype),"notify",this)).call.apply(_get3,[this].concat(args))}return Promise.reject(new Error("Tried to send a JSON-RPC notification `"+args[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+readyState+")"))}}]);return RpcWebSocketClient}(RpcWebSocketCommonClient);function decodeData(type,data){var decoded;try{decoded=type.layout.decode(data)}catch(err){throw new Error("invalid instruction; "+err)}if(decoded.typeIndex!==type.index){throw new Error("invalid account data; account type mismatch ".concat(decoded.typeIndex," != ").concat(type.index))}return decoded}var LOOKUP_TABLE_META_SIZE=56;var AddressLookupTableAccount=function(){function AddressLookupTableAccount(args){_classCallCheck(this,AddressLookupTableAccount);this.key=void 0;this.state=void 0;this.key=args.key;this.state=args.state}_createClass(AddressLookupTableAccount,[{key:"isActive",value:function isActive(){var U64_MAX=BigInt("0xffffffffffffffff");return this.state.deactivationSlot===U64_MAX}}],[{key:"deserialize",value:function deserialize(accountData){var meta=decodeData(LookupTableMetaLayout,accountData);var serializedAddressesLen=accountData.length-LOOKUP_TABLE_META_SIZE;assert$1(serializedAddressesLen>=0,"lookup table is invalid");assert$1(serializedAddressesLen%32===0,"lookup table is invalid");var numSerializedAddresses=serializedAddressesLen/32;var _BufferLayout$struct$=struct([seq(publicKey(),numSerializedAddresses,"addresses")]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE)),addresses=_BufferLayout$struct$.addresses;return{deactivationSlot:meta.deactivationSlot,lastExtendedSlot:meta.lastExtendedSlot,lastExtendedSlotStartIndex:meta.lastExtendedStartIndex,authority:meta.authority.length!==0?new PublicKey(meta.authority[0]):undefined,addresses:addresses.map((function(address){return new PublicKey(address)}))}}}]);return AddressLookupTableAccount}();var LookupTableMetaLayout={index:1,layout:struct([u32("typeIndex"),u64$2("deactivationSlot"),nu64("lastExtendedSlot"),u8("lastExtendedStartIndex"),u8(),seq(publicKey(),offset(u8(),-1),"authority")])};var URL_RE=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;function makeWebsocketUrl(endpoint){var matches=endpoint.match(URL_RE);if(matches==null){throw TypeError("Failed to validate endpoint URL `".concat(endpoint,"`"))}var _matches=_slicedToArray(matches,4);_matches[0];var hostish=_matches[1],portWithColon=_matches[2],rest=_matches[3];var protocol=endpoint.startsWith("https:")?"wss:":"ws:";var startPort=portWithColon==null?null:parseInt(portWithColon.slice(1),10);var websocketPort=startPort==null?"":":".concat(startPort+1);return"".concat(protocol,"//").concat(hostish).concat(websocketPort).concat(rest)}var _process$env$npm_pack;var _excluded=["commitment"],_excluded2=["encoding"],_excluded3=["commitment"],_excluded4=["commitment"];var PublicKeyFromString=coerce(instance(PublicKey),string(),(function(value){return new PublicKey(value)}));var RawAccountDataResult=tuple([string(),literal("base64")]);var BufferFromRawAccountData=coerce(instance(buffer.Buffer),RawAccountDataResult,(function(value){return buffer.Buffer.from(value[0],"base64")}));var BLOCKHASH_CACHE_TIMEOUT_MS=30*1e3;function assertEndpointUrl(putativeUrl){if(/^https?:/.test(putativeUrl)===false){throw new TypeError("Endpoint URL must start with `http:` or `https:`.")}return putativeUrl}function extractCommitmentFromConfig(commitmentOrConfig){var commitment;var config;if(typeof commitmentOrConfig==="string"){commitment=commitmentOrConfig}else if(commitmentOrConfig){var specifiedCommitment=commitmentOrConfig.commitment,specifiedConfig=_objectWithoutProperties(commitmentOrConfig,_excluded);commitment=specifiedCommitment;config=specifiedConfig}return{commitment:commitment,config:config}}function createRpcResult(result){return union([type({jsonrpc:literal("2.0"),id:string(),result:result}),type({jsonrpc:literal("2.0"),id:string(),error:type({code:unknown(),message:string(),data:optional(any())})})])}var UnknownRpcResult=createRpcResult(unknown());function jsonRpcResult(schema){return coerce(createRpcResult(schema),UnknownRpcResult,(function(value){if("error"in value){return value}else{return _objectSpread2(_objectSpread2({},value),{},{result:create(value.result,schema)})}}))}function jsonRpcResultAndContext(value){return jsonRpcResult(type({context:type({slot:number()}),value:value}))}function notificationResultAndContext(value){return type({context:type({slot:number()}),value:value})}function versionedMessageFromResponse(version,response){if(version===0){return new MessageV0({header:response.header,staticAccountKeys:response.accountKeys.map((function(accountKey){return new PublicKey(accountKey)})),recentBlockhash:response.recentBlockhash,compiledInstructions:response.instructions.map((function(ix){return{programIdIndex:ix.programIdIndex,accountKeyIndexes:ix.accounts,data:bs58$1.decode(ix.data)}})),addressTableLookups:response.addressTableLookups})}else{return new Message(response)}}var GetInflationGovernorResult=type({foundation:number(),foundationTerm:number(),initial:number(),taper:number(),terminal:number()});var GetInflationRewardResult=jsonRpcResult(array(nullable(type({epoch:number(),effectiveSlot:number(),amount:number(),postBalance:number(),commission:optional(nullable(number()))}))));var GetRecentPrioritizationFeesResult=array(type({slot:number(),prioritizationFee:number()}));var GetInflationRateResult=type({total:number(),validator:number(),foundation:number(),epoch:number()});var GetEpochInfoResult=type({epoch:number(),slotIndex:number(),slotsInEpoch:number(),absoluteSlot:number(),blockHeight:optional(number()),transactionCount:optional(number())});var GetEpochScheduleResult=type({slotsPerEpoch:number(),leaderScheduleSlotOffset:number(),warmup:boolean(),firstNormalEpoch:number(),firstNormalSlot:number()});var GetLeaderScheduleResult=record(string(),array(number()));var TransactionErrorResult=nullable(union([type({}),string()]));var SignatureStatusResult=type({err:TransactionErrorResult});var SignatureReceivedResult=literal("receivedSignature");var VersionResult=type({"solana-core":string(),"feature-set":optional(number())});var SimulatedTransactionResponseStruct=jsonRpcResultAndContext(type({err:nullable(union([type({}),string()])),logs:nullable(array(string())),accounts:optional(nullable(array(nullable(type({executable:boolean(),owner:string(),lamports:number(),data:array(string()),rentEpoch:optional(number())}))))),unitsConsumed:optional(number()),returnData:optional(nullable(type({programId:string(),data:tuple([string(),literal("base64")])})))}));var BlockProductionResponseStruct=jsonRpcResultAndContext(type({byIdentity:record(string(),array(number())),range:type({firstSlot:number(),lastSlot:number()})}));function createRpcClient(url,httpHeaders,customFetch,fetchMiddleware,disableRetryOnRateLimit,httpAgent){var fetch=customFetch?customFetch:fetchImpl;var agent;{if(httpAgent!=null){console.warn("You have supplied an `httpAgent` when creating a `Connection` in a browser environment."+"It has been ignored; `httpAgent` is only used in Node environments.")}}var fetchWithMiddleware;if(fetchMiddleware){fetchWithMiddleware=function(){var _ref=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(info,init){var modifiedFetchArgs;return _regeneratorRuntime().wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return new Promise((function(resolve,reject){try{fetchMiddleware(info,init,(function(modifiedInfo,modifiedInit){return resolve([modifiedInfo,modifiedInit])}))}catch(error){reject(error)}}));case 2:modifiedFetchArgs=_context.sent;_context.next=5;return fetch.apply(void 0,_toConsumableArray(modifiedFetchArgs));case 5:return _context.abrupt("return",_context.sent);case 6:case"end":return _context.stop()}}),_callee)})));return function fetchWithMiddleware(_x,_x2){return _ref.apply(this,arguments)}}()}var clientBrowser=new RpcClient(function(){var _ref2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(request,callback){var options,too_many_requests_retries,res,waitTime,text;return _regeneratorRuntime().wrap((function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:options={method:"POST",body:request,agent:agent,headers:Object.assign({"Content-Type":"application/json"},httpHeaders||{},COMMON_HTTP_HEADERS)};_context2.prev=1;too_many_requests_retries=5;waitTime=500;case 4:if(!fetchWithMiddleware){_context2.next=10;break}_context2.next=7;return fetchWithMiddleware(url,options);case 7:res=_context2.sent;_context2.next=13;break;case 10:_context2.next=12;return fetch(url,options);case 12:res=_context2.sent;case 13:if(!(res.status!==429)){_context2.next=15;break}return _context2.abrupt("break",26);case 15:if(!(disableRetryOnRateLimit===true)){_context2.next=17;break}return _context2.abrupt("break",26);case 17:too_many_requests_retries-=1;if(!(too_many_requests_retries===0)){_context2.next=20;break}return _context2.abrupt("break",26);case 20:console.log("Server responded with ".concat(res.status," ").concat(res.statusText,". Retrying after ").concat(waitTime,"ms delay..."));_context2.next=23;return sleep(waitTime);case 23:waitTime*=2;case 24:_context2.next=4;break;case 26:_context2.next=28;return res.text();case 28:text=_context2.sent;if(res.ok){callback(null,text)}else{callback(new Error("".concat(res.status," ").concat(res.statusText,": ").concat(text)))}_context2.next=35;break;case 32:_context2.prev=32;_context2.t0=_context2["catch"](1);if(_context2.t0 instanceof Error)callback(_context2.t0);case 35:case"end":return _context2.stop()}}),_callee2,null,[[1,32]])})));return function(_x3,_x4){return _ref2.apply(this,arguments)}}(),{});return clientBrowser}function createRpcRequest(client){return function(method,args){return new Promise((function(resolve,reject){client.request(method,args,(function(err,response){if(err){reject(err);return}resolve(response)}))}))}}function createRpcBatchRequest(client){return function(requests){return new Promise((function(resolve,reject){if(requests.length===0)resolve([]);var batch=requests.map((function(params){return client.request(params.methodName,params.args)}));client.request(batch,(function(err,response){if(err){reject(err);return}resolve(response)}))}))}}var GetInflationGovernorRpcResult=jsonRpcResult(GetInflationGovernorResult);var GetInflationRateRpcResult=jsonRpcResult(GetInflationRateResult);var GetRecentPrioritizationFeesRpcResult=jsonRpcResult(GetRecentPrioritizationFeesResult);var GetEpochInfoRpcResult=jsonRpcResult(GetEpochInfoResult);var GetEpochScheduleRpcResult=jsonRpcResult(GetEpochScheduleResult);var GetLeaderScheduleRpcResult=jsonRpcResult(GetLeaderScheduleResult);var SlotRpcResult=jsonRpcResult(number());var GetSupplyRpcResult=jsonRpcResultAndContext(type({total:number(),circulating:number(),nonCirculating:number(),nonCirculatingAccounts:array(PublicKeyFromString)}));var TokenAmountResult=type({amount:string(),uiAmount:nullable(number()),decimals:number(),uiAmountString:optional(string())});var GetTokenLargestAccountsResult=jsonRpcResultAndContext(array(type({address:PublicKeyFromString,amount:string(),uiAmount:nullable(number()),decimals:number(),uiAmountString:optional(string())})));var GetTokenAccountsByOwner=jsonRpcResultAndContext(array(type({pubkey:PublicKeyFromString,account:type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:BufferFromRawAccountData,rentEpoch:number()})})));var ParsedAccountDataResult=type({program:string(),parsed:unknown(),space:number()});var GetParsedTokenAccountsByOwner=jsonRpcResultAndContext(array(type({pubkey:PublicKeyFromString,account:type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:ParsedAccountDataResult,rentEpoch:number()})})));var GetLargestAccountsRpcResult=jsonRpcResultAndContext(array(type({lamports:number(),address:PublicKeyFromString})));var AccountInfoResult=type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:BufferFromRawAccountData,rentEpoch:number()});var KeyedAccountInfoResult=type({pubkey:PublicKeyFromString,account:AccountInfoResult});var ParsedOrRawAccountData=coerce(union([instance(buffer.Buffer),ParsedAccountDataResult]),union([RawAccountDataResult,ParsedAccountDataResult]),(function(value){if(Array.isArray(value)){return create(value,BufferFromRawAccountData)}else{return value}}));var ParsedAccountInfoResult=type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:ParsedOrRawAccountData,rentEpoch:number()});var KeyedParsedAccountInfoResult=type({pubkey:PublicKeyFromString,account:ParsedAccountInfoResult});var StakeActivationResult=type({state:union([literal("active"),literal("inactive"),literal("activating"),literal("deactivating")]),active:number(),inactive:number()});var GetConfirmedSignaturesForAddress2RpcResult=jsonRpcResult(array(type({signature:string(),slot:number(),err:TransactionErrorResult,memo:nullable(string()),blockTime:optional(nullable(number()))})));var GetSignaturesForAddressRpcResult=jsonRpcResult(array(type({signature:string(),slot:number(),err:TransactionErrorResult,memo:nullable(string()),blockTime:optional(nullable(number()))})));var AccountNotificationResult=type({subscription:number(),result:notificationResultAndContext(AccountInfoResult)});var ProgramAccountInfoResult=type({pubkey:PublicKeyFromString,account:AccountInfoResult});var ProgramAccountNotificationResult=type({subscription:number(),result:notificationResultAndContext(ProgramAccountInfoResult)});var SlotInfoResult=type({parent:number(),slot:number(),root:number()});var SlotNotificationResult=type({subscription:number(),result:SlotInfoResult});var SlotUpdateResult=union([type({type:union([literal("firstShredReceived"),literal("completed"),literal("optimisticConfirmation"),literal("root")]),slot:number(),timestamp:number()}),type({type:literal("createdBank"),parent:number(),slot:number(),timestamp:number()}),type({type:literal("frozen"),slot:number(),timestamp:number(),stats:type({numTransactionEntries:number(),numSuccessfulTransactions:number(),numFailedTransactions:number(),maxTransactionsPerEntry:number()})}),type({type:literal("dead"),slot:number(),timestamp:number(),err:string()})]);var SlotUpdateNotificationResult=type({subscription:number(),result:SlotUpdateResult});var SignatureNotificationResult=type({subscription:number(),result:notificationResultAndContext(union([SignatureStatusResult,SignatureReceivedResult]))});var RootNotificationResult=type({subscription:number(),result:number()});var ContactInfoResult=type({pubkey:string(),gossip:nullable(string()),tpu:nullable(string()),rpc:nullable(string()),version:nullable(string())});var VoteAccountInfoResult=type({votePubkey:string(),nodePubkey:string(),activatedStake:number(),epochVoteAccount:boolean(),epochCredits:array(tuple([number(),number(),number()])),commission:number(),lastVote:number(),rootSlot:nullable(number())});var GetVoteAccounts=jsonRpcResult(type({current:array(VoteAccountInfoResult),delinquent:array(VoteAccountInfoResult)}));var ConfirmationStatus=union([literal("processed"),literal("confirmed"),literal("finalized")]);var SignatureStatusResponse=type({slot:number(),confirmations:nullable(number()),err:TransactionErrorResult,confirmationStatus:optional(ConfirmationStatus)});var GetSignatureStatusesRpcResult=jsonRpcResultAndContext(array(nullable(SignatureStatusResponse)));var GetMinimumBalanceForRentExemptionRpcResult=jsonRpcResult(number());var AddressTableLookupStruct=type({accountKey:PublicKeyFromString,writableIndexes:array(number()),readonlyIndexes:array(number())});var ConfirmedTransactionResult=type({signatures:array(string()),message:type({accountKeys:array(string()),header:type({numRequiredSignatures:number(),numReadonlySignedAccounts:number(),numReadonlyUnsignedAccounts:number()}),instructions:array(type({accounts:array(number()),data:string(),programIdIndex:number()})),recentBlockhash:string(),addressTableLookups:optional(array(AddressTableLookupStruct))})});var AnnotatedAccountKey=type({pubkey:PublicKeyFromString,signer:boolean(),writable:boolean(),source:optional(union([literal("transaction"),literal("lookupTable")]))});var ConfirmedTransactionAccountsModeResult=type({accountKeys:array(AnnotatedAccountKey),signatures:array(string())});var ParsedInstructionResult=type({parsed:unknown(),program:string(),programId:PublicKeyFromString});var RawInstructionResult=type({accounts:array(PublicKeyFromString),data:string(),programId:PublicKeyFromString});var InstructionResult=union([RawInstructionResult,ParsedInstructionResult]);var UnknownInstructionResult=union([type({parsed:unknown(),program:string(),programId:string()}),type({accounts:array(string()),data:string(),programId:string()})]);var ParsedOrRawInstruction=coerce(InstructionResult,UnknownInstructionResult,(function(value){if("accounts"in value){return create(value,RawInstructionResult)}else{return create(value,ParsedInstructionResult)}}));var ParsedConfirmedTransactionResult=type({signatures:array(string()),message:type({accountKeys:array(AnnotatedAccountKey),instructions:array(ParsedOrRawInstruction),recentBlockhash:string(),addressTableLookups:optional(nullable(array(AddressTableLookupStruct)))})});var TokenBalanceResult=type({accountIndex:number(),mint:string(),owner:optional(string()),uiTokenAmount:TokenAmountResult});var LoadedAddressesResult=type({writable:array(PublicKeyFromString),readonly:array(PublicKeyFromString)});var ConfirmedTransactionMetaResult=type({err:TransactionErrorResult,fee:number(),innerInstructions:optional(nullable(array(type({index:number(),instructions:array(type({accounts:array(number()),data:string(),programIdIndex:number()}))})))),preBalances:array(number()),postBalances:array(number()),logMessages:optional(nullable(array(string()))),preTokenBalances:optional(nullable(array(TokenBalanceResult))),postTokenBalances:optional(nullable(array(TokenBalanceResult))),loadedAddresses:optional(LoadedAddressesResult),computeUnitsConsumed:optional(number())});var ParsedConfirmedTransactionMetaResult=type({err:TransactionErrorResult,fee:number(),innerInstructions:optional(nullable(array(type({index:number(),instructions:array(ParsedOrRawInstruction)})))),preBalances:array(number()),postBalances:array(number()),logMessages:optional(nullable(array(string()))),preTokenBalances:optional(nullable(array(TokenBalanceResult))),postTokenBalances:optional(nullable(array(TokenBalanceResult))),loadedAddresses:optional(LoadedAddressesResult),computeUnitsConsumed:optional(number())});var TransactionVersionStruct=union([literal(0),literal("legacy")]);var RewardsResult=type({pubkey:string(),lamports:number(),postBalance:nullable(number()),rewardType:nullable(string()),commission:optional(nullable(number()))});var GetBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionResult,meta:nullable(ConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetNoneModeBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetAccountsModeBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionAccountsModeResult,meta:nullable(ConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetParsedBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ParsedConfirmedTransactionResult,meta:nullable(ParsedConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetParsedAccountsModeBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionAccountsModeResult,meta:nullable(ParsedConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetParsedNoneModeBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetConfirmedBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionResult,meta:nullable(ConfirmedTransactionMetaResult)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number())})));var GetBlockSignaturesRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),signatures:array(string()),blockTime:nullable(number())})));var GetTransactionRpcResult=jsonRpcResult(nullable(type({slot:number(),meta:ConfirmedTransactionMetaResult,blockTime:optional(nullable(number())),transaction:ConfirmedTransactionResult,version:optional(TransactionVersionStruct)})));var GetParsedTransactionRpcResult=jsonRpcResult(nullable(type({slot:number(),transaction:ParsedConfirmedTransactionResult,meta:nullable(ParsedConfirmedTransactionMetaResult),blockTime:optional(nullable(number())),version:optional(TransactionVersionStruct)})));var GetRecentBlockhashAndContextRpcResult=jsonRpcResultAndContext(type({blockhash:string(),feeCalculator:type({lamportsPerSignature:number()})}));var GetLatestBlockhashRpcResult=jsonRpcResultAndContext(type({blockhash:string(),lastValidBlockHeight:number()}));var IsBlockhashValidRpcResult=jsonRpcResultAndContext(boolean());var PerfSampleResult=type({slot:number(),numTransactions:number(),numSlots:number(),samplePeriodSecs:number()});var GetRecentPerformanceSamplesRpcResult=jsonRpcResult(array(PerfSampleResult));var GetFeeCalculatorRpcResult=jsonRpcResultAndContext(nullable(type({feeCalculator:type({lamportsPerSignature:number()})})));var RequestAirdropRpcResult=jsonRpcResult(string());var SendTransactionRpcResult=jsonRpcResult(string());var LogsResult=type({err:TransactionErrorResult,logs:array(string()),signature:string()});var LogsNotificationResult=type({result:notificationResultAndContext(LogsResult),subscription:number()});var COMMON_HTTP_HEADERS={"solana-client":"js/".concat((_process$env$npm_pack="0.0.0-development")!==null&&_process$env$npm_pack!==void 0?_process$env$npm_pack:"UNKNOWN")};var Connection=function(){function Connection(endpoint,_commitmentOrConfig){var _this=this;_classCallCheck(this,Connection);this._commitment=void 0;this._confirmTransactionInitialTimeout=void 0;this._rpcEndpoint=void 0;this._rpcWsEndpoint=void 0;this._rpcClient=void 0;this._rpcRequest=void 0;this._rpcBatchRequest=void 0;this._rpcWebSocket=void 0;this._rpcWebSocketConnected=false;this._rpcWebSocketHeartbeat=null;this._rpcWebSocketIdleTimeout=null;this._rpcWebSocketGeneration=0;this._disableBlockhashCaching=false;this._pollingBlockhash=false;this._blockhashInfo={latestBlockhash:null,lastFetch:0,transactionSignatures:[],simulatedSignatures:[]};this._nextClientSubscriptionId=0;this._subscriptionDisposeFunctionsByClientSubscriptionId={};this._subscriptionHashByClientSubscriptionId={};this._subscriptionStateChangeCallbacksByHash={};this._subscriptionCallbacksByServerSubscriptionId={};this._subscriptionsByHash={};this._subscriptionsAutoDisposedByRpc=new Set;this.getBlockHeight=function(){var requestPromises={};return function(){var _ref3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(commitmentOrConfig){var _requestPromises$requ;var _extractCommitmentFro,commitment,config,args,requestHash;return _regeneratorRuntime().wrap((function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_extractCommitmentFro=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro.commitment,config=_extractCommitmentFro.config;args=_this._buildArgs([],commitment,undefined,config);requestHash=fastStableStringify$1(args);requestPromises[requestHash]=(_requestPromises$requ=requestPromises[requestHash])!==null&&_requestPromises$requ!==void 0?_requestPromises$requ:_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return _this._rpcRequest("getBlockHeight",args);case 3:unsafeRes=_context3.sent;res=create(unsafeRes,jsonRpcResult(number()));if(!("error"in res)){_context3.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get block height information");case 7:return _context3.abrupt("return",res.result);case 8:_context3.prev=8;delete requestPromises[requestHash];return _context3.finish(8);case 11:case"end":return _context3.stop()}}),_callee3,null,[[0,,8,11]])})))();_context4.next=6;return requestPromises[requestHash];case 6:return _context4.abrupt("return",_context4.sent);case 7:case"end":return _context4.stop()}}),_callee4)})));return function(_x5){return _ref3.apply(this,arguments)}}()}();var wsEndpoint;var httpHeaders;var fetch;var fetchMiddleware;var disableRetryOnRateLimit;var httpAgent;if(_commitmentOrConfig&&typeof _commitmentOrConfig==="string"){this._commitment=_commitmentOrConfig}else if(_commitmentOrConfig){this._commitment=_commitmentOrConfig.commitment;this._confirmTransactionInitialTimeout=_commitmentOrConfig.confirmTransactionInitialTimeout;wsEndpoint=_commitmentOrConfig.wsEndpoint;httpHeaders=_commitmentOrConfig.httpHeaders;fetch=_commitmentOrConfig.fetch;fetchMiddleware=_commitmentOrConfig.fetchMiddleware;disableRetryOnRateLimit=_commitmentOrConfig.disableRetryOnRateLimit;httpAgent=_commitmentOrConfig.httpAgent}this._rpcEndpoint=assertEndpointUrl(endpoint);this._rpcWsEndpoint=wsEndpoint||makeWebsocketUrl(endpoint);this._rpcClient=createRpcClient(endpoint,httpHeaders,fetch,fetchMiddleware,disableRetryOnRateLimit,httpAgent);this._rpcRequest=createRpcRequest(this._rpcClient);this._rpcBatchRequest=createRpcBatchRequest(this._rpcClient);this._rpcWebSocket=new RpcWebSocketClient(this._rpcWsEndpoint,{autoconnect:false,max_reconnects:Infinity});this._rpcWebSocket.on("open",this._wsOnOpen.bind(this));this._rpcWebSocket.on("error",this._wsOnError.bind(this));this._rpcWebSocket.on("close",this._wsOnClose.bind(this));this._rpcWebSocket.on("accountNotification",this._wsOnAccountNotification.bind(this));this._rpcWebSocket.on("programNotification",this._wsOnProgramAccountNotification.bind(this));this._rpcWebSocket.on("slotNotification",this._wsOnSlotNotification.bind(this));this._rpcWebSocket.on("slotsUpdatesNotification",this._wsOnSlotUpdatesNotification.bind(this));this._rpcWebSocket.on("signatureNotification",this._wsOnSignatureNotification.bind(this));this._rpcWebSocket.on("rootNotification",this._wsOnRootNotification.bind(this));this._rpcWebSocket.on("logsNotification",this._wsOnLogsNotification.bind(this))}_createClass(Connection,[{key:"commitment",get:function get(){return this._commitment}},{key:"rpcEndpoint",get:function get(){return this._rpcEndpoint}},{key:"getBalanceAndContext",value:function(){var _getBalanceAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(publicKey,commitmentOrConfig){var _extractCommitmentFro2,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_extractCommitmentFro2=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro2.commitment,config=_extractCommitmentFro2.config;args=this._buildArgs([publicKey.toBase58()],commitment,undefined,config);_context5.next=4;return this._rpcRequest("getBalance",args);case 4:unsafeRes=_context5.sent;res=create(unsafeRes,jsonRpcResultAndContext(number()));if(!("error"in res)){_context5.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get balance for ".concat(publicKey.toBase58()));case 8:return _context5.abrupt("return",res.result);case 9:case"end":return _context5.stop()}}),_callee5,this)})));function getBalanceAndContext(_x6,_x7){return _getBalanceAndContext.apply(this,arguments)}return getBalanceAndContext}()},{key:"getBalance",value:function(){var _getBalance=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(publicKey,commitmentOrConfig){return _regeneratorRuntime().wrap((function _callee6$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return this.getBalanceAndContext(publicKey,commitmentOrConfig).then((function(x){return x.value}))["catch"]((function(e){throw new Error("failed to get balance of account "+publicKey.toBase58()+": "+e)}));case 2:return _context6.abrupt("return",_context6.sent);case 3:case"end":return _context6.stop()}}),_callee6,this)})));function getBalance(_x8,_x9){return _getBalance.apply(this,arguments)}return getBalance}()},{key:"getBlockTime",value:function(){var _getBlockTime=_asyncToGenerator(_regeneratorRuntime().mark((function _callee7(slot){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee7$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return this._rpcRequest("getBlockTime",[slot]);case 2:unsafeRes=_context7.sent;res=create(unsafeRes,jsonRpcResult(nullable(number())));if(!("error"in res)){_context7.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get block time for slot ".concat(slot));case 6:return _context7.abrupt("return",res.result);case 7:case"end":return _context7.stop()}}),_callee7,this)})));function getBlockTime(_x10){return _getBlockTime.apply(this,arguments)}return getBlockTime}()},{key:"getMinimumLedgerSlot",value:function(){var _getMinimumLedgerSlot=_asyncToGenerator(_regeneratorRuntime().mark((function _callee8(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee8$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return this._rpcRequest("minimumLedgerSlot",[]);case 2:unsafeRes=_context8.sent;res=create(unsafeRes,jsonRpcResult(number()));if(!("error"in res)){_context8.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get minimum ledger slot");case 6:return _context8.abrupt("return",res.result);case 7:case"end":return _context8.stop()}}),_callee8,this)})));function getMinimumLedgerSlot(){return _getMinimumLedgerSlot.apply(this,arguments)}return getMinimumLedgerSlot}()},{key:"getFirstAvailableBlock",value:function(){var _getFirstAvailableBlock=_asyncToGenerator(_regeneratorRuntime().mark((function _callee9(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee9$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return this._rpcRequest("getFirstAvailableBlock",[]);case 2:unsafeRes=_context9.sent;res=create(unsafeRes,SlotRpcResult);if(!("error"in res)){_context9.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get first available block");case 6:return _context9.abrupt("return",res.result);case 7:case"end":return _context9.stop()}}),_callee9,this)})));function getFirstAvailableBlock(){return _getFirstAvailableBlock.apply(this,arguments)}return getFirstAvailableBlock}()},{key:"getSupply",value:function(){var _getSupply=_asyncToGenerator(_regeneratorRuntime().mark((function _callee10(config){var configArg,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee10$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:configArg={};if(typeof config==="string"){configArg={commitment:config}}else if(config){configArg=_objectSpread2(_objectSpread2({},config),{},{commitment:config&&config.commitment||this.commitment})}else{configArg={commitment:this.commitment}}_context10.next=4;return this._rpcRequest("getSupply",[configArg]);case 4:unsafeRes=_context10.sent;res=create(unsafeRes,GetSupplyRpcResult);if(!("error"in res)){_context10.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get supply");case 8:return _context10.abrupt("return",res.result);case 9:case"end":return _context10.stop()}}),_callee10,this)})));function getSupply(_x11){return _getSupply.apply(this,arguments)}return getSupply}()},{key:"getTokenSupply",value:function(){var _getTokenSupply=_asyncToGenerator(_regeneratorRuntime().mark((function _callee11(tokenMintAddress,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee11$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:args=this._buildArgs([tokenMintAddress.toBase58()],commitment);_context11.next=3;return this._rpcRequest("getTokenSupply",args);case 3:unsafeRes=_context11.sent;res=create(unsafeRes,jsonRpcResultAndContext(TokenAmountResult));if(!("error"in res)){_context11.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get token supply");case 7:return _context11.abrupt("return",res.result);case 8:case"end":return _context11.stop()}}),_callee11,this)})));function getTokenSupply(_x12,_x13){return _getTokenSupply.apply(this,arguments)}return getTokenSupply}()},{key:"getTokenAccountBalance",value:function(){var _getTokenAccountBalance=_asyncToGenerator(_regeneratorRuntime().mark((function _callee12(tokenAddress,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee12$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:args=this._buildArgs([tokenAddress.toBase58()],commitment);_context12.next=3;return this._rpcRequest("getTokenAccountBalance",args);case 3:unsafeRes=_context12.sent;res=create(unsafeRes,jsonRpcResultAndContext(TokenAmountResult));if(!("error"in res)){_context12.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get token account balance");case 7:return _context12.abrupt("return",res.result);case 8:case"end":return _context12.stop()}}),_callee12,this)})));function getTokenAccountBalance(_x14,_x15){return _getTokenAccountBalance.apply(this,arguments)}return getTokenAccountBalance}()},{key:"getTokenAccountsByOwner",value:function(){var _getTokenAccountsByOwner=_asyncToGenerator(_regeneratorRuntime().mark((function _callee13(ownerAddress,filter,commitmentOrConfig){var _extractCommitmentFro3,commitment,config,_args,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee13$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_extractCommitmentFro3=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro3.commitment,config=_extractCommitmentFro3.config;_args=[ownerAddress.toBase58()];if("mint"in filter){_args.push({mint:filter.mint.toBase58()})}else{_args.push({programId:filter.programId.toBase58()})}args=this._buildArgs(_args,commitment,"base64",config);_context13.next=6;return this._rpcRequest("getTokenAccountsByOwner",args);case 6:unsafeRes=_context13.sent;res=create(unsafeRes,GetTokenAccountsByOwner);if(!("error"in res)){_context13.next=10;break}throw new SolanaJSONRPCError(res.error,"failed to get token accounts owned by account ".concat(ownerAddress.toBase58()));case 10:return _context13.abrupt("return",res.result);case 11:case"end":return _context13.stop()}}),_callee13,this)})));function getTokenAccountsByOwner(_x16,_x17,_x18){return _getTokenAccountsByOwner.apply(this,arguments)}return getTokenAccountsByOwner}()},{key:"getParsedTokenAccountsByOwner",value:function(){var _getParsedTokenAccountsByOwner=_asyncToGenerator(_regeneratorRuntime().mark((function _callee14(ownerAddress,filter,commitment){var _args,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee14$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_args=[ownerAddress.toBase58()];if("mint"in filter){_args.push({mint:filter.mint.toBase58()})}else{_args.push({programId:filter.programId.toBase58()})}args=this._buildArgs(_args,commitment,"jsonParsed");_context14.next=5;return this._rpcRequest("getTokenAccountsByOwner",args);case 5:unsafeRes=_context14.sent;res=create(unsafeRes,GetParsedTokenAccountsByOwner);if(!("error"in res)){_context14.next=9;break}throw new SolanaJSONRPCError(res.error,"failed to get token accounts owned by account ".concat(ownerAddress.toBase58()));case 9:return _context14.abrupt("return",res.result);case 10:case"end":return _context14.stop()}}),_callee14,this)})));function getParsedTokenAccountsByOwner(_x19,_x20,_x21){return _getParsedTokenAccountsByOwner.apply(this,arguments)}return getParsedTokenAccountsByOwner}()},{key:"getLargestAccounts",value:function(){var _getLargestAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee15(config){var arg,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee15$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:arg=_objectSpread2(_objectSpread2({},config),{},{commitment:config&&config.commitment||this.commitment});args=arg.filter||arg.commitment?[arg]:[];_context15.next=4;return this._rpcRequest("getLargestAccounts",args);case 4:unsafeRes=_context15.sent;res=create(unsafeRes,GetLargestAccountsRpcResult);if(!("error"in res)){_context15.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get largest accounts");case 8:return _context15.abrupt("return",res.result);case 9:case"end":return _context15.stop()}}),_callee15,this)})));function getLargestAccounts(_x22){return _getLargestAccounts.apply(this,arguments)}return getLargestAccounts}()},{key:"getTokenLargestAccounts",value:function(){var _getTokenLargestAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee16(mintAddress,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee16$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:args=this._buildArgs([mintAddress.toBase58()],commitment);_context16.next=3;return this._rpcRequest("getTokenLargestAccounts",args);case 3:unsafeRes=_context16.sent;res=create(unsafeRes,GetTokenLargestAccountsResult);if(!("error"in res)){_context16.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get token largest accounts");case 7:return _context16.abrupt("return",res.result);case 8:case"end":return _context16.stop()}}),_callee16,this)})));function getTokenLargestAccounts(_x23,_x24){return _getTokenLargestAccounts.apply(this,arguments)}return getTokenLargestAccounts}()},{key:"getAccountInfoAndContext",value:function(){var _getAccountInfoAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee17(publicKey,commitmentOrConfig){var _extractCommitmentFro4,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee17$(_context17){while(1)switch(_context17.prev=_context17.next){case 0:_extractCommitmentFro4=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro4.commitment,config=_extractCommitmentFro4.config;args=this._buildArgs([publicKey.toBase58()],commitment,"base64",config);_context17.next=4;return this._rpcRequest("getAccountInfo",args);case 4:unsafeRes=_context17.sent;res=create(unsafeRes,jsonRpcResultAndContext(nullable(AccountInfoResult)));if(!("error"in res)){_context17.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get info about account ".concat(publicKey.toBase58()));case 8:return _context17.abrupt("return",res.result);case 9:case"end":return _context17.stop()}}),_callee17,this)})));function getAccountInfoAndContext(_x25,_x26){return _getAccountInfoAndContext.apply(this,arguments)}return getAccountInfoAndContext}()},{key:"getParsedAccountInfo",value:function(){var _getParsedAccountInfo=_asyncToGenerator(_regeneratorRuntime().mark((function _callee18(publicKey,commitmentOrConfig){var _extractCommitmentFro5,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee18$(_context18){while(1)switch(_context18.prev=_context18.next){case 0:_extractCommitmentFro5=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro5.commitment,config=_extractCommitmentFro5.config;args=this._buildArgs([publicKey.toBase58()],commitment,"jsonParsed",config);_context18.next=4;return this._rpcRequest("getAccountInfo",args);case 4:unsafeRes=_context18.sent;res=create(unsafeRes,jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)));if(!("error"in res)){_context18.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get info about account ".concat(publicKey.toBase58()));case 8:return _context18.abrupt("return",res.result);case 9:case"end":return _context18.stop()}}),_callee18,this)})));function getParsedAccountInfo(_x27,_x28){return _getParsedAccountInfo.apply(this,arguments)}return getParsedAccountInfo}()},{key:"getAccountInfo",value:function(){var _getAccountInfo=_asyncToGenerator(_regeneratorRuntime().mark((function _callee19(publicKey,commitmentOrConfig){var res;return _regeneratorRuntime().wrap((function _callee19$(_context19){while(1)switch(_context19.prev=_context19.next){case 0:_context19.prev=0;_context19.next=3;return this.getAccountInfoAndContext(publicKey,commitmentOrConfig);case 3:res=_context19.sent;return _context19.abrupt("return",res.value);case 7:_context19.prev=7;_context19.t0=_context19["catch"](0);throw new Error("failed to get info about account "+publicKey.toBase58()+": "+_context19.t0);case 10:case"end":return _context19.stop()}}),_callee19,this,[[0,7]])})));function getAccountInfo(_x29,_x30){return _getAccountInfo.apply(this,arguments)}return getAccountInfo}()},{key:"getMultipleParsedAccounts",value:function(){var _getMultipleParsedAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee20(publicKeys,rawConfig){var _extractCommitmentFro6,commitment,config,keys,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee20$(_context20){while(1)switch(_context20.prev=_context20.next){case 0:_extractCommitmentFro6=extractCommitmentFromConfig(rawConfig),commitment=_extractCommitmentFro6.commitment,config=_extractCommitmentFro6.config;keys=publicKeys.map((function(key){return key.toBase58()}));args=this._buildArgs([keys],commitment,"jsonParsed",config);_context20.next=5;return this._rpcRequest("getMultipleAccounts",args);case 5:unsafeRes=_context20.sent;res=create(unsafeRes,jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))));if(!("error"in res)){_context20.next=9;break}throw new SolanaJSONRPCError(res.error,"failed to get info for accounts ".concat(keys));case 9:return _context20.abrupt("return",res.result);case 10:case"end":return _context20.stop()}}),_callee20,this)})));function getMultipleParsedAccounts(_x31,_x32){return _getMultipleParsedAccounts.apply(this,arguments)}return getMultipleParsedAccounts}()},{key:"getMultipleAccountsInfoAndContext",value:function(){var _getMultipleAccountsInfoAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee21(publicKeys,commitmentOrConfig){var _extractCommitmentFro7,commitment,config,keys,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee21$(_context21){while(1)switch(_context21.prev=_context21.next){case 0:_extractCommitmentFro7=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro7.commitment,config=_extractCommitmentFro7.config;keys=publicKeys.map((function(key){return key.toBase58()}));args=this._buildArgs([keys],commitment,"base64",config);_context21.next=5;return this._rpcRequest("getMultipleAccounts",args);case 5:unsafeRes=_context21.sent;res=create(unsafeRes,jsonRpcResultAndContext(array(nullable(AccountInfoResult))));if(!("error"in res)){_context21.next=9;break}throw new SolanaJSONRPCError(res.error,"failed to get info for accounts ".concat(keys));case 9:return _context21.abrupt("return",res.result);case 10:case"end":return _context21.stop()}}),_callee21,this)})));function getMultipleAccountsInfoAndContext(_x33,_x34){return _getMultipleAccountsInfoAndContext.apply(this,arguments)}return getMultipleAccountsInfoAndContext}()},{key:"getMultipleAccountsInfo",value:function(){var _getMultipleAccountsInfo=_asyncToGenerator(_regeneratorRuntime().mark((function _callee22(publicKeys,commitmentOrConfig){var res;return _regeneratorRuntime().wrap((function _callee22$(_context22){while(1)switch(_context22.prev=_context22.next){case 0:_context22.next=2;return this.getMultipleAccountsInfoAndContext(publicKeys,commitmentOrConfig);case 2:res=_context22.sent;return _context22.abrupt("return",res.value);case 4:case"end":return _context22.stop()}}),_callee22,this)})));function getMultipleAccountsInfo(_x35,_x36){return _getMultipleAccountsInfo.apply(this,arguments)}return getMultipleAccountsInfo}()},{key:"getStakeActivation",value:function(){var _getStakeActivation=_asyncToGenerator(_regeneratorRuntime().mark((function _callee23(publicKey,commitmentOrConfig,epoch){var _extractCommitmentFro8,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee23$(_context23){while(1)switch(_context23.prev=_context23.next){case 0:_extractCommitmentFro8=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro8.commitment,config=_extractCommitmentFro8.config;args=this._buildArgs([publicKey.toBase58()],commitment,undefined,_objectSpread2(_objectSpread2({},config),{},{epoch:epoch!=null?epoch:config===null||config===void 0?void 0:config.epoch}));_context23.next=4;return this._rpcRequest("getStakeActivation",args);case 4:unsafeRes=_context23.sent;res=create(unsafeRes,jsonRpcResult(StakeActivationResult));if(!("error"in res)){_context23.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get Stake Activation ".concat(publicKey.toBase58()));case 8:return _context23.abrupt("return",res.result);case 9:case"end":return _context23.stop()}}),_callee23,this)})));function getStakeActivation(_x37,_x38,_x39){return _getStakeActivation.apply(this,arguments)}return getStakeActivation}()},{key:"getProgramAccounts",value:function(){var _getProgramAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee24(programId,configOrCommitment){var _extractCommitmentFro9,commitment,config,_ref5,encoding,configWithoutEncoding,args,unsafeRes,baseSchema,res;return _regeneratorRuntime().wrap((function _callee24$(_context24){while(1)switch(_context24.prev=_context24.next){case 0:_extractCommitmentFro9=extractCommitmentFromConfig(configOrCommitment),commitment=_extractCommitmentFro9.commitment,config=_extractCommitmentFro9.config;_ref5=config||{},encoding=_ref5.encoding,configWithoutEncoding=_objectWithoutProperties(_ref5,_excluded2);args=this._buildArgs([programId.toBase58()],commitment,encoding||"base64",configWithoutEncoding);_context24.next=5;return this._rpcRequest("getProgramAccounts",args);case 5:unsafeRes=_context24.sent;baseSchema=array(KeyedAccountInfoResult);res=configWithoutEncoding.withContext===true?create(unsafeRes,jsonRpcResultAndContext(baseSchema)):create(unsafeRes,jsonRpcResult(baseSchema));if(!("error"in res)){_context24.next=10;break}throw new SolanaJSONRPCError(res.error,"failed to get accounts owned by program ".concat(programId.toBase58()));case 10:return _context24.abrupt("return",res.result);case 11:case"end":return _context24.stop()}}),_callee24,this)})));function getProgramAccounts(_x40,_x41){return _getProgramAccounts.apply(this,arguments)}return getProgramAccounts}()},{key:"getParsedProgramAccounts",value:function(){var _getParsedProgramAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee25(programId,configOrCommitment){var _extractCommitmentFro10,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee25$(_context25){while(1)switch(_context25.prev=_context25.next){case 0:_extractCommitmentFro10=extractCommitmentFromConfig(configOrCommitment),commitment=_extractCommitmentFro10.commitment,config=_extractCommitmentFro10.config;args=this._buildArgs([programId.toBase58()],commitment,"jsonParsed",config);_context25.next=4;return this._rpcRequest("getProgramAccounts",args);case 4:unsafeRes=_context25.sent;res=create(unsafeRes,jsonRpcResult(array(KeyedParsedAccountInfoResult)));if(!("error"in res)){_context25.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get accounts owned by program ".concat(programId.toBase58()));case 8:return _context25.abrupt("return",res.result);case 9:case"end":return _context25.stop()}}),_callee25,this)})));function getParsedProgramAccounts(_x42,_x43){return _getParsedProgramAccounts.apply(this,arguments)}return getParsedProgramAccounts}()},{key:"confirmTransaction",value:function(){var _confirmTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee26(strategy,commitment){var rawSignature,_config$abortSignal,_config,decodedSignature;return _regeneratorRuntime().wrap((function _callee26$(_context26){while(1)switch(_context26.prev=_context26.next){case 0:if(!(typeof strategy=="string")){_context26.next=4;break}rawSignature=strategy;_context26.next=8;break;case 4:_config=strategy;if(!((_config$abortSignal=_config.abortSignal)!==null&&_config$abortSignal!==void 0&&_config$abortSignal.aborted)){_context26.next=7;break}return _context26.abrupt("return",Promise.reject(_config.abortSignal.reason));case 7:rawSignature=_config.signature;case 8:_context26.prev=8;decodedSignature=bs58$1.decode(rawSignature);_context26.next=15;break;case 12:_context26.prev=12;_context26.t0=_context26["catch"](8);throw new Error("signature must be base58 encoded: "+rawSignature);case 15:assert$1(decodedSignature.length===64,"signature has invalid length");if(!(typeof strategy==="string")){_context26.next=22;break}_context26.next=19;return this.confirmTransactionUsingLegacyTimeoutStrategy({commitment:commitment||this.commitment,signature:rawSignature});case 19:return _context26.abrupt("return",_context26.sent);case 22:if(!("lastValidBlockHeight"in strategy)){_context26.next=28;break}_context26.next=25;return this.confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:commitment||this.commitment,strategy:strategy});case 25:return _context26.abrupt("return",_context26.sent);case 28:_context26.next=30;return this.confirmTransactionUsingDurableNonceStrategy({commitment:commitment||this.commitment,strategy:strategy});case 30:return _context26.abrupt("return",_context26.sent);case 31:case"end":return _context26.stop()}}),_callee26,this,[[8,12]])})));function confirmTransaction(_x44,_x45){return _confirmTransaction.apply(this,arguments)}return confirmTransaction}()},{key:"getCancellationPromise",value:function getCancellationPromise(signal){return new Promise((function(_,reject){if(signal==null){return}if(signal.aborted){reject(signal.reason)}else{signal.addEventListener("abort",(function(){reject(signal.reason)}))}}))}},{key:"getTransactionConfirmationPromise",value:function getTransactionConfirmationPromise(_ref6){var _this2=this;var commitment=_ref6.commitment,signature=_ref6.signature;var signatureSubscriptionId;var disposeSignatureSubscriptionStateChangeObserver;var done=false;var confirmationPromise=new Promise((function(resolve,reject){try{signatureSubscriptionId=_this2.onSignature(signature,(function(result,context){signatureSubscriptionId=undefined;var response={context:context,value:result};resolve({__type:TransactionStatus.PROCESSED,response:response})}),commitment);var subscriptionSetupPromise=new Promise((function(resolveSubscriptionSetup){if(signatureSubscriptionId==null){resolveSubscriptionSetup()}else{disposeSignatureSubscriptionStateChangeObserver=_this2._onSubscriptionStateChange(signatureSubscriptionId,(function(nextState){if(nextState==="subscribed"){resolveSubscriptionSetup()}}))}}));_asyncToGenerator(_regeneratorRuntime().mark((function _callee27(){var response,context,value;return _regeneratorRuntime().wrap((function _callee27$(_context27){while(1)switch(_context27.prev=_context27.next){case 0:_context27.next=2;return subscriptionSetupPromise;case 2:if(!done){_context27.next=4;break}return _context27.abrupt("return");case 4:_context27.next=6;return _this2.getSignatureStatus(signature);case 6:response=_context27.sent;if(!done){_context27.next=9;break}return _context27.abrupt("return");case 9:if(!(response==null)){_context27.next=11;break}return _context27.abrupt("return");case 11:context=response.context,value=response.value;if(!(value==null)){_context27.next=14;break}return _context27.abrupt("return");case 14:if(!(value!==null&&value!==void 0&&value.err)){_context27.next=18;break}reject(value.err);_context27.next=29;break;case 18:_context27.t0=commitment;_context27.next=_context27.t0==="confirmed"?21:_context27.t0==="single"?21:_context27.t0==="singleGossip"?21:_context27.t0==="finalized"?24:_context27.t0==="max"?24:_context27.t0==="root"?24:_context27.t0==="processed"?27:_context27.t0==="recent"?27:27;break;case 21:if(!(value.confirmationStatus==="processed")){_context27.next=23;break}return _context27.abrupt("return");case 23:return _context27.abrupt("break",27);case 24:if(!(value.confirmationStatus==="processed"||value.confirmationStatus==="confirmed")){_context27.next=26;break}return _context27.abrupt("return");case 26:return _context27.abrupt("break",27);case 27:done=true;resolve({__type:TransactionStatus.PROCESSED,response:{context:context,value:value}});case 29:case"end":return _context27.stop()}}),_callee27)})))()}catch(err){reject(err)}}));var abortConfirmation=function abortConfirmation(){if(disposeSignatureSubscriptionStateChangeObserver){disposeSignatureSubscriptionStateChangeObserver();disposeSignatureSubscriptionStateChangeObserver=undefined}if(signatureSubscriptionId!=null){_this2.removeSignatureListener(signatureSubscriptionId);signatureSubscriptionId=undefined}};return{abortConfirmation:abortConfirmation,confirmationPromise:confirmationPromise}}},{key:"confirmTransactionUsingBlockHeightExceedanceStrategy",value:function(){var _confirmTransactionUsingBlockHeightExceedanceStrategy=_asyncToGenerator(_regeneratorRuntime().mark((function _callee30(_ref8){var _this3=this;var commitment,_ref8$strategy,abortSignal,lastValidBlockHeight,signature,done,expiryPromise,_this$getTransactionC,abortConfirmation,confirmationPromise,cancellationPromise,result,outcome;return _regeneratorRuntime().wrap((function _callee30$(_context30){while(1)switch(_context30.prev=_context30.next){case 0:commitment=_ref8.commitment,_ref8$strategy=_ref8.strategy,abortSignal=_ref8$strategy.abortSignal,lastValidBlockHeight=_ref8$strategy.lastValidBlockHeight,signature=_ref8$strategy.signature;done=false;expiryPromise=new Promise((function(resolve){var checkBlockHeight=function(){var _ref9=_asyncToGenerator(_regeneratorRuntime().mark((function _callee28(){var blockHeight;return _regeneratorRuntime().wrap((function _callee28$(_context28){while(1)switch(_context28.prev=_context28.next){case 0:_context28.prev=0;_context28.next=3;return _this3.getBlockHeight(commitment);case 3:blockHeight=_context28.sent;return _context28.abrupt("return",blockHeight);case 7:_context28.prev=7;_context28.t0=_context28["catch"](0);return _context28.abrupt("return",-1);case 10:case"end":return _context28.stop()}}),_callee28,null,[[0,7]])})));return function checkBlockHeight(){return _ref9.apply(this,arguments)}}();_asyncToGenerator(_regeneratorRuntime().mark((function _callee29(){var currentBlockHeight;return _regeneratorRuntime().wrap((function _callee29$(_context29){while(1)switch(_context29.prev=_context29.next){case 0:_context29.next=2;return checkBlockHeight();case 2:currentBlockHeight=_context29.sent;if(!done){_context29.next=5;break}return _context29.abrupt("return");case 5:if(!(currentBlockHeight<=lastValidBlockHeight)){_context29.next=17;break}_context29.next=8;return sleep(1e3);case 8:if(!done){_context29.next=10;break}return _context29.abrupt("return");case 10:_context29.next=12;return checkBlockHeight();case 12:currentBlockHeight=_context29.sent;if(!done){_context29.next=15;break}return _context29.abrupt("return");case 15:_context29.next=5;break;case 17:resolve({__type:TransactionStatus.BLOCKHEIGHT_EXCEEDED});case 18:case"end":return _context29.stop()}}),_callee29)})))()}));_this$getTransactionC=this.getTransactionConfirmationPromise({commitment:commitment,signature:signature}),abortConfirmation=_this$getTransactionC.abortConfirmation,confirmationPromise=_this$getTransactionC.confirmationPromise;cancellationPromise=this.getCancellationPromise(abortSignal);_context30.prev=5;_context30.next=8;return Promise.race([cancellationPromise,confirmationPromise,expiryPromise]);case 8:outcome=_context30.sent;if(!(outcome.__type===TransactionStatus.PROCESSED)){_context30.next=13;break}result=outcome.response;_context30.next=14;break;case 13:throw new TransactionExpiredBlockheightExceededError(signature);case 14:_context30.prev=14;done=true;abortConfirmation();return _context30.finish(14);case 18:return _context30.abrupt("return",result);case 19:case"end":return _context30.stop()}}),_callee30,this,[[5,,14,18]])})));function confirmTransactionUsingBlockHeightExceedanceStrategy(_x46){return _confirmTransactionUsingBlockHeightExceedanceStrategy.apply(this,arguments)}return confirmTransactionUsingBlockHeightExceedanceStrategy}()},{key:"confirmTransactionUsingDurableNonceStrategy",value:function(){var _confirmTransactionUsingDurableNonceStrategy=_asyncToGenerator(_regeneratorRuntime().mark((function _callee33(_ref11){var _this4=this;var commitment,_ref11$strategy,abortSignal,minContextSlot,nonceAccountPubkey,nonceValue,signature,done,expiryPromise,_this$getTransactionC2,abortConfirmation,confirmationPromise,cancellationPromise,result,outcome,_signatureStatus,signatureStatus,_outcome$slotInWhichN,status,commitmentForStatus,confirmationStatus;return _regeneratorRuntime().wrap((function _callee33$(_context34){while(1)switch(_context34.prev=_context34.next){case 0:commitment=_ref11.commitment,_ref11$strategy=_ref11.strategy,abortSignal=_ref11$strategy.abortSignal,minContextSlot=_ref11$strategy.minContextSlot,nonceAccountPubkey=_ref11$strategy.nonceAccountPubkey,nonceValue=_ref11$strategy.nonceValue,signature=_ref11$strategy.signature;done=false;expiryPromise=new Promise((function(resolve){var currentNonceValue=nonceValue;var lastCheckedSlot=null;var getCurrentNonceValue=function(){var _ref12=_asyncToGenerator(_regeneratorRuntime().mark((function _callee31(){var _yield$_this4$getNonc,_context31,nonceAccount;return _regeneratorRuntime().wrap((function _callee31$(_context32){while(1)switch(_context32.prev=_context32.next){case 0:_context32.prev=0;_context32.next=3;return _this4.getNonceAndContext(nonceAccountPubkey,{commitment:commitment,minContextSlot:minContextSlot});case 3:_yield$_this4$getNonc=_context32.sent;_context31=_yield$_this4$getNonc.context;nonceAccount=_yield$_this4$getNonc.value;lastCheckedSlot=_context31.slot;return _context32.abrupt("return",nonceAccount===null||nonceAccount===void 0?void 0:nonceAccount.nonce);case 10:_context32.prev=10;_context32.t0=_context32["catch"](0);return _context32.abrupt("return",currentNonceValue);case 13:case"end":return _context32.stop()}}),_callee31,null,[[0,10]])})));return function getCurrentNonceValue(){return _ref12.apply(this,arguments)}}();_asyncToGenerator(_regeneratorRuntime().mark((function _callee32(){return _regeneratorRuntime().wrap((function _callee32$(_context33){while(1)switch(_context33.prev=_context33.next){case 0:_context33.next=2;return getCurrentNonceValue();case 2:currentNonceValue=_context33.sent;if(!done){_context33.next=5;break}return _context33.abrupt("return");case 5:if(!(nonceValue!==currentNonceValue)){_context33.next=9;break}resolve({__type:TransactionStatus.NONCE_INVALID,slotInWhichNonceDidAdvance:lastCheckedSlot});return _context33.abrupt("return");case 9:_context33.next=11;return sleep(2e3);case 11:if(!done){_context33.next=13;break}return _context33.abrupt("return");case 13:_context33.next=15;return getCurrentNonceValue();case 15:currentNonceValue=_context33.sent;if(!done){_context33.next=18;break}return _context33.abrupt("return");case 18:_context33.next=5;break;case 20:case"end":return _context33.stop()}}),_callee32)})))()}));_this$getTransactionC2=this.getTransactionConfirmationPromise({commitment:commitment,signature:signature}),abortConfirmation=_this$getTransactionC2.abortConfirmation,confirmationPromise=_this$getTransactionC2.confirmationPromise;cancellationPromise=this.getCancellationPromise(abortSignal);_context34.prev=5;_context34.next=8;return Promise.race([cancellationPromise,confirmationPromise,expiryPromise]);case 8:outcome=_context34.sent;if(!(outcome.__type===TransactionStatus.PROCESSED)){_context34.next=13;break}result=outcome.response;_context34.next=47;break;case 13:_context34.next=16;return this.getSignatureStatus(signature);case 16:status=_context34.sent;if(!(status==null)){_context34.next=19;break}return _context34.abrupt("break",27);case 19:if(!(status.context.slot<((_outcome$slotInWhichN=outcome.slotInWhichNonceDidAdvance)!==null&&_outcome$slotInWhichN!==void 0?_outcome$slotInWhichN:minContextSlot))){_context34.next=23;break}_context34.next=22;return sleep(400);case 22:return _context34.abrupt("continue",13);case 23:signatureStatus=status;return _context34.abrupt("break",27);case 27:if(!((_signatureStatus=signatureStatus)!==null&&_signatureStatus!==void 0&&_signatureStatus.value)){_context34.next=46;break}commitmentForStatus=commitment||"finalized";confirmationStatus=signatureStatus.value.confirmationStatus;_context34.t0=commitmentForStatus;_context34.next=_context34.t0==="processed"?33:_context34.t0==="recent"?33:_context34.t0==="confirmed"?36:_context34.t0==="single"?36:_context34.t0==="singleGossip"?36:_context34.t0==="finalized"?39:_context34.t0==="max"?39:_context34.t0==="root"?39:42;break;case 33:if(!(confirmationStatus!=="processed"&&confirmationStatus!=="confirmed"&&confirmationStatus!=="finalized")){_context34.next=35;break}throw new TransactionExpiredNonceInvalidError(signature);case 35:return _context34.abrupt("break",43);case 36:if(!(confirmationStatus!=="confirmed"&&confirmationStatus!=="finalized")){_context34.next=38;break}throw new TransactionExpiredNonceInvalidError(signature);case 38:return _context34.abrupt("break",43);case 39:if(!(confirmationStatus!=="finalized")){_context34.next=41;break}throw new TransactionExpiredNonceInvalidError(signature);case 41:return _context34.abrupt("break",43);case 42:case 43:result={context:signatureStatus.context,value:{err:signatureStatus.value.err}};_context34.next=47;break;case 46:throw new TransactionExpiredNonceInvalidError(signature);case 47:_context34.prev=47;done=true;abortConfirmation();return _context34.finish(47);case 51:return _context34.abrupt("return",result);case 52:case"end":return _context34.stop()}}),_callee33,this,[[5,,47,51]])})));function confirmTransactionUsingDurableNonceStrategy(_x47){return _confirmTransactionUsingDurableNonceStrategy.apply(this,arguments)}return confirmTransactionUsingDurableNonceStrategy}()},{key:"confirmTransactionUsingLegacyTimeoutStrategy",value:function(){var _confirmTransactionUsingLegacyTimeoutStrategy=_asyncToGenerator(_regeneratorRuntime().mark((function _callee34(_ref14){var _this5=this;var commitment,signature,timeoutId,expiryPromise,_this$getTransactionC3,abortConfirmation,confirmationPromise,result,outcome;return _regeneratorRuntime().wrap((function _callee34$(_context35){while(1)switch(_context35.prev=_context35.next){case 0:commitment=_ref14.commitment,signature=_ref14.signature;expiryPromise=new Promise((function(resolve){var timeoutMs=_this5._confirmTransactionInitialTimeout||60*1e3;switch(commitment){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":{timeoutMs=_this5._confirmTransactionInitialTimeout||30*1e3;break}}timeoutId=setTimeout((function(){return resolve({__type:TransactionStatus.TIMED_OUT,timeoutMs:timeoutMs})}),timeoutMs)}));_this$getTransactionC3=this.getTransactionConfirmationPromise({commitment:commitment,signature:signature}),abortConfirmation=_this$getTransactionC3.abortConfirmation,confirmationPromise=_this$getTransactionC3.confirmationPromise;_context35.prev=3;_context35.next=6;return Promise.race([confirmationPromise,expiryPromise]);case 6:outcome=_context35.sent;if(!(outcome.__type===TransactionStatus.PROCESSED)){_context35.next=11;break}result=outcome.response;_context35.next=12;break;case 11:throw new TransactionExpiredTimeoutError(signature,outcome.timeoutMs/1e3);case 12:_context35.prev=12;clearTimeout(timeoutId);abortConfirmation();return _context35.finish(12);case 16:return _context35.abrupt("return",result);case 17:case"end":return _context35.stop()}}),_callee34,this,[[3,,12,16]])})));function confirmTransactionUsingLegacyTimeoutStrategy(_x48){return _confirmTransactionUsingLegacyTimeoutStrategy.apply(this,arguments)}return confirmTransactionUsingLegacyTimeoutStrategy}()},{key:"getClusterNodes",value:function(){var _getClusterNodes=_asyncToGenerator(_regeneratorRuntime().mark((function _callee35(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee35$(_context36){while(1)switch(_context36.prev=_context36.next){case 0:_context36.next=2;return this._rpcRequest("getClusterNodes",[]);case 2:unsafeRes=_context36.sent;res=create(unsafeRes,jsonRpcResult(array(ContactInfoResult)));if(!("error"in res)){_context36.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get cluster nodes");case 6:return _context36.abrupt("return",res.result);case 7:case"end":return _context36.stop()}}),_callee35,this)})));function getClusterNodes(){return _getClusterNodes.apply(this,arguments)}return getClusterNodes}()},{key:"getVoteAccounts",value:function(){var _getVoteAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee36(commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee36$(_context37){while(1)switch(_context37.prev=_context37.next){case 0:args=this._buildArgs([],commitment);_context37.next=3;return this._rpcRequest("getVoteAccounts",args);case 3:unsafeRes=_context37.sent;res=create(unsafeRes,GetVoteAccounts);if(!("error"in res)){_context37.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get vote accounts");case 7:return _context37.abrupt("return",res.result);case 8:case"end":return _context37.stop()}}),_callee36,this)})));function getVoteAccounts(_x49){return _getVoteAccounts.apply(this,arguments)}return getVoteAccounts}()},{key:"getSlot",value:function(){var _getSlot=_asyncToGenerator(_regeneratorRuntime().mark((function _callee37(commitmentOrConfig){var _extractCommitmentFro11,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee37$(_context38){while(1)switch(_context38.prev=_context38.next){case 0:_extractCommitmentFro11=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro11.commitment,config=_extractCommitmentFro11.config;args=this._buildArgs([],commitment,undefined,config);_context38.next=4;return this._rpcRequest("getSlot",args);case 4:unsafeRes=_context38.sent;res=create(unsafeRes,jsonRpcResult(number()));if(!("error"in res)){_context38.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get slot");case 8:return _context38.abrupt("return",res.result);case 9:case"end":return _context38.stop()}}),_callee37,this)})));function getSlot(_x50){return _getSlot.apply(this,arguments)}return getSlot}()},{key:"getSlotLeader",value:function(){var _getSlotLeader=_asyncToGenerator(_regeneratorRuntime().mark((function _callee38(commitmentOrConfig){var _extractCommitmentFro12,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee38$(_context39){while(1)switch(_context39.prev=_context39.next){case 0:_extractCommitmentFro12=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro12.commitment,config=_extractCommitmentFro12.config;args=this._buildArgs([],commitment,undefined,config);_context39.next=4;return this._rpcRequest("getSlotLeader",args);case 4:unsafeRes=_context39.sent;res=create(unsafeRes,jsonRpcResult(string()));if(!("error"in res)){_context39.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get slot leader");case 8:return _context39.abrupt("return",res.result);case 9:case"end":return _context39.stop()}}),_callee38,this)})));function getSlotLeader(_x51){return _getSlotLeader.apply(this,arguments)}return getSlotLeader}()},{key:"getSlotLeaders",value:function(){var _getSlotLeaders=_asyncToGenerator(_regeneratorRuntime().mark((function _callee39(startSlot,limit){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee39$(_context40){while(1)switch(_context40.prev=_context40.next){case 0:args=[startSlot,limit];_context40.next=3;return this._rpcRequest("getSlotLeaders",args);case 3:unsafeRes=_context40.sent;res=create(unsafeRes,jsonRpcResult(array(PublicKeyFromString)));if(!("error"in res)){_context40.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get slot leaders");case 7:return _context40.abrupt("return",res.result);case 8:case"end":return _context40.stop()}}),_callee39,this)})));function getSlotLeaders(_x52,_x53){return _getSlotLeaders.apply(this,arguments)}return getSlotLeaders}()},{key:"getSignatureStatus",value:function(){var _getSignatureStatus=_asyncToGenerator(_regeneratorRuntime().mark((function _callee40(signature,config){var _yield$this$getSignat,context,values,value;return _regeneratorRuntime().wrap((function _callee40$(_context41){while(1)switch(_context41.prev=_context41.next){case 0:_context41.next=2;return this.getSignatureStatuses([signature],config);case 2:_yield$this$getSignat=_context41.sent;context=_yield$this$getSignat.context;values=_yield$this$getSignat.value;assert$1(values.length===1);value=values[0];return _context41.abrupt("return",{context:context,value:value});case 8:case"end":return _context41.stop()}}),_callee40,this)})));function getSignatureStatus(_x54,_x55){return _getSignatureStatus.apply(this,arguments)}return getSignatureStatus}()},{key:"getSignatureStatuses",value:function(){var _getSignatureStatuses=_asyncToGenerator(_regeneratorRuntime().mark((function _callee41(signatures,config){var params,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee41$(_context42){while(1)switch(_context42.prev=_context42.next){case 0:params=[signatures];if(config){params.push(config)}_context42.next=4;return this._rpcRequest("getSignatureStatuses",params);case 4:unsafeRes=_context42.sent;res=create(unsafeRes,GetSignatureStatusesRpcResult);if(!("error"in res)){_context42.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get signature status");case 8:return _context42.abrupt("return",res.result);case 9:case"end":return _context42.stop()}}),_callee41,this)})));function getSignatureStatuses(_x56,_x57){return _getSignatureStatuses.apply(this,arguments)}return getSignatureStatuses}()},{key:"getTransactionCount",value:function(){var _getTransactionCount=_asyncToGenerator(_regeneratorRuntime().mark((function _callee42(commitmentOrConfig){var _extractCommitmentFro13,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee42$(_context43){while(1)switch(_context43.prev=_context43.next){case 0:_extractCommitmentFro13=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro13.commitment,config=_extractCommitmentFro13.config;args=this._buildArgs([],commitment,undefined,config);_context43.next=4;return this._rpcRequest("getTransactionCount",args);case 4:unsafeRes=_context43.sent;res=create(unsafeRes,jsonRpcResult(number()));if(!("error"in res)){_context43.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get transaction count");case 8:return _context43.abrupt("return",res.result);case 9:case"end":return _context43.stop()}}),_callee42,this)})));function getTransactionCount(_x58){return _getTransactionCount.apply(this,arguments)}return getTransactionCount}()},{key:"getTotalSupply",value:function(){var _getTotalSupply=_asyncToGenerator(_regeneratorRuntime().mark((function _callee43(commitment){var result;return _regeneratorRuntime().wrap((function _callee43$(_context44){while(1)switch(_context44.prev=_context44.next){case 0:_context44.next=2;return this.getSupply({commitment:commitment,excludeNonCirculatingAccountsList:true});case 2:result=_context44.sent;return _context44.abrupt("return",result.value.total);case 4:case"end":return _context44.stop()}}),_callee43,this)})));function getTotalSupply(_x59){return _getTotalSupply.apply(this,arguments)}return getTotalSupply}()},{key:"getInflationGovernor",value:function(){var _getInflationGovernor=_asyncToGenerator(_regeneratorRuntime().mark((function _callee44(commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee44$(_context45){while(1)switch(_context45.prev=_context45.next){case 0:args=this._buildArgs([],commitment);_context45.next=3;return this._rpcRequest("getInflationGovernor",args);case 3:unsafeRes=_context45.sent;res=create(unsafeRes,GetInflationGovernorRpcResult);if(!("error"in res)){_context45.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get inflation");case 7:return _context45.abrupt("return",res.result);case 8:case"end":return _context45.stop()}}),_callee44,this)})));function getInflationGovernor(_x60){return _getInflationGovernor.apply(this,arguments)}return getInflationGovernor}()},{key:"getInflationReward",value:function(){var _getInflationReward=_asyncToGenerator(_regeneratorRuntime().mark((function _callee45(addresses,epoch,commitmentOrConfig){var _extractCommitmentFro14,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee45$(_context46){while(1)switch(_context46.prev=_context46.next){case 0:_extractCommitmentFro14=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro14.commitment,config=_extractCommitmentFro14.config;args=this._buildArgs([addresses.map((function(pubkey){return pubkey.toBase58()}))],commitment,undefined,_objectSpread2(_objectSpread2({},config),{},{epoch:epoch!=null?epoch:config===null||config===void 0?void 0:config.epoch}));_context46.next=4;return this._rpcRequest("getInflationReward",args);case 4:unsafeRes=_context46.sent;res=create(unsafeRes,GetInflationRewardResult);if(!("error"in res)){_context46.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get inflation reward");case 8:return _context46.abrupt("return",res.result);case 9:case"end":return _context46.stop()}}),_callee45,this)})));function getInflationReward(_x61,_x62,_x63){return _getInflationReward.apply(this,arguments)}return getInflationReward}()},{key:"getInflationRate",value:function(){var _getInflationRate=_asyncToGenerator(_regeneratorRuntime().mark((function _callee46(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee46$(_context47){while(1)switch(_context47.prev=_context47.next){case 0:_context47.next=2;return this._rpcRequest("getInflationRate",[]);case 2:unsafeRes=_context47.sent;res=create(unsafeRes,GetInflationRateRpcResult);if(!("error"in res)){_context47.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get inflation rate");case 6:return _context47.abrupt("return",res.result);case 7:case"end":return _context47.stop()}}),_callee46,this)})));function getInflationRate(){return _getInflationRate.apply(this,arguments)}return getInflationRate}()},{key:"getEpochInfo",value:function(){var _getEpochInfo=_asyncToGenerator(_regeneratorRuntime().mark((function _callee47(commitmentOrConfig){var _extractCommitmentFro15,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee47$(_context48){while(1)switch(_context48.prev=_context48.next){case 0:_extractCommitmentFro15=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro15.commitment,config=_extractCommitmentFro15.config;args=this._buildArgs([],commitment,undefined,config);_context48.next=4;return this._rpcRequest("getEpochInfo",args);case 4:unsafeRes=_context48.sent;res=create(unsafeRes,GetEpochInfoRpcResult);if(!("error"in res)){_context48.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get epoch info");case 8:return _context48.abrupt("return",res.result);case 9:case"end":return _context48.stop()}}),_callee47,this)})));function getEpochInfo(_x64){return _getEpochInfo.apply(this,arguments)}return getEpochInfo}()},{key:"getEpochSchedule",value:function(){var _getEpochSchedule=_asyncToGenerator(_regeneratorRuntime().mark((function _callee48(){var unsafeRes,res,epochSchedule;return _regeneratorRuntime().wrap((function _callee48$(_context49){while(1)switch(_context49.prev=_context49.next){case 0:_context49.next=2;return this._rpcRequest("getEpochSchedule",[]);case 2:unsafeRes=_context49.sent;res=create(unsafeRes,GetEpochScheduleRpcResult);if(!("error"in res)){_context49.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get epoch schedule");case 6:epochSchedule=res.result;return _context49.abrupt("return",new EpochSchedule(epochSchedule.slotsPerEpoch,epochSchedule.leaderScheduleSlotOffset,epochSchedule.warmup,epochSchedule.firstNormalEpoch,epochSchedule.firstNormalSlot));case 8:case"end":return _context49.stop()}}),_callee48,this)})));function getEpochSchedule(){return _getEpochSchedule.apply(this,arguments)}return getEpochSchedule}()},{key:"getLeaderSchedule",value:function(){var _getLeaderSchedule=_asyncToGenerator(_regeneratorRuntime().mark((function _callee49(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee49$(_context50){while(1)switch(_context50.prev=_context50.next){case 0:_context50.next=2;return this._rpcRequest("getLeaderSchedule",[]);case 2:unsafeRes=_context50.sent;res=create(unsafeRes,GetLeaderScheduleRpcResult);if(!("error"in res)){_context50.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get leader schedule");case 6:return _context50.abrupt("return",res.result);case 7:case"end":return _context50.stop()}}),_callee49,this)})));function getLeaderSchedule(){return _getLeaderSchedule.apply(this,arguments)}return getLeaderSchedule}()},{key:"getMinimumBalanceForRentExemption",value:function(){var _getMinimumBalanceForRentExemption=_asyncToGenerator(_regeneratorRuntime().mark((function _callee50(dataLength,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee50$(_context51){while(1)switch(_context51.prev=_context51.next){case 0:args=this._buildArgs([dataLength],commitment);_context51.next=3;return this._rpcRequest("getMinimumBalanceForRentExemption",args);case 3:unsafeRes=_context51.sent;res=create(unsafeRes,GetMinimumBalanceForRentExemptionRpcResult);if(!("error"in res)){_context51.next=8;break}console.warn("Unable to fetch minimum balance for rent exemption");return _context51.abrupt("return",0);case 8:return _context51.abrupt("return",res.result);case 9:case"end":return _context51.stop()}}),_callee50,this)})));function getMinimumBalanceForRentExemption(_x65,_x66){return _getMinimumBalanceForRentExemption.apply(this,arguments)}return getMinimumBalanceForRentExemption}()},{key:"getRecentBlockhashAndContext",value:function(){var _getRecentBlockhashAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee51(commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee51$(_context52){while(1)switch(_context52.prev=_context52.next){case 0:args=this._buildArgs([],commitment);_context52.next=3;return this._rpcRequest("getRecentBlockhash",args);case 3:unsafeRes=_context52.sent;res=create(unsafeRes,GetRecentBlockhashAndContextRpcResult);if(!("error"in res)){_context52.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get recent blockhash");case 7:return _context52.abrupt("return",res.result);case 8:case"end":return _context52.stop()}}),_callee51,this)})));function getRecentBlockhashAndContext(_x67){return _getRecentBlockhashAndContext.apply(this,arguments)}return getRecentBlockhashAndContext}()},{key:"getRecentPerformanceSamples",value:function(){var _getRecentPerformanceSamples=_asyncToGenerator(_regeneratorRuntime().mark((function _callee52(limit){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee52$(_context53){while(1)switch(_context53.prev=_context53.next){case 0:_context53.next=2;return this._rpcRequest("getRecentPerformanceSamples",limit?[limit]:[]);case 2:unsafeRes=_context53.sent;res=create(unsafeRes,GetRecentPerformanceSamplesRpcResult);if(!("error"in res)){_context53.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get recent performance samples");case 6:return _context53.abrupt("return",res.result);case 7:case"end":return _context53.stop()}}),_callee52,this)})));function getRecentPerformanceSamples(_x68){return _getRecentPerformanceSamples.apply(this,arguments)}return getRecentPerformanceSamples}()},{key:"getFeeCalculatorForBlockhash",value:function(){var _getFeeCalculatorForBlockhash=_asyncToGenerator(_regeneratorRuntime().mark((function _callee53(blockhash,commitment){var args,unsafeRes,res,_res$result,context,value;return _regeneratorRuntime().wrap((function _callee53$(_context54){while(1)switch(_context54.prev=_context54.next){case 0:args=this._buildArgs([blockhash],commitment);_context54.next=3;return this._rpcRequest("getFeeCalculatorForBlockhash",args);case 3:unsafeRes=_context54.sent;res=create(unsafeRes,GetFeeCalculatorRpcResult);if(!("error"in res)){_context54.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get fee calculator");case 7:_res$result=res.result,context=_res$result.context,value=_res$result.value;return _context54.abrupt("return",{context:context,value:value!==null?value.feeCalculator:null});case 9:case"end":return _context54.stop()}}),_callee53,this)})));function getFeeCalculatorForBlockhash(_x69,_x70){return _getFeeCalculatorForBlockhash.apply(this,arguments)}return getFeeCalculatorForBlockhash}()},{key:"getFeeForMessage",value:function(){var _getFeeForMessage=_asyncToGenerator(_regeneratorRuntime().mark((function _callee54(message,commitment){var wireMessage,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee54$(_context55){while(1)switch(_context55.prev=_context55.next){case 0:wireMessage=toBuffer(message.serialize()).toString("base64");args=this._buildArgs([wireMessage],commitment);_context55.next=4;return this._rpcRequest("getFeeForMessage",args);case 4:unsafeRes=_context55.sent;res=create(unsafeRes,jsonRpcResultAndContext(nullable(number())));if(!("error"in res)){_context55.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get fee for message");case 8:if(!(res.result===null)){_context55.next=10;break}throw new Error("invalid blockhash");case 10:return _context55.abrupt("return",res.result);case 11:case"end":return _context55.stop()}}),_callee54,this)})));function getFeeForMessage(_x71,_x72){return _getFeeForMessage.apply(this,arguments)}return getFeeForMessage}()},{key:"getRecentPrioritizationFees",value:function(){var _getRecentPrioritizationFees=_asyncToGenerator(_regeneratorRuntime().mark((function _callee55(config){var _config$lockedWritabl;var accounts,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee55$(_context56){while(1)switch(_context56.prev=_context56.next){case 0:accounts=config===null||config===void 0?void 0:(_config$lockedWritabl=config.lockedWritableAccounts)===null||_config$lockedWritabl===void 0?void 0:_config$lockedWritabl.map((function(key){return key.toBase58()}));args=accounts!==null&&accounts!==void 0&&accounts.length?[accounts]:[];_context56.next=4;return this._rpcRequest("getRecentPrioritizationFees",args);case 4:unsafeRes=_context56.sent;res=create(unsafeRes,GetRecentPrioritizationFeesRpcResult);if(!("error"in res)){_context56.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get recent prioritization fees");case 8:return _context56.abrupt("return",res.result);case 9:case"end":return _context56.stop()}}),_callee55,this)})));function getRecentPrioritizationFees(_x73){return _getRecentPrioritizationFees.apply(this,arguments)}return getRecentPrioritizationFees}()},{key:"getRecentBlockhash",value:function(){var _getRecentBlockhash=_asyncToGenerator(_regeneratorRuntime().mark((function _callee56(commitment){var res;return _regeneratorRuntime().wrap((function _callee56$(_context57){while(1)switch(_context57.prev=_context57.next){case 0:_context57.prev=0;_context57.next=3;return this.getRecentBlockhashAndContext(commitment);case 3:res=_context57.sent;return _context57.abrupt("return",res.value);case 7:_context57.prev=7;_context57.t0=_context57["catch"](0);throw new Error("failed to get recent blockhash: "+_context57.t0);case 10:case"end":return _context57.stop()}}),_callee56,this,[[0,7]])})));function getRecentBlockhash(_x74){return _getRecentBlockhash.apply(this,arguments)}return getRecentBlockhash}()},{key:"getLatestBlockhash",value:function(){var _getLatestBlockhash=_asyncToGenerator(_regeneratorRuntime().mark((function _callee57(commitmentOrConfig){var res;return _regeneratorRuntime().wrap((function _callee57$(_context58){while(1)switch(_context58.prev=_context58.next){case 0:_context58.prev=0;_context58.next=3;return this.getLatestBlockhashAndContext(commitmentOrConfig);case 3:res=_context58.sent;return _context58.abrupt("return",res.value);case 7:_context58.prev=7;_context58.t0=_context58["catch"](0);throw new Error("failed to get recent blockhash: "+_context58.t0);case 10:case"end":return _context58.stop()}}),_callee57,this,[[0,7]])})));function getLatestBlockhash(_x75){return _getLatestBlockhash.apply(this,arguments)}return getLatestBlockhash}()},{key:"getLatestBlockhashAndContext",value:function(){var _getLatestBlockhashAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee58(commitmentOrConfig){var _extractCommitmentFro16,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee58$(_context59){while(1)switch(_context59.prev=_context59.next){case 0:_extractCommitmentFro16=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro16.commitment,config=_extractCommitmentFro16.config;args=this._buildArgs([],commitment,undefined,config);_context59.next=4;return this._rpcRequest("getLatestBlockhash",args);case 4:unsafeRes=_context59.sent;res=create(unsafeRes,GetLatestBlockhashRpcResult);if(!("error"in res)){_context59.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get latest blockhash");case 8:return _context59.abrupt("return",res.result);case 9:case"end":return _context59.stop()}}),_callee58,this)})));function getLatestBlockhashAndContext(_x76){return _getLatestBlockhashAndContext.apply(this,arguments)}return getLatestBlockhashAndContext}()},{key:"isBlockhashValid",value:function(){var _isBlockhashValid=_asyncToGenerator(_regeneratorRuntime().mark((function _callee59(blockhash,rawConfig){var _extractCommitmentFro17,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee59$(_context60){while(1)switch(_context60.prev=_context60.next){case 0:_extractCommitmentFro17=extractCommitmentFromConfig(rawConfig),commitment=_extractCommitmentFro17.commitment,config=_extractCommitmentFro17.config;args=this._buildArgs([blockhash],commitment,undefined,config);_context60.next=4;return this._rpcRequest("isBlockhashValid",args);case 4:unsafeRes=_context60.sent;res=create(unsafeRes,IsBlockhashValidRpcResult);if(!("error"in res)){_context60.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to determine if the blockhash `"+blockhash+"`is valid");case 8:return _context60.abrupt("return",res.result);case 9:case"end":return _context60.stop()}}),_callee59,this)})));function isBlockhashValid(_x77,_x78){return _isBlockhashValid.apply(this,arguments)}return isBlockhashValid}()},{key:"getVersion",value:function(){var _getVersion=_asyncToGenerator(_regeneratorRuntime().mark((function _callee60(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee60$(_context61){while(1)switch(_context61.prev=_context61.next){case 0:_context61.next=2;return this._rpcRequest("getVersion",[]);case 2:unsafeRes=_context61.sent;res=create(unsafeRes,jsonRpcResult(VersionResult));if(!("error"in res)){_context61.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get version");case 6:return _context61.abrupt("return",res.result);case 7:case"end":return _context61.stop()}}),_callee60,this)})));function getVersion(){return _getVersion.apply(this,arguments)}return getVersion}()},{key:"getGenesisHash",value:function(){var _getGenesisHash=_asyncToGenerator(_regeneratorRuntime().mark((function _callee61(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee61$(_context62){while(1)switch(_context62.prev=_context62.next){case 0:_context62.next=2;return this._rpcRequest("getGenesisHash",[]);case 2:unsafeRes=_context62.sent;res=create(unsafeRes,jsonRpcResult(string()));if(!("error"in res)){_context62.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get genesis hash");case 6:return _context62.abrupt("return",res.result);case 7:case"end":return _context62.stop()}}),_callee61,this)})));function getGenesisHash(){return _getGenesisHash.apply(this,arguments)}return getGenesisHash}()},{key:"getBlock",value:function(){var _getBlock=_asyncToGenerator(_regeneratorRuntime().mark((function _callee62(slot,rawConfig){var _extractCommitmentFro18,commitment,config,args,unsafeRes,res,_res,_res2,result;return _regeneratorRuntime().wrap((function _callee62$(_context63){while(1)switch(_context63.prev=_context63.next){case 0:_extractCommitmentFro18=extractCommitmentFromConfig(rawConfig),commitment=_extractCommitmentFro18.commitment,config=_extractCommitmentFro18.config;args=this._buildArgsAtLeastConfirmed([slot],commitment,undefined,config);_context63.next=4;return this._rpcRequest("getBlock",args);case 4:unsafeRes=_context63.sent;_context63.prev=5;_context63.t0=config===null||config===void 0?void 0:config.transactionDetails;_context63.next=_context63.t0==="accounts"?9:_context63.t0==="none"?13:17;break;case 9:res=create(unsafeRes,GetAccountsModeBlockRpcResult);if(!("error"in res)){_context63.next=12;break}throw res.error;case 12:return _context63.abrupt("return",res.result);case 13:_res=create(unsafeRes,GetNoneModeBlockRpcResult);if(!("error"in _res)){_context63.next=16;break}throw _res.error;case 16:return _context63.abrupt("return",_res.result);case 17:_res2=create(unsafeRes,GetBlockRpcResult);if(!("error"in _res2)){_context63.next=20;break}throw _res2.error;case 20:result=_res2.result;return _context63.abrupt("return",result?_objectSpread2(_objectSpread2({},result),{},{transactions:result.transactions.map((function(_ref15){var transaction=_ref15.transaction,meta=_ref15.meta,version=_ref15.version;return{meta:meta,transaction:_objectSpread2(_objectSpread2({},transaction),{},{message:versionedMessageFromResponse(version,transaction.message)}),version:version}}))}):null);case 22:_context63.next=27;break;case 24:_context63.prev=24;_context63.t1=_context63["catch"](5);throw new SolanaJSONRPCError(_context63.t1,"failed to get confirmed block");case 27:case"end":return _context63.stop()}}),_callee62,this,[[5,24]])})));function getBlock(_x79,_x80){return _getBlock.apply(this,arguments)}return getBlock}()},{key:"getParsedBlock",value:function(){var _getParsedBlock=_asyncToGenerator(_regeneratorRuntime().mark((function _callee63(slot,rawConfig){var _extractCommitmentFro19,commitment,config,args,unsafeRes,res,_res3,_res4;return _regeneratorRuntime().wrap((function _callee63$(_context64){while(1)switch(_context64.prev=_context64.next){case 0:_extractCommitmentFro19=extractCommitmentFromConfig(rawConfig),commitment=_extractCommitmentFro19.commitment,config=_extractCommitmentFro19.config;args=this._buildArgsAtLeastConfirmed([slot],commitment,"jsonParsed",config);_context64.next=4;return this._rpcRequest("getBlock",args);case 4:unsafeRes=_context64.sent;_context64.prev=5;_context64.t0=config===null||config===void 0?void 0:config.transactionDetails;_context64.next=_context64.t0==="accounts"?9:_context64.t0==="none"?13:17;break;case 9:res=create(unsafeRes,GetParsedAccountsModeBlockRpcResult);if(!("error"in res)){_context64.next=12;break}throw res.error;case 12:return _context64.abrupt("return",res.result);case 13:_res3=create(unsafeRes,GetParsedNoneModeBlockRpcResult);if(!("error"in _res3)){_context64.next=16;break}throw _res3.error;case 16:return _context64.abrupt("return",_res3.result);case 17:_res4=create(unsafeRes,GetParsedBlockRpcResult);if(!("error"in _res4)){_context64.next=20;break}throw _res4.error;case 20:return _context64.abrupt("return",_res4.result);case 21:_context64.next=26;break;case 23:_context64.prev=23;_context64.t1=_context64["catch"](5);throw new SolanaJSONRPCError(_context64.t1,"failed to get block");case 26:case"end":return _context64.stop()}}),_callee63,this,[[5,23]])})));function getParsedBlock(_x81,_x82){return _getParsedBlock.apply(this,arguments)}return getParsedBlock}()},{key:"getBlockProduction",value:function(){var _getBlockProduction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee64(configOrCommitment){var extra,commitment,c,rest,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee64$(_context65){while(1)switch(_context65.prev=_context65.next){case 0:if(typeof configOrCommitment==="string"){commitment=configOrCommitment}else if(configOrCommitment){c=configOrCommitment.commitment,rest=_objectWithoutProperties(configOrCommitment,_excluded3);commitment=c;extra=rest}args=this._buildArgs([],commitment,"base64",extra);_context65.next=4;return this._rpcRequest("getBlockProduction",args);case 4:unsafeRes=_context65.sent;res=create(unsafeRes,BlockProductionResponseStruct);if(!("error"in res)){_context65.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get block production information");case 8:return _context65.abrupt("return",res.result);case 9:case"end":return _context65.stop()}}),_callee64,this)})));function getBlockProduction(_x83){return _getBlockProduction.apply(this,arguments)}return getBlockProduction}()},{key:"getTransaction",value:function(){var _getTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee65(signature,rawConfig){var _extractCommitmentFro20,commitment,config,args,unsafeRes,res,result;return _regeneratorRuntime().wrap((function _callee65$(_context66){while(1)switch(_context66.prev=_context66.next){case 0:_extractCommitmentFro20=extractCommitmentFromConfig(rawConfig),commitment=_extractCommitmentFro20.commitment,config=_extractCommitmentFro20.config;args=this._buildArgsAtLeastConfirmed([signature],commitment,undefined,config);_context66.next=4;return this._rpcRequest("getTransaction",args);case 4:unsafeRes=_context66.sent;res=create(unsafeRes,GetTransactionRpcResult);if(!("error"in res)){_context66.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get transaction");case 8:result=res.result;if(result){_context66.next=11;break}return _context66.abrupt("return",result);case 11:return _context66.abrupt("return",_objectSpread2(_objectSpread2({},result),{},{transaction:_objectSpread2(_objectSpread2({},result.transaction),{},{message:versionedMessageFromResponse(result.version,result.transaction.message)})}));case 12:case"end":return _context66.stop()}}),_callee65,this)})));function getTransaction(_x84,_x85){return _getTransaction.apply(this,arguments)}return getTransaction}()},{key:"getParsedTransaction",value:function(){var _getParsedTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee66(signature,commitmentOrConfig){var _extractCommitmentFro21,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee66$(_context67){while(1)switch(_context67.prev=_context67.next){case 0:_extractCommitmentFro21=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro21.commitment,config=_extractCommitmentFro21.config;args=this._buildArgsAtLeastConfirmed([signature],commitment,"jsonParsed",config);_context67.next=4;return this._rpcRequest("getTransaction",args);case 4:unsafeRes=_context67.sent;res=create(unsafeRes,GetParsedTransactionRpcResult);if(!("error"in res)){_context67.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get transaction");case 8:return _context67.abrupt("return",res.result);case 9:case"end":return _context67.stop()}}),_callee66,this)})));function getParsedTransaction(_x86,_x87){return _getParsedTransaction.apply(this,arguments)}return getParsedTransaction}()},{key:"getParsedTransactions",value:function(){var _getParsedTransactions=_asyncToGenerator(_regeneratorRuntime().mark((function _callee67(signatures,commitmentOrConfig){var _this6=this;var _extractCommitmentFro22,commitment,config,batch,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee67$(_context68){while(1)switch(_context68.prev=_context68.next){case 0:_extractCommitmentFro22=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro22.commitment,config=_extractCommitmentFro22.config;batch=signatures.map((function(signature){var args=_this6._buildArgsAtLeastConfirmed([signature],commitment,"jsonParsed",config);return{methodName:"getTransaction",args:args}}));_context68.next=4;return this._rpcBatchRequest(batch);case 4:unsafeRes=_context68.sent;res=unsafeRes.map((function(unsafeRes){var res=create(unsafeRes,GetParsedTransactionRpcResult);if("error"in res){throw new SolanaJSONRPCError(res.error,"failed to get transactions")}return res.result}));return _context68.abrupt("return",res);case 7:case"end":return _context68.stop()}}),_callee67,this)})));function getParsedTransactions(_x88,_x89){return _getParsedTransactions.apply(this,arguments)}return getParsedTransactions}()},{key:"getTransactions",value:function(){var _getTransactions=_asyncToGenerator(_regeneratorRuntime().mark((function _callee68(signatures,commitmentOrConfig){var _this7=this;var _extractCommitmentFro23,commitment,config,batch,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee68$(_context69){while(1)switch(_context69.prev=_context69.next){case 0:_extractCommitmentFro23=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro23.commitment,config=_extractCommitmentFro23.config;batch=signatures.map((function(signature){var args=_this7._buildArgsAtLeastConfirmed([signature],commitment,undefined,config);return{methodName:"getTransaction",args:args}}));_context69.next=4;return this._rpcBatchRequest(batch);case 4:unsafeRes=_context69.sent;res=unsafeRes.map((function(unsafeRes){var res=create(unsafeRes,GetTransactionRpcResult);if("error"in res){throw new SolanaJSONRPCError(res.error,"failed to get transactions")}var result=res.result;if(!result)return result;return _objectSpread2(_objectSpread2({},result),{},{transaction:_objectSpread2(_objectSpread2({},result.transaction),{},{message:versionedMessageFromResponse(result.version,result.transaction.message)})})}));return _context69.abrupt("return",res);case 7:case"end":return _context69.stop()}}),_callee68,this)})));function getTransactions(_x90,_x91){return _getTransactions.apply(this,arguments)}return getTransactions}()},{key:"getConfirmedBlock",value:function(){var _getConfirmedBlock=_asyncToGenerator(_regeneratorRuntime().mark((function _callee69(slot,commitment){var args,unsafeRes,res,result,block;return _regeneratorRuntime().wrap((function _callee69$(_context70){while(1)switch(_context70.prev=_context70.next){case 0:args=this._buildArgsAtLeastConfirmed([slot],commitment);_context70.next=3;return this._rpcRequest("getConfirmedBlock",args);case 3:unsafeRes=_context70.sent;res=create(unsafeRes,GetConfirmedBlockRpcResult);if(!("error"in res)){_context70.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get confirmed block");case 7:result=res.result;if(result){_context70.next=10;break}throw new Error("Confirmed block "+slot+" not found");case 10:block=_objectSpread2(_objectSpread2({},result),{},{transactions:result.transactions.map((function(_ref16){var transaction=_ref16.transaction,meta=_ref16.meta;var message=new Message(transaction.message);return{meta:meta,transaction:_objectSpread2(_objectSpread2({},transaction),{},{message:message})}}))});return _context70.abrupt("return",_objectSpread2(_objectSpread2({},block),{},{transactions:block.transactions.map((function(_ref17){var transaction=_ref17.transaction,meta=_ref17.meta;return{meta:meta,transaction:Transaction.populate(transaction.message,transaction.signatures)}}))}));case 12:case"end":return _context70.stop()}}),_callee69,this)})));function getConfirmedBlock(_x92,_x93){return _getConfirmedBlock.apply(this,arguments)}return getConfirmedBlock}()},{key:"getBlocks",value:function(){var _getBlocks=_asyncToGenerator(_regeneratorRuntime().mark((function _callee70(startSlot,endSlot,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee70$(_context71){while(1)switch(_context71.prev=_context71.next){case 0:args=this._buildArgsAtLeastConfirmed(endSlot!==undefined?[startSlot,endSlot]:[startSlot],commitment);_context71.next=3;return this._rpcRequest("getBlocks",args);case 3:unsafeRes=_context71.sent;res=create(unsafeRes,jsonRpcResult(array(number())));if(!("error"in res)){_context71.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get blocks");case 7:return _context71.abrupt("return",res.result);case 8:case"end":return _context71.stop()}}),_callee70,this)})));function getBlocks(_x94,_x95,_x96){return _getBlocks.apply(this,arguments)}return getBlocks}()},{key:"getBlockSignatures",value:function(){var _getBlockSignatures=_asyncToGenerator(_regeneratorRuntime().mark((function _callee71(slot,commitment){var args,unsafeRes,res,result;return _regeneratorRuntime().wrap((function _callee71$(_context72){while(1)switch(_context72.prev=_context72.next){case 0:args=this._buildArgsAtLeastConfirmed([slot],commitment,undefined,{transactionDetails:"signatures",rewards:false});_context72.next=3;return this._rpcRequest("getBlock",args);case 3:unsafeRes=_context72.sent;res=create(unsafeRes,GetBlockSignaturesRpcResult);if(!("error"in res)){_context72.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get block");case 7:result=res.result;if(result){_context72.next=10;break}throw new Error("Block "+slot+" not found");case 10:return _context72.abrupt("return",result);case 11:case"end":return _context72.stop()}}),_callee71,this)})));function getBlockSignatures(_x97,_x98){return _getBlockSignatures.apply(this,arguments)}return getBlockSignatures}()},{key:"getConfirmedBlockSignatures",value:function(){var _getConfirmedBlockSignatures=_asyncToGenerator(_regeneratorRuntime().mark((function _callee72(slot,commitment){var args,unsafeRes,res,result;return _regeneratorRuntime().wrap((function _callee72$(_context73){while(1)switch(_context73.prev=_context73.next){case 0:args=this._buildArgsAtLeastConfirmed([slot],commitment,undefined,{transactionDetails:"signatures",rewards:false});_context73.next=3;return this._rpcRequest("getConfirmedBlock",args);case 3:unsafeRes=_context73.sent;res=create(unsafeRes,GetBlockSignaturesRpcResult);if(!("error"in res)){_context73.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get confirmed block");case 7:result=res.result;if(result){_context73.next=10;break}throw new Error("Confirmed block "+slot+" not found");case 10:return _context73.abrupt("return",result);case 11:case"end":return _context73.stop()}}),_callee72,this)})));function getConfirmedBlockSignatures(_x99,_x100){return _getConfirmedBlockSignatures.apply(this,arguments)}return getConfirmedBlockSignatures}()},{key:"getConfirmedTransaction",value:function(){var _getConfirmedTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee73(signature,commitment){var args,unsafeRes,res,result,message,signatures;return _regeneratorRuntime().wrap((function _callee73$(_context74){while(1)switch(_context74.prev=_context74.next){case 0:args=this._buildArgsAtLeastConfirmed([signature],commitment);_context74.next=3;return this._rpcRequest("getConfirmedTransaction",args);case 3:unsafeRes=_context74.sent;res=create(unsafeRes,GetTransactionRpcResult);if(!("error"in res)){_context74.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get transaction");case 7:result=res.result;if(result){_context74.next=10;break}return _context74.abrupt("return",result);case 10:message=new Message(result.transaction.message);signatures=result.transaction.signatures;return _context74.abrupt("return",_objectSpread2(_objectSpread2({},result),{},{transaction:Transaction.populate(message,signatures)}));case 13:case"end":return _context74.stop()}}),_callee73,this)})));function getConfirmedTransaction(_x101,_x102){return _getConfirmedTransaction.apply(this,arguments)}return getConfirmedTransaction}()},{key:"getParsedConfirmedTransaction",value:function(){var _getParsedConfirmedTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee74(signature,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee74$(_context75){while(1)switch(_context75.prev=_context75.next){case 0:args=this._buildArgsAtLeastConfirmed([signature],commitment,"jsonParsed");_context75.next=3;return this._rpcRequest("getConfirmedTransaction",args);case 3:unsafeRes=_context75.sent;res=create(unsafeRes,GetParsedTransactionRpcResult);if(!("error"in res)){_context75.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get confirmed transaction");case 7:return _context75.abrupt("return",res.result);case 8:case"end":return _context75.stop()}}),_callee74,this)})));function getParsedConfirmedTransaction(_x103,_x104){return _getParsedConfirmedTransaction.apply(this,arguments)}return getParsedConfirmedTransaction}()},{key:"getParsedConfirmedTransactions",value:function(){var _getParsedConfirmedTransactions=_asyncToGenerator(_regeneratorRuntime().mark((function _callee75(signatures,commitment){var _this8=this;var batch,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee75$(_context76){while(1)switch(_context76.prev=_context76.next){case 0:batch=signatures.map((function(signature){var args=_this8._buildArgsAtLeastConfirmed([signature],commitment,"jsonParsed");return{methodName:"getConfirmedTransaction",args:args}}));_context76.next=3;return this._rpcBatchRequest(batch);case 3:unsafeRes=_context76.sent;res=unsafeRes.map((function(unsafeRes){var res=create(unsafeRes,GetParsedTransactionRpcResult);if("error"in res){throw new SolanaJSONRPCError(res.error,"failed to get confirmed transactions")}return res.result}));return _context76.abrupt("return",res);case 6:case"end":return _context76.stop()}}),_callee75,this)})));function getParsedConfirmedTransactions(_x105,_x106){return _getParsedConfirmedTransactions.apply(this,arguments)}return getParsedConfirmedTransactions}()},{key:"getConfirmedSignaturesForAddress",value:function(){var _getConfirmedSignaturesForAddress=_asyncToGenerator(_regeneratorRuntime().mark((function _callee76(address,startSlot,endSlot){var options,firstAvailableBlock,block,highestConfirmedRoot,_block,confirmedSignatureInfo;return _regeneratorRuntime().wrap((function _callee76$(_context77){while(1)switch(_context77.prev=_context77.next){case 0:options={};_context77.next=3;return this.getFirstAvailableBlock();case 3:firstAvailableBlock=_context77.sent;case 4:if("until"in options){_context77.next=24;break}startSlot--;if(!(startSlot<=0||startSlot0){options.until=block.signatures[block.signatures.length-1].toString()}_context77.next=22;break;case 15:_context77.prev=15;_context77.t0=_context77["catch"](8);if(!(_context77.t0 instanceof Error&&_context77.t0.message.includes("skipped"))){_context77.next=21;break}return _context77.abrupt("continue",4);case 21:throw _context77.t0;case 22:_context77.next=4;break;case 24:_context77.next=26;return this.getSlot("finalized");case 26:highestConfirmedRoot=_context77.sent;case 27:if("before"in options){_context77.next=47;break}endSlot++;if(!(endSlot>highestConfirmedRoot)){_context77.next=31;break}return _context77.abrupt("break",47);case 31:_context77.prev=31;_context77.next=34;return this.getConfirmedBlockSignatures(endSlot);case 34:_block=_context77.sent;if(_block.signatures.length>0){options.before=_block.signatures[_block.signatures.length-1].toString()}_context77.next=45;break;case 38:_context77.prev=38;_context77.t1=_context77["catch"](31);if(!(_context77.t1 instanceof Error&&_context77.t1.message.includes("skipped"))){_context77.next=44;break}return _context77.abrupt("continue",27);case 44:throw _context77.t1;case 45:_context77.next=27;break;case 47:_context77.next=49;return this.getConfirmedSignaturesForAddress2(address,options);case 49:confirmedSignatureInfo=_context77.sent;return _context77.abrupt("return",confirmedSignatureInfo.map((function(info){return info.signature})));case 51:case"end":return _context77.stop()}}),_callee76,this,[[8,15],[31,38]])})));function getConfirmedSignaturesForAddress(_x107,_x108,_x109){return _getConfirmedSignaturesForAddress.apply(this,arguments)}return getConfirmedSignaturesForAddress}()},{key:"getConfirmedSignaturesForAddress2",value:function(){var _getConfirmedSignaturesForAddress2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee77(address,options,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee77$(_context78){while(1)switch(_context78.prev=_context78.next){case 0:args=this._buildArgsAtLeastConfirmed([address.toBase58()],commitment,undefined,options);_context78.next=3;return this._rpcRequest("getConfirmedSignaturesForAddress2",args);case 3:unsafeRes=_context78.sent;res=create(unsafeRes,GetConfirmedSignaturesForAddress2RpcResult);if(!("error"in res)){_context78.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get confirmed signatures for address");case 7:return _context78.abrupt("return",res.result);case 8:case"end":return _context78.stop()}}),_callee77,this)})));function getConfirmedSignaturesForAddress2(_x110,_x111,_x112){return _getConfirmedSignaturesForAddress2.apply(this,arguments)}return getConfirmedSignaturesForAddress2}()},{key:"getSignaturesForAddress",value:function(){var _getSignaturesForAddress=_asyncToGenerator(_regeneratorRuntime().mark((function _callee78(address,options,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee78$(_context79){while(1)switch(_context79.prev=_context79.next){case 0:args=this._buildArgsAtLeastConfirmed([address.toBase58()],commitment,undefined,options);_context79.next=3;return this._rpcRequest("getSignaturesForAddress",args);case 3:unsafeRes=_context79.sent;res=create(unsafeRes,GetSignaturesForAddressRpcResult);if(!("error"in res)){_context79.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get signatures for address");case 7:return _context79.abrupt("return",res.result);case 8:case"end":return _context79.stop()}}),_callee78,this)})));function getSignaturesForAddress(_x113,_x114,_x115){return _getSignaturesForAddress.apply(this,arguments)}return getSignaturesForAddress}()},{key:"getAddressLookupTable",value:function(){var _getAddressLookupTable=_asyncToGenerator(_regeneratorRuntime().mark((function _callee79(accountKey,config){var _yield$this$getAccoun,context,accountInfo,value;return _regeneratorRuntime().wrap((function _callee79$(_context80){while(1)switch(_context80.prev=_context80.next){case 0:_context80.next=2;return this.getAccountInfoAndContext(accountKey,config);case 2:_yield$this$getAccoun=_context80.sent;context=_yield$this$getAccoun.context;accountInfo=_yield$this$getAccoun.value;value=null;if(accountInfo!==null){value=new AddressLookupTableAccount({key:accountKey,state:AddressLookupTableAccount.deserialize(accountInfo.data)})}return _context80.abrupt("return",{context:context,value:value});case 8:case"end":return _context80.stop()}}),_callee79,this)})));function getAddressLookupTable(_x116,_x117){return _getAddressLookupTable.apply(this,arguments)}return getAddressLookupTable}()},{key:"getNonceAndContext",value:function(){var _getNonceAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee80(nonceAccount,commitmentOrConfig){var _yield$this$getAccoun2,context,accountInfo,value;return _regeneratorRuntime().wrap((function _callee80$(_context81){while(1)switch(_context81.prev=_context81.next){case 0:_context81.next=2;return this.getAccountInfoAndContext(nonceAccount,commitmentOrConfig);case 2:_yield$this$getAccoun2=_context81.sent;context=_yield$this$getAccoun2.context;accountInfo=_yield$this$getAccoun2.value;value=null;if(accountInfo!==null){value=NonceAccount.fromAccountData(accountInfo.data)}return _context81.abrupt("return",{context:context,value:value});case 8:case"end":return _context81.stop()}}),_callee80,this)})));function getNonceAndContext(_x118,_x119){return _getNonceAndContext.apply(this,arguments)}return getNonceAndContext}()},{key:"getNonce",value:function(){var _getNonce=_asyncToGenerator(_regeneratorRuntime().mark((function _callee81(nonceAccount,commitmentOrConfig){return _regeneratorRuntime().wrap((function _callee81$(_context82){while(1)switch(_context82.prev=_context82.next){case 0:_context82.next=2;return this.getNonceAndContext(nonceAccount,commitmentOrConfig).then((function(x){return x.value}))["catch"]((function(e){throw new Error("failed to get nonce for account "+nonceAccount.toBase58()+": "+e)}));case 2:return _context82.abrupt("return",_context82.sent);case 3:case"end":return _context82.stop()}}),_callee81,this)})));function getNonce(_x120,_x121){return _getNonce.apply(this,arguments)}return getNonce}()},{key:"requestAirdrop",value:function(){var _requestAirdrop=_asyncToGenerator(_regeneratorRuntime().mark((function _callee82(to,lamports){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee82$(_context83){while(1)switch(_context83.prev=_context83.next){case 0:_context83.next=2;return this._rpcRequest("requestAirdrop",[to.toBase58(),lamports]);case 2:unsafeRes=_context83.sent;res=create(unsafeRes,RequestAirdropRpcResult);if(!("error"in res)){_context83.next=6;break}throw new SolanaJSONRPCError(res.error,"airdrop to ".concat(to.toBase58()," failed"));case 6:return _context83.abrupt("return",res.result);case 7:case"end":return _context83.stop()}}),_callee82,this)})));function requestAirdrop(_x122,_x123){return _requestAirdrop.apply(this,arguments)}return requestAirdrop}()},{key:"_blockhashWithExpiryBlockHeight",value:function(){var _blockhashWithExpiryBlockHeight2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee83(disableCache){var timeSinceFetch,expired;return _regeneratorRuntime().wrap((function _callee83$(_context84){while(1)switch(_context84.prev=_context84.next){case 0:if(disableCache){_context84.next=10;break}case 1:if(!this._pollingBlockhash){_context84.next=6;break}_context84.next=4;return sleep(100);case 4:_context84.next=1;break;case 6:timeSinceFetch=Date.now()-this._blockhashInfo.lastFetch;expired=timeSinceFetch>=BLOCKHASH_CACHE_TIMEOUT_MS;if(!(this._blockhashInfo.latestBlockhash!==null&&!expired)){_context84.next=10;break}return _context84.abrupt("return",this._blockhashInfo.latestBlockhash);case 10:_context84.next=12;return this._pollNewBlockhash();case 12:return _context84.abrupt("return",_context84.sent);case 13:case"end":return _context84.stop()}}),_callee83,this)})));function _blockhashWithExpiryBlockHeight(_x124){return _blockhashWithExpiryBlockHeight2.apply(this,arguments)}return _blockhashWithExpiryBlockHeight}()},{key:"_pollNewBlockhash",value:function(){var _pollNewBlockhash2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee84(){var startTime,cachedLatestBlockhash,cachedBlockhash,i,latestBlockhash;return _regeneratorRuntime().wrap((function _callee84$(_context85){while(1)switch(_context85.prev=_context85.next){case 0:this._pollingBlockhash=true;_context85.prev=1;startTime=Date.now();cachedLatestBlockhash=this._blockhashInfo.latestBlockhash;cachedBlockhash=cachedLatestBlockhash?cachedLatestBlockhash.blockhash:null;i=0;case 6:if(!(i<50)){_context85.next=18;break}_context85.next=9;return this.getLatestBlockhash("finalized");case 9:latestBlockhash=_context85.sent;if(!(cachedBlockhash!==latestBlockhash.blockhash)){_context85.next=13;break}this._blockhashInfo={latestBlockhash:latestBlockhash,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]};return _context85.abrupt("return",latestBlockhash);case 13:_context85.next=15;return sleep(MS_PER_SLOT/2);case 15:i++;_context85.next=6;break;case 18:throw new Error("Unable to obtain a new blockhash after ".concat(Date.now()-startTime,"ms"));case 19:_context85.prev=19;this._pollingBlockhash=false;return _context85.finish(19);case 22:case"end":return _context85.stop()}}),_callee84,this,[[1,,19,22]])})));function _pollNewBlockhash(){return _pollNewBlockhash2.apply(this,arguments)}return _pollNewBlockhash}()},{key:"getStakeMinimumDelegation",value:function(){var _getStakeMinimumDelegation=_asyncToGenerator(_regeneratorRuntime().mark((function _callee85(config){var _extractCommitmentFro24,commitment,configArg,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee85$(_context86){while(1)switch(_context86.prev=_context86.next){case 0:_extractCommitmentFro24=extractCommitmentFromConfig(config),commitment=_extractCommitmentFro24.commitment,configArg=_extractCommitmentFro24.config;args=this._buildArgs([],commitment,"base64",configArg);_context86.next=4;return this._rpcRequest("getStakeMinimumDelegation",args);case 4:unsafeRes=_context86.sent;res=create(unsafeRes,jsonRpcResultAndContext(number()));if(!("error"in res)){_context86.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get stake minimum delegation");case 8:return _context86.abrupt("return",res.result);case 9:case"end":return _context86.stop()}}),_callee85,this)})));function getStakeMinimumDelegation(_x125){return _getStakeMinimumDelegation.apply(this,arguments)}return getStakeMinimumDelegation}()},{key:"simulateTransaction",value:function(){var _simulateTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee86(transactionOrMessage,configOrSigners,includeAccounts){var versionedTx,_wireTransaction,_encodedTransaction,_config2,_args87,_unsafeRes,_res5,transaction,originalTx,signers,_transaction,disableCache,_transaction2,latestBlockhash,_signature,message,signData,wireTransaction,encodedTransaction,config,addresses,args,unsafeRes,res,_logs,traceIndent,logTrace;return _regeneratorRuntime().wrap((function _callee86$(_context87){while(1)switch(_context87.prev=_context87.next){case 0:if(!("message"in transactionOrMessage)){_context87.next=17;break}versionedTx=transactionOrMessage;_wireTransaction=versionedTx.serialize();_encodedTransaction=buffer.Buffer.from(_wireTransaction).toString("base64");if(!(Array.isArray(configOrSigners)||includeAccounts!==undefined)){_context87.next=6;break}throw new Error("Invalid arguments");case 6:_config2=configOrSigners||{};_config2.encoding="base64";if(!("commitment"in _config2)){_config2.commitment=this.commitment}_args87=[_encodedTransaction,_config2];_context87.next=12;return this._rpcRequest("simulateTransaction",_args87);case 12:_unsafeRes=_context87.sent;_res5=create(_unsafeRes,SimulatedTransactionResponseStruct);if(!("error"in _res5)){_context87.next=16;break}throw new Error("failed to simulate transaction: "+_res5.error.message);case 16:return _context87.abrupt("return",_res5.result);case 17:if(transactionOrMessage instanceof Transaction){originalTx=transactionOrMessage;transaction=new Transaction;transaction.feePayer=originalTx.feePayer;transaction.instructions=transactionOrMessage.instructions;transaction.nonceInfo=originalTx.nonceInfo;transaction.signatures=originalTx.signatures}else{transaction=Transaction.populate(transactionOrMessage);transaction._message=transaction._json=undefined}if(!(configOrSigners!==undefined&&!Array.isArray(configOrSigners))){_context87.next=20;break}throw new Error("Invalid arguments");case 20:signers=configOrSigners;if(!(transaction.nonceInfo&&signers)){_context87.next=25;break}(_transaction=transaction).sign.apply(_transaction,_toConsumableArray(signers));_context87.next=45;break;case 25:disableCache=this._disableBlockhashCaching;case 26:_context87.next=28;return this._blockhashWithExpiryBlockHeight(disableCache);case 28:latestBlockhash=_context87.sent;transaction.lastValidBlockHeight=latestBlockhash.lastValidBlockHeight;transaction.recentBlockhash=latestBlockhash.blockhash;if(signers){_context87.next=33;break}return _context87.abrupt("break",45);case 33:(_transaction2=transaction).sign.apply(_transaction2,_toConsumableArray(signers));if(transaction.signature){_context87.next=36;break}throw new Error("!signature");case 36:_signature=transaction.signature.toString("base64");if(!(!this._blockhashInfo.simulatedSignatures.includes(_signature)&&!this._blockhashInfo.transactionSignatures.includes(_signature))){_context87.next=42;break}this._blockhashInfo.simulatedSignatures.push(_signature);return _context87.abrupt("break",45);case 42:disableCache=true;case 43:_context87.next=26;break;case 45:message=transaction._compile();signData=message.serialize();wireTransaction=transaction._serialize(signData);encodedTransaction=wireTransaction.toString("base64");config={encoding:"base64",commitment:this.commitment};if(includeAccounts){addresses=(Array.isArray(includeAccounts)?includeAccounts:message.nonProgramIds()).map((function(key){return key.toBase58()}));config["accounts"]={encoding:"base64",addresses:addresses}}if(signers){config.sigVerify=true}args=[encodedTransaction,config];_context87.next=55;return this._rpcRequest("simulateTransaction",args);case 55:unsafeRes=_context87.sent;res=create(unsafeRes,SimulatedTransactionResponseStruct);if(!("error"in res)){_context87.next=60;break}if("data"in res.error){_logs=res.error.data.logs;if(_logs&&Array.isArray(_logs)){traceIndent="\n ";logTrace=traceIndent+_logs.join(traceIndent);console.error(res.error.message,logTrace)}}throw new SendTransactionError("failed to simulate transaction: "+res.error.message,_logs);case 60:return _context87.abrupt("return",res.result);case 61:case"end":return _context87.stop()}}),_callee86,this)})));function simulateTransaction(_x126,_x127,_x128){return _simulateTransaction.apply(this,arguments)}return simulateTransaction}()},{key:"sendTransaction",value:function(){var _sendTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee87(transaction,signersOrOptions,options){var _wireTransaction2,signers,disableCache,latestBlockhash,_signature2,wireTransaction;return _regeneratorRuntime().wrap((function _callee87$(_context88){while(1)switch(_context88.prev=_context88.next){case 0:if(!("version"in transaction)){_context88.next=7;break}if(!(signersOrOptions&&Array.isArray(signersOrOptions))){_context88.next=3;break}throw new Error("Invalid arguments");case 3:_wireTransaction2=transaction.serialize();_context88.next=6;return this.sendRawTransaction(_wireTransaction2,signersOrOptions);case 6:return _context88.abrupt("return",_context88.sent);case 7:if(!(signersOrOptions===undefined||!Array.isArray(signersOrOptions))){_context88.next=9;break}throw new Error("Invalid arguments");case 9:signers=signersOrOptions;if(!transaction.nonceInfo){_context88.next=14;break}transaction.sign.apply(transaction,_toConsumableArray(signers));_context88.next=32;break;case 14:disableCache=this._disableBlockhashCaching;case 15:_context88.next=17;return this._blockhashWithExpiryBlockHeight(disableCache);case 17:latestBlockhash=_context88.sent;transaction.lastValidBlockHeight=latestBlockhash.lastValidBlockHeight;transaction.recentBlockhash=latestBlockhash.blockhash;transaction.sign.apply(transaction,_toConsumableArray(signers));if(transaction.signature){_context88.next=23;break}throw new Error("!signature");case 23:_signature2=transaction.signature.toString("base64");if(this._blockhashInfo.transactionSignatures.includes(_signature2)){_context88.next=29;break}this._blockhashInfo.transactionSignatures.push(_signature2);return _context88.abrupt("break",32);case 29:disableCache=true;case 30:_context88.next=15;break;case 32:wireTransaction=transaction.serialize();_context88.next=35;return this.sendRawTransaction(wireTransaction,options);case 35:return _context88.abrupt("return",_context88.sent);case 36:case"end":return _context88.stop()}}),_callee87,this)})));function sendTransaction(_x129,_x130,_x131){return _sendTransaction.apply(this,arguments)}return sendTransaction}()},{key:"sendRawTransaction",value:function(){var _sendRawTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee88(rawTransaction,options){var encodedTransaction,result;return _regeneratorRuntime().wrap((function _callee88$(_context89){while(1)switch(_context89.prev=_context89.next){case 0:encodedTransaction=toBuffer(rawTransaction).toString("base64");_context89.next=3;return this.sendEncodedTransaction(encodedTransaction,options);case 3:result=_context89.sent;return _context89.abrupt("return",result);case 5:case"end":return _context89.stop()}}),_callee88,this)})));function sendRawTransaction(_x132,_x133){return _sendRawTransaction.apply(this,arguments)}return sendRawTransaction}()},{key:"sendEncodedTransaction",value:function(){var _sendEncodedTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee89(encodedTransaction,options){var config,skipPreflight,preflightCommitment,args,unsafeRes,res,_logs2;return _regeneratorRuntime().wrap((function _callee89$(_context90){while(1)switch(_context90.prev=_context90.next){case 0:config={encoding:"base64"};skipPreflight=options&&options.skipPreflight;preflightCommitment=options&&options.preflightCommitment||this.commitment;if(options&&options.maxRetries!=null){config.maxRetries=options.maxRetries}if(options&&options.minContextSlot!=null){config.minContextSlot=options.minContextSlot}if(skipPreflight){config.skipPreflight=skipPreflight}if(preflightCommitment){config.preflightCommitment=preflightCommitment}args=[encodedTransaction,config];_context90.next=10;return this._rpcRequest("sendTransaction",args);case 10:unsafeRes=_context90.sent;res=create(unsafeRes,SendTransactionRpcResult);if(!("error"in res)){_context90.next=15;break}if("data"in res.error){_logs2=res.error.data.logs}throw new SendTransactionError("failed to send transaction: "+res.error.message,_logs2);case 15:return _context90.abrupt("return",res.result);case 16:case"end":return _context90.stop()}}),_callee89,this)})));function sendEncodedTransaction(_x134,_x135){return _sendEncodedTransaction.apply(this,arguments)}return sendEncodedTransaction}()},{key:"_wsOnOpen",value:function _wsOnOpen(){var _this9=this;this._rpcWebSocketConnected=true;this._rpcWebSocketHeartbeat=setInterval((function(){_asyncToGenerator(_regeneratorRuntime().mark((function _callee90(){return _regeneratorRuntime().wrap((function _callee90$(_context91){while(1)switch(_context91.prev=_context91.next){case 0:_context91.prev=0;_context91.next=3;return _this9._rpcWebSocket.notify("ping");case 3:_context91.next=7;break;case 5:_context91.prev=5;_context91.t0=_context91["catch"](0);case 7:case"end":return _context91.stop()}}),_callee90,null,[[0,5]])})))()}),5e3);this._updateSubscriptions()}},{key:"_wsOnError",value:function _wsOnError(err){this._rpcWebSocketConnected=false;console.error("ws error:",err.message)}},{key:"_wsOnClose",value:function _wsOnClose(code){var _this10=this;this._rpcWebSocketConnected=false;this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER;if(this._rpcWebSocketIdleTimeout){clearTimeout(this._rpcWebSocketIdleTimeout);this._rpcWebSocketIdleTimeout=null}if(this._rpcWebSocketHeartbeat){clearInterval(this._rpcWebSocketHeartbeat);this._rpcWebSocketHeartbeat=null}if(code===1e3){this._updateSubscriptions();return}this._subscriptionCallbacksByServerSubscriptionId={};Object.entries(this._subscriptionsByHash).forEach((function(_ref19){var _ref20=_slicedToArray(_ref19,2),hash=_ref20[0],subscription=_ref20[1];_this10._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"pending"}))}))}},{key:"_setSubscription",value:function _setSubscription(hash,nextSubscription){var _this$_subscriptionsB;var prevState=(_this$_subscriptionsB=this._subscriptionsByHash[hash])===null||_this$_subscriptionsB===void 0?void 0:_this$_subscriptionsB.state;this._subscriptionsByHash[hash]=nextSubscription;if(prevState!==nextSubscription.state){var stateChangeCallbacks=this._subscriptionStateChangeCallbacksByHash[hash];if(stateChangeCallbacks){stateChangeCallbacks.forEach((function(cb){try{cb(nextSubscription.state)}catch(_unused2){}}))}}}},{key:"_onSubscriptionStateChange",value:function _onSubscriptionStateChange(clientSubscriptionId,callback){var _this$_subscriptionSt,_this11=this;var hash=this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];if(hash==null){return function(){}}var stateChangeCallbacks=(_this$_subscriptionSt=this._subscriptionStateChangeCallbacksByHash)[hash]||(_this$_subscriptionSt[hash]=new Set);stateChangeCallbacks.add(callback);return function(){stateChangeCallbacks["delete"](callback);if(stateChangeCallbacks.size===0){delete _this11._subscriptionStateChangeCallbacksByHash[hash]}}}},{key:"_updateSubscriptions",value:function(){var _updateSubscriptions2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee94(){var _this12=this;var activeWebSocketGeneration,isCurrentConnectionStillActive;return _regeneratorRuntime().wrap((function _callee94$(_context95){while(1)switch(_context95.prev=_context95.next){case 0:if(!(Object.keys(this._subscriptionsByHash).length===0)){_context95.next=3;break}if(this._rpcWebSocketConnected){this._rpcWebSocketConnected=false;this._rpcWebSocketIdleTimeout=setTimeout((function(){_this12._rpcWebSocketIdleTimeout=null;try{_this12._rpcWebSocket.close()}catch(err){if(err instanceof Error){console.log("Error when closing socket connection: ".concat(err.message))}}}),500)}return _context95.abrupt("return");case 3:if(this._rpcWebSocketIdleTimeout!==null){clearTimeout(this._rpcWebSocketIdleTimeout);this._rpcWebSocketIdleTimeout=null;this._rpcWebSocketConnected=true}if(this._rpcWebSocketConnected){_context95.next=7;break}this._rpcWebSocket.connect();return _context95.abrupt("return");case 7:activeWebSocketGeneration=this._rpcWebSocketGeneration;isCurrentConnectionStillActive=function isCurrentConnectionStillActive(){return activeWebSocketGeneration===_this12._rpcWebSocketGeneration};_context95.next=11;return Promise.all(Object.keys(this._subscriptionsByHash).map(function(){var _ref21=_asyncToGenerator(_regeneratorRuntime().mark((function _callee93(hash){var subscription;return _regeneratorRuntime().wrap((function _callee93$(_context94){while(1)switch(_context94.prev=_context94.next){case 0:subscription=_this12._subscriptionsByHash[hash];if(!(subscription===undefined)){_context94.next=3;break}return _context94.abrupt("return");case 3:_context94.t0=subscription.state;_context94.next=_context94.t0==="pending"?6:_context94.t0==="unsubscribed"?6:_context94.t0==="subscribed"?15:_context94.t0==="subscribing"?19:_context94.t0==="unsubscribing"?19:20;break;case 6:if(!(subscription.callbacks.size===0)){_context94.next=12;break}delete _this12._subscriptionsByHash[hash];if(subscription.state==="unsubscribed"){delete _this12._subscriptionCallbacksByServerSubscriptionId[subscription.serverSubscriptionId]}_context94.next=11;return _this12._updateSubscriptions();case 11:return _context94.abrupt("return");case 12:_context94.next=14;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee91(){var args,method,_serverSubscriptionId;return _regeneratorRuntime().wrap((function _callee91$(_context92){while(1)switch(_context92.prev=_context92.next){case 0:args=subscription.args,method=subscription.method;_context92.prev=1;_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"subscribing"}));_context92.next=5;return _this12._rpcWebSocket.call(method,args);case 5:_serverSubscriptionId=_context92.sent;_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{serverSubscriptionId:_serverSubscriptionId,state:"subscribed"}));_this12._subscriptionCallbacksByServerSubscriptionId[_serverSubscriptionId]=subscription.callbacks;_context92.next=10;return _this12._updateSubscriptions();case 10:_context92.next=20;break;case 12:_context92.prev=12;_context92.t0=_context92["catch"](1);if(_context92.t0 instanceof Error){console.error("".concat(method," error for argument"),args,_context92.t0.message)}if(isCurrentConnectionStillActive()){_context92.next=17;break}return _context92.abrupt("return");case 17:_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"pending"}));_context92.next=20;return _this12._updateSubscriptions();case 20:case"end":return _context92.stop()}}),_callee91,null,[[1,12]])})))();case 14:return _context94.abrupt("break",20);case 15:if(!(subscription.callbacks.size===0)){_context94.next=18;break}_context94.next=18;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee92(){var serverSubscriptionId,unsubscribeMethod;return _regeneratorRuntime().wrap((function _callee92$(_context93){while(1)switch(_context93.prev=_context93.next){case 0:serverSubscriptionId=subscription.serverSubscriptionId,unsubscribeMethod=subscription.unsubscribeMethod;if(!_this12._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)){_context93.next=5;break}_this12._subscriptionsAutoDisposedByRpc["delete"](serverSubscriptionId);_context93.next=21;break;case 5:_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"unsubscribing"}));_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"unsubscribing"}));_context93.prev=7;_context93.next=10;return _this12._rpcWebSocket.call(unsubscribeMethod,[serverSubscriptionId]);case 10:_context93.next=21;break;case 12:_context93.prev=12;_context93.t0=_context93["catch"](7);if(_context93.t0 instanceof Error){console.error("".concat(unsubscribeMethod," error:"),_context93.t0.message)}if(isCurrentConnectionStillActive()){_context93.next=17;break}return _context93.abrupt("return");case 17:_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"subscribed"}));_context93.next=20;return _this12._updateSubscriptions();case 20:return _context93.abrupt("return");case 21:_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"unsubscribed"}));_context93.next=24;return _this12._updateSubscriptions();case 24:case"end":return _context93.stop()}}),_callee92,null,[[7,12]])})))();case 18:return _context94.abrupt("break",20);case 19:return _context94.abrupt("break",20);case 20:case"end":return _context94.stop()}}),_callee93)})));return function(_x136){return _ref21.apply(this,arguments)}}()));case 11:case"end":return _context95.stop()}}),_callee94,this)})));function _updateSubscriptions(){return _updateSubscriptions2.apply(this,arguments)}return _updateSubscriptions}()},{key:"_handleServerNotification",value:function _handleServerNotification(serverSubscriptionId,callbackArgs){var callbacks=this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];if(callbacks===undefined){return}callbacks.forEach((function(cb){try{cb.apply(void 0,_toConsumableArray(callbackArgs))}catch(e){console.error(e)}}))}},{key:"_wsOnAccountNotification",value:function _wsOnAccountNotification(notification){var _create=create(notification,AccountNotificationResult),result=_create.result,subscription=_create.subscription;this._handleServerNotification(subscription,[result.value,result.context])}},{key:"_makeSubscription",value:function _makeSubscription(subscriptionConfig,args){var _this13=this;var clientSubscriptionId=this._nextClientSubscriptionId++;var hash=fastStableStringify$1([subscriptionConfig.method,args],true);var existingSubscription=this._subscriptionsByHash[hash];if(existingSubscription===undefined){this._subscriptionsByHash[hash]=_objectSpread2(_objectSpread2({},subscriptionConfig),{},{args:args,callbacks:new Set([subscriptionConfig.callback]),state:"pending"})}else{existingSubscription.callbacks.add(subscriptionConfig.callback)}this._subscriptionHashByClientSubscriptionId[clientSubscriptionId]=hash;this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId]=_asyncToGenerator(_regeneratorRuntime().mark((function _callee95(){var subscription;return _regeneratorRuntime().wrap((function _callee95$(_context96){while(1)switch(_context96.prev=_context96.next){case 0:delete _this13._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];delete _this13._subscriptionHashByClientSubscriptionId[clientSubscriptionId];subscription=_this13._subscriptionsByHash[hash];assert$1(subscription!==undefined,"Could not find a `Subscription` when tearing down client subscription #".concat(clientSubscriptionId));subscription.callbacks["delete"](subscriptionConfig.callback);_context96.next=7;return _this13._updateSubscriptions();case 7:case"end":return _context96.stop()}}),_callee95)})));this._updateSubscriptions();return clientSubscriptionId}},{key:"onAccountChange",value:function onAccountChange(publicKey,callback,commitment){var args=this._buildArgs([publicKey.toBase58()],commitment||this._commitment||"finalized","base64");return this._makeSubscription({callback:callback,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},args)}},{key:"removeAccountChangeListener",value:function(){var _removeAccountChangeListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee96(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee96$(_context97){while(1)switch(_context97.prev=_context97.next){case 0:_context97.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"account change");case 2:case"end":return _context97.stop()}}),_callee96,this)})));function removeAccountChangeListener(_x137){return _removeAccountChangeListener.apply(this,arguments)}return removeAccountChangeListener}()},{key:"_wsOnProgramAccountNotification",value:function _wsOnProgramAccountNotification(notification){var _create2=create(notification,ProgramAccountNotificationResult),result=_create2.result,subscription=_create2.subscription;this._handleServerNotification(subscription,[{accountId:result.value.pubkey,accountInfo:result.value.account},result.context])}},{key:"onProgramAccountChange",value:function onProgramAccountChange(programId,callback,commitment,filters){var args=this._buildArgs([programId.toBase58()],commitment||this._commitment||"finalized","base64",filters?{filters:filters}:undefined);return this._makeSubscription({callback:callback,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},args)}},{key:"removeProgramAccountChangeListener",value:function(){var _removeProgramAccountChangeListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee97(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee97$(_context98){while(1)switch(_context98.prev=_context98.next){case 0:_context98.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"program account change");case 2:case"end":return _context98.stop()}}),_callee97,this)})));function removeProgramAccountChangeListener(_x138){return _removeProgramAccountChangeListener.apply(this,arguments)}return removeProgramAccountChangeListener}()},{key:"onLogs",value:function onLogs(filter,callback,commitment){var args=this._buildArgs([_typeof$1(filter)==="object"?{mentions:[filter.toString()]}:filter],commitment||this._commitment||"finalized");return this._makeSubscription({callback:callback,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},args)}},{key:"removeOnLogsListener",value:function(){var _removeOnLogsListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee98(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee98$(_context99){while(1)switch(_context99.prev=_context99.next){case 0:_context99.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"logs");case 2:case"end":return _context99.stop()}}),_callee98,this)})));function removeOnLogsListener(_x139){return _removeOnLogsListener.apply(this,arguments)}return removeOnLogsListener}()},{key:"_wsOnLogsNotification",value:function _wsOnLogsNotification(notification){var _create3=create(notification,LogsNotificationResult),result=_create3.result,subscription=_create3.subscription;this._handleServerNotification(subscription,[result.value,result.context])}},{key:"_wsOnSlotNotification",value:function _wsOnSlotNotification(notification){var _create4=create(notification,SlotNotificationResult),result=_create4.result,subscription=_create4.subscription;this._handleServerNotification(subscription,[result])}},{key:"onSlotChange",value:function onSlotChange(callback){return this._makeSubscription({callback:callback,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}},{key:"removeSlotChangeListener",value:function(){var _removeSlotChangeListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee99(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee99$(_context100){while(1)switch(_context100.prev=_context100.next){case 0:_context100.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"slot change");case 2:case"end":return _context100.stop()}}),_callee99,this)})));function removeSlotChangeListener(_x140){return _removeSlotChangeListener.apply(this,arguments)}return removeSlotChangeListener}()},{key:"_wsOnSlotUpdatesNotification",value:function _wsOnSlotUpdatesNotification(notification){var _create5=create(notification,SlotUpdateNotificationResult),result=_create5.result,subscription=_create5.subscription;this._handleServerNotification(subscription,[result])}},{key:"onSlotUpdate",value:function onSlotUpdate(callback){return this._makeSubscription({callback:callback,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}},{key:"removeSlotUpdateListener",value:function(){var _removeSlotUpdateListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee100(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee100$(_context101){while(1)switch(_context101.prev=_context101.next){case 0:_context101.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"slot update");case 2:case"end":return _context101.stop()}}),_callee100,this)})));function removeSlotUpdateListener(_x141){return _removeSlotUpdateListener.apply(this,arguments)}return removeSlotUpdateListener}()},{key:"_unsubscribeClientSubscription",value:function(){var _unsubscribeClientSubscription2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee101(clientSubscriptionId,subscriptionName){var dispose;return _regeneratorRuntime().wrap((function _callee101$(_context102){while(1)switch(_context102.prev=_context102.next){case 0:dispose=this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];if(!dispose){_context102.next=6;break}_context102.next=4;return dispose();case 4:_context102.next=7;break;case 6:console.warn("Ignored unsubscribe request because an active subscription with id "+"`".concat(clientSubscriptionId,"` for '").concat(subscriptionName,"' events ")+"could not be found.");case 7:case"end":return _context102.stop()}}),_callee101,this)})));function _unsubscribeClientSubscription(_x142,_x143){return _unsubscribeClientSubscription2.apply(this,arguments)}return _unsubscribeClientSubscription}()},{key:"_buildArgs",value:function _buildArgs(args,override,encoding,extra){var commitment=override||this._commitment;if(commitment||encoding||extra){var _options={};if(encoding){_options.encoding=encoding}if(commitment){_options.commitment=commitment}if(extra){_options=Object.assign(_options,extra)}args.push(_options)}return args}},{key:"_buildArgsAtLeastConfirmed",value:function _buildArgsAtLeastConfirmed(args,override,encoding,extra){var commitment=override||this._commitment;if(commitment&&!["confirmed","finalized"].includes(commitment)){throw new Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`")}return this._buildArgs(args,override,encoding,extra)}},{key:"_wsOnSignatureNotification",value:function _wsOnSignatureNotification(notification){var _create6=create(notification,SignatureNotificationResult),result=_create6.result,subscription=_create6.subscription;if(result.value!=="receivedSignature"){this._subscriptionsAutoDisposedByRpc.add(subscription)}this._handleServerNotification(subscription,result.value==="receivedSignature"?[{type:"received"},result.context]:[{type:"status",result:result.value},result.context])}},{key:"onSignature",value:function onSignature(signature,_callback,commitment){var _this14=this;var args=this._buildArgs([signature],commitment||this._commitment||"finalized");var clientSubscriptionId=this._makeSubscription({callback:function callback(notification,context){if(notification.type==="status"){_callback(notification.result,context);try{_this14.removeSignatureListener(clientSubscriptionId)}catch(_err){}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},args);return clientSubscriptionId}},{key:"onSignatureWithOptions",value:function onSignatureWithOptions(signature,_callback2,options){var _this15=this;var _options$commitment=_objectSpread2(_objectSpread2({},options),{},{commitment:options&&options.commitment||this._commitment||"finalized"}),commitment=_options$commitment.commitment,extra=_objectWithoutProperties(_options$commitment,_excluded4);var args=this._buildArgs([signature],commitment,undefined,extra);var clientSubscriptionId=this._makeSubscription({callback:function callback(notification,context){_callback2(notification,context);try{_this15.removeSignatureListener(clientSubscriptionId)}catch(_err){}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},args);return clientSubscriptionId}},{key:"removeSignatureListener",value:function(){var _removeSignatureListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee102(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee102$(_context103){while(1)switch(_context103.prev=_context103.next){case 0:_context103.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"signature result");case 2:case"end":return _context103.stop()}}),_callee102,this)})));function removeSignatureListener(_x144){return _removeSignatureListener.apply(this,arguments)}return removeSignatureListener}()},{key:"_wsOnRootNotification",value:function _wsOnRootNotification(notification){var _create7=create(notification,RootNotificationResult),result=_create7.result,subscription=_create7.subscription;this._handleServerNotification(subscription,[result])}},{key:"onRootChange",value:function onRootChange(callback){return this._makeSubscription({callback:callback,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}},{key:"removeRootChangeListener",value:function(){var _removeRootChangeListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee103(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee103$(_context104){while(1)switch(_context104.prev=_context104.next){case 0:_context104.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"root change");case 2:case"end":return _context104.stop()}}),_callee103,this)})));function removeRootChangeListener(_x145){return _removeRootChangeListener.apply(this,arguments)}return removeRootChangeListener}()}]);return Connection}();var Keypair=function(){function Keypair(keypair){_classCallCheck(this,Keypair);this._keypair=void 0;this._keypair=keypair!==null&&keypair!==void 0?keypair:generateKeypair()}_createClass(Keypair,[{key:"publicKey",get:function get(){return new PublicKey(this._keypair.publicKey)}},{key:"secretKey",get:function get(){return new Uint8Array(this._keypair.secretKey)}}],[{key:"generate",value:function generate(){return new Keypair(generateKeypair())}},{key:"fromSecretKey",value:function fromSecretKey(secretKey,options){if(secretKey.byteLength!==64){throw new Error("bad secret key size")}var publicKey=secretKey.slice(32,64);if(!options||!options.skipValidation){var privateScalar=secretKey.slice(0,32);var computedPublicKey=getPublicKey(privateScalar);for(var ii=0;ii<32;ii++){if(publicKey[ii]!==computedPublicKey[ii]){throw new Error("provided secretKey is invalid")}}}return new Keypair({publicKey:publicKey,secretKey:secretKey})}},{key:"fromSeed",value:function fromSeed(seed){var publicKey=getPublicKey(seed);var secretKey=new Uint8Array(64);secretKey.set(seed);secretKey.set(publicKey,32);return new Keypair({publicKey:publicKey,secretKey:secretKey})}}]);return Keypair}();var LOOKUP_TABLE_INSTRUCTION_LAYOUTS=Object.freeze({CreateLookupTable:{index:0,layout:struct([u32("instruction"),u64$2("recentSlot"),u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:struct([u32("instruction")])},ExtendLookupTable:{index:2,layout:struct([u32("instruction"),u64$2(),seq(publicKey(),offset(u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:struct([u32("instruction")])},CloseLookupTable:{index:4,layout:struct([u32("instruction")])}});var AddressLookupTableInstruction=function(){function AddressLookupTableInstruction(){_classCallCheck(this,AddressLookupTableInstruction)}_createClass(AddressLookupTableInstruction,null,[{key:"decodeInstructionType",value:function decodeInstructionType(instruction){this.checkProgramId(instruction.programId);var instructionTypeLayout=u32("instruction");var index=instructionTypeLayout.decode(instruction.data);var type;for(var _i=0,_Object$entries=Object.entries(LOOKUP_TABLE_INSTRUCTION_LAYOUTS);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),layoutType=_Object$entries$_i[0],layout=_Object$entries$_i[1];if(layout.index==index){type=layoutType;break}}if(!type){throw new Error("Invalid Instruction. Should be a LookupTable Instruction")}return type}},{key:"decodeCreateLookupTable",value:function decodeCreateLookupTable(instruction){this.checkProgramId(instruction.programId);this.checkKeysLength(instruction.keys,4);var _decodeData=decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,instruction.data),recentSlot=_decodeData.recentSlot;return{authority:instruction.keys[1].pubkey,payer:instruction.keys[2].pubkey,recentSlot:Number(recentSlot)}}},{key:"decodeExtendLookupTable",value:function decodeExtendLookupTable(instruction){this.checkProgramId(instruction.programId);if(instruction.keys.length<2){throw new Error("invalid instruction; found ".concat(instruction.keys.length," keys, expected at least 2"))}var _decodeData2=decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,instruction.data),addresses=_decodeData2.addresses;return{lookupTable:instruction.keys[0].pubkey,authority:instruction.keys[1].pubkey,payer:instruction.keys.length>2?instruction.keys[2].pubkey:undefined,addresses:addresses.map((function(buffer){return new PublicKey(buffer)}))}}},{key:"decodeCloseLookupTable",value:function decodeCloseLookupTable(instruction){this.checkProgramId(instruction.programId);this.checkKeysLength(instruction.keys,3);return{lookupTable:instruction.keys[0].pubkey,authority:instruction.keys[1].pubkey,recipient:instruction.keys[2].pubkey}}},{key:"decodeFreezeLookupTable",value:function decodeFreezeLookupTable(instruction){this.checkProgramId(instruction.programId);this.checkKeysLength(instruction.keys,2);return{lookupTable:instruction.keys[0].pubkey,authority:instruction.keys[1].pubkey}}},{key:"decodeDeactivateLookupTable",value:function decodeDeactivateLookupTable(instruction){this.checkProgramId(instruction.programId);this.checkKeysLength(instruction.keys,2);return{lookupTable:instruction.keys[0].pubkey,authority:instruction.keys[1].pubkey}}},{key:"checkProgramId",value:function checkProgramId(programId){if(!programId.equals(AddressLookupTableProgram.programId)){throw new Error("invalid instruction; programId is not AddressLookupTable Program")}}},{key:"checkKeysLength",value:function checkKeysLength(keys,expectedLength){if(keys.length>_32n&U32_MASK64)};return{h:Number(n>>_32n&U32_MASK64)|0,l:Number(n&U32_MASK64)|0}}function split(lst,le=false){let Ah=new Uint32Array(lst.length);let Al=new Uint32Array(lst.length);for(let i=0;iBigInt(h>>>0)<<_32n|BigInt(l>>>0);const shrSH=(h,l,s)=>h>>>s;const shrSL=(h,l,s)=>h<<32-s|l>>>s;const rotrSH=(h,l,s)=>h>>>s|l<<32-s;const rotrSL=(h,l,s)=>h<<32-s|l>>>s;const rotrBH=(h,l,s)=>h<<64-s|l>>>s-32;const rotrBL=(h,l,s)=>h>>>s-32|l<<64-s;const rotr32H=(h,l)=>l;const rotr32L=(h,l)=>h;const rotlSH=(h,l,s)=>h<>>32-s;const rotlSL=(h,l,s)=>l<>>32-s;const rotlBH=(h,l,s)=>l<>>64-s;const rotlBL=(h,l,s)=>h<>>64-s;function add(Ah,Al,Bh,Bl){const l=(Al>>>0)+(Bl>>>0);return{h:Ah+Bh+(l/2**32|0)|0,l:l|0}}const add3L=(Al,Bl,Cl)=>(Al>>>0)+(Bl>>>0)+(Cl>>>0);const add3H=(low,Ah,Bh,Ch)=>Ah+Bh+Ch+(low/2**32|0)|0;const add4L=(Al,Bl,Cl,Dl)=>(Al>>>0)+(Bl>>>0)+(Cl>>>0)+(Dl>>>0);const add4H=(low,Ah,Bh,Ch,Dh)=>Ah+Bh+Ch+Dh+(low/2**32|0)|0;const add5L=(Al,Bl,Cl,Dl,El)=>(Al>>>0)+(Bl>>>0)+(Cl>>>0)+(Dl>>>0)+(El>>>0);const add5H=(low,Ah,Bh,Ch,Dh,Eh)=>Ah+Bh+Ch+Dh+Eh+(low/2**32|0)|0;const u64={fromBig:fromBig,split:split,toBig:toBig,shrSH:shrSH,shrSL:shrSL,rotrSH:rotrSH,rotrSL:rotrSL,rotrBH:rotrBH,rotrBL:rotrBL,rotr32H:rotr32H,rotr32L:rotr32L,rotlSH:rotlSH,rotlSL:rotlSL,rotlBH:rotlBH,rotlBL:rotlBL,add:add,add3L:add3L,add3H:add3H,add4L:add4L,add4H:add4H,add5H:add5H,add5L:add5L};var u64$1=u64;const[SHA3_PI,SHA3_ROTL,_SHA3_IOTA]=[[],[],[]];const _0n$2=BigInt(0);const _1n$2=BigInt(1);const _2n$2=BigInt(2);const _7n=BigInt(7);const _256n=BigInt(256);const _0x71n=BigInt(113);for(let round=0,R=_1n$2,x=1,y=0;round<24;round++){[x,y]=[y,(2*x+3*y)%5];SHA3_PI.push(2*(5*y+x));SHA3_ROTL.push((round+1)*(round+2)/2%64);let t=_0n$2;for(let j=0;j<7;j++){R=(R<<_1n$2^(R>>_7n)*_0x71n)%_256n;if(R&_2n$2)t^=_1n$2<<(_1n$2<s>32?u64$1.rotlBH(h,l,s):u64$1.rotlSH(h,l,s);const rotlL=(h,l,s)=>s>32?u64$1.rotlBL(h,l,s):u64$1.rotlSL(h,l,s);function keccakP(s,rounds=24){const B=new Uint32Array(5*2);for(let round=24-rounds;round<24;round++){for(let x=0;x<10;x++)B[x]=s[x]^s[x+10]^s[x+20]^s[x+30]^s[x+40];for(let x=0;x<10;x+=2){const idx1=(x+8)%10;const idx0=(x+2)%10;const B0=B[idx0];const B1=B[idx0+1];const Th=rotlH(B0,B1,1)^B[idx1];const Tl=rotlL(B0,B1,1)^B[idx1+1];for(let y=0;y<50;y+=10){s[x+y]^=Th;s[x+y+1]^=Tl}}let curH=s[2];let curL=s[3];for(let t=0;t<24;t++){const shift=SHA3_ROTL[t];const Th=rotlH(curH,curL,shift);const Tl=rotlL(curH,curL,shift);const PI=SHA3_PI[t];curH=s[PI];curL=s[PI+1];s[PI]=Th;s[PI+1]=Tl}for(let y=0;y<50;y+=10){for(let x=0;x<10;x++)B[x]=s[y+x];for(let x=0;x<10;x++)s[y+x]^=~B[(x+2)%10]&B[(x+4)%10]}s[0]^=SHA3_IOTA_H[round];s[1]^=SHA3_IOTA_L[round]}B.fill(0)}class Keccak extends Hash{constructor(blockLen,suffix,outputLen,enableXOF=false,rounds=24){super();this.blockLen=blockLen;this.suffix=suffix;this.outputLen=outputLen;this.enableXOF=enableXOF;this.rounds=rounds;this.pos=0;this.posOut=0;this.finished=false;this.destroyed=false;assert$3.number(outputLen);if(0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200);this.state32=u32$1(this.state)}keccak(){keccakP(this.state32,this.rounds);this.posOut=0;this.pos=0}update(data){assert$3.exists(this);const{blockLen:blockLen,state:state}=this;data=toBytes(data);const len=data.length;for(let pos=0;pos=blockLen)this.keccak();const take=Math.min(blockLen-this.posOut,len-pos);out.set(bufferOut.subarray(this.posOut,this.posOut+take),pos);this.posOut+=take;pos+=take}return out}xofInto(out){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(out)}xof(bytes){assert$3.number(bytes);return this.xofInto(new Uint8Array(bytes))}digestInto(out){assert$3.output(out,this);if(this.finished)throw new Error("digest() was already called");this.writeInto(out);this.destroy();return out}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=true;this.state.fill(0)}_cloneInto(to){const{blockLen:blockLen,suffix:suffix,outputLen:outputLen,rounds:rounds,enableXOF:enableXOF}=this;to||(to=new Keccak(blockLen,suffix,outputLen,enableXOF,rounds));to.state32.set(this.state32);to.pos=this.pos;to.posOut=this.posOut;to.finished=this.finished;to.rounds=rounds;to.suffix=suffix;to.outputLen=outputLen;to.enableXOF=enableXOF;to.destroyed=this.destroyed;return to}}const gen=(suffix,blockLen,outputLen)=>wrapConstructor((()=>new Keccak(blockLen,suffix,outputLen)));gen(6,144,224/8);gen(6,136,256/8);gen(6,104,384/8);gen(6,72,512/8);gen(1,144,224/8);const keccak_256=gen(1,136,256/8);gen(1,104,384/8);gen(1,72,512/8);const genShake=(suffix,blockLen,outputLen)=>wrapXOFConstructorWithOpts(((opts={})=>new Keccak(blockLen,suffix,opts.dkLen===undefined?outputLen:opts.dkLen,true)));genShake(31,168,128/8);genShake(31,136,256/8);const Chi=(a,b,c)=>a&b^~a&c;const Maj=(a,b,c)=>a&b^a&c^b&c;const SHA256_K=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);const IV=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);const SHA256_W=new Uint32Array(64);class SHA256 extends SHA2$1{constructor(){super(64,32,8,false);this.A=IV[0]|0;this.B=IV[1]|0;this.C=IV[2]|0;this.D=IV[3]|0;this.E=IV[4]|0;this.F=IV[5]|0;this.G=IV[6]|0;this.H=IV[7]|0}get(){const{A:A,B:B,C:C,D:D,E:E,F:F,G:G,H:H}=this;return[A,B,C,D,E,F,G,H]}set(A,B,C,D,E,F,G,H){this.A=A|0;this.B=B|0;this.C=C|0;this.D=D|0;this.E=E|0;this.F=F|0;this.G=G|0;this.H=H|0}process(view,offset){for(let i=0;i<16;i++,offset+=4)SHA256_W[i]=view.getUint32(offset,false);for(let i=16;i<64;i++){const W15=SHA256_W[i-15];const W2=SHA256_W[i-2];const s0=rotr$1(W15,7)^rotr$1(W15,18)^W15>>>3;const s1=rotr$1(W2,17)^rotr$1(W2,19)^W2>>>10;SHA256_W[i]=s1+SHA256_W[i-7]+s0+SHA256_W[i-16]|0}let{A:A,B:B,C:C,D:D,E:E,F:F,G:G,H:H}=this;for(let i=0;i<64;i++){const sigma1=rotr$1(E,6)^rotr$1(E,11)^rotr$1(E,25);const T1=H+sigma1+Chi(E,F,G)+SHA256_K[i]+SHA256_W[i]|0;const sigma0=rotr$1(A,2)^rotr$1(A,13)^rotr$1(A,22);const T2=sigma0+Maj(A,B,C)|0;H=G;G=F;F=E;E=D+T1|0;D=C;C=B;B=A;A=T1+T2|0}A=A+this.A|0;B=B+this.B|0;C=C+this.C|0;D=D+this.D|0;E=E+this.E|0;F=F+this.F|0;G=G+this.G|0;H=H+this.H|0;this.set(A,B,C,D,E,F,G,H)}roundClean(){SHA256_W.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0);this.buffer.fill(0)}}class SHA224 extends SHA256{constructor(){super();this.A=3238371032|0;this.B=914150663|0;this.C=812702999|0;this.D=4144912697|0;this.E=4290775857|0;this.F=1750603025|0;this.G=1694076839|0;this.H=3204075428|0;this.outputLen=28}}const sha256=wrapConstructor$1((()=>new SHA256));wrapConstructor$1((()=>new SHA224)); -+/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const u8a=a=>a instanceof Uint8Array;const u32$1=arr=>new Uint32Array(arr.buffer,arr.byteOffset,Math.floor(arr.byteLength/4));const createView=arr=>new DataView(arr.buffer,arr.byteOffset,arr.byteLength);const rotr=(word,shift)=>word<<32-shift|word>>>shift;const isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!isLE)throw new Error("Non little-endian hardware is not supported");Array.from({length:256},((v,i)=>i.toString(16).padStart(2,"0")));function utf8ToBytes(str){if(typeof str!=="string")throw new Error(`utf8ToBytes expected string, got ${typeof str}`);return new Uint8Array((new TextEncoder).encode(str))}function toBytes(data){if(typeof data==="string")data=utf8ToBytes(data);if(!u8a(data))throw new Error(`expected Uint8Array, got ${typeof data}`);return data}class Hash{clone(){return this._cloneInto()}}function wrapConstructor(hashCons){const hashC=msg=>hashCons().update(toBytes(msg)).digest();const tmp=hashCons();hashC.outputLen=tmp.outputLen;hashC.blockLen=tmp.blockLen;hashC.create=()=>hashCons();return hashC}function wrapXOFConstructorWithOpts(hashCons){const hashC=(msg,opts)=>hashCons(opts).update(toBytes(msg)).digest();const tmp=hashCons({});hashC.outputLen=tmp.outputLen;hashC.blockLen=tmp.blockLen;hashC.create=opts=>hashCons(opts);return hashC}function setBigUint64(view,byteOffset,value,isLE){if(typeof view.setBigUint64==="function")return view.setBigUint64(byteOffset,value,isLE);const _32n=BigInt(32);const _u32_max=BigInt(4294967295);const wh=Number(value>>_32n&_u32_max);const wl=Number(value&_u32_max);const h=isLE?4:0;const l=isLE?0:4;view.setUint32(byteOffset+h,wh,isLE);view.setUint32(byteOffset+l,wl,isLE)}class SHA2 extends Hash{constructor(blockLen,outputLen,padOffset,isLE){super();this.blockLen=blockLen;this.outputLen=outputLen;this.padOffset=padOffset;this.isLE=isLE;this.finished=false;this.length=0;this.pos=0;this.destroyed=false;this.buffer=new Uint8Array(blockLen);this.view=createView(this.buffer)}update(data){assert$3.exists(this);const{view:view,buffer:buffer,blockLen:blockLen}=this;data=toBytes(data);const len=data.length;for(let pos=0;posblockLen-pos){this.process(view,0);pos=0}for(let i=pos;istate.length)throw new Error("_sha2: outputLen bigger than state");for(let i=0;ia&b^~a&c;const Maj$1=(a,b,c)=>a&b^a&c^b&c;const SHA256_K$1=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);const IV$1=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);const SHA256_W$1=new Uint32Array(64);let SHA256$1=class SHA256 extends SHA2{constructor(){super(64,32,8,false);this.A=IV$1[0]|0;this.B=IV$1[1]|0;this.C=IV$1[2]|0;this.D=IV$1[3]|0;this.E=IV$1[4]|0;this.F=IV$1[5]|0;this.G=IV$1[6]|0;this.H=IV$1[7]|0}get(){const{A:A,B:B,C:C,D:D,E:E,F:F,G:G,H:H}=this;return[A,B,C,D,E,F,G,H]}set(A,B,C,D,E,F,G,H){this.A=A|0;this.B=B|0;this.C=C|0;this.D=D|0;this.E=E|0;this.F=F|0;this.G=G|0;this.H=H|0}process(view,offset){for(let i=0;i<16;i++,offset+=4)SHA256_W$1[i]=view.getUint32(offset,false);for(let i=16;i<64;i++){const W15=SHA256_W$1[i-15];const W2=SHA256_W$1[i-2];const s0=rotr(W15,7)^rotr(W15,18)^W15>>>3;const s1=rotr(W2,17)^rotr(W2,19)^W2>>>10;SHA256_W$1[i]=s1+SHA256_W$1[i-7]+s0+SHA256_W$1[i-16]|0}let{A:A,B:B,C:C,D:D,E:E,F:F,G:G,H:H}=this;for(let i=0;i<64;i++){const sigma1=rotr(E,6)^rotr(E,11)^rotr(E,25);const T1=H+sigma1+Chi$1(E,F,G)+SHA256_K$1[i]+SHA256_W$1[i]|0;const sigma0=rotr(A,2)^rotr(A,13)^rotr(A,22);const T2=sigma0+Maj$1(A,B,C)|0;H=G;G=F;F=E;E=D+T1|0;D=C;C=B;B=A;A=T1+T2|0}A=A+this.A|0;B=B+this.B|0;C=C+this.C|0;D=D+this.D|0;E=E+this.E|0;F=F+this.F|0;G=G+this.G|0;H=H+this.H|0;this.set(A,B,C,D,E,F,G,H)}roundClean(){SHA256_W$1.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0);this.buffer.fill(0)}};let SHA224$1=class SHA224 extends SHA256$1{constructor(){super();this.A=3238371032|0;this.B=914150663|0;this.C=812702999|0;this.D=4144912697|0;this.E=4290775857|0;this.F=1750603025|0;this.G=1694076839|0;this.H=3204075428|0;this.outputLen=28}};const sha256$1=wrapConstructor((()=>new SHA256$1));wrapConstructor((()=>new SHA224$1));var lib={};var encoding_lib={};function inRange(a,min,max){return min<=a&&a<=max}function ToDictionary(o){if(o===undefined)return{};if(o===Object(o))return o;throw TypeError("Could not convert argument to dictionary")}function stringToCodePoints(string){var s=String(string);var n=s.length;var i=0;var u=[];while(i57343){u.push(c)}else if(56320<=c&&c<=57343){u.push(65533)}else if(55296<=c&&c<=56319){if(i===n-1){u.push(65533)}else{var d=string.charCodeAt(i+1);if(56320<=d&&d<=57343){var a=c&1023;var b=d&1023;u.push(65536+(a<<10)+b);i+=1}else{u.push(65533)}}}i+=1}return u}function codePointsToString(code_points){var s="";for(var i=0;i>10)+55296,(cp&1023)+56320)}}return s}var end_of_stream=-1;function Stream(tokens){this.tokens=[].slice.call(tokens)}Stream.prototype={endOfStream:function(){return!this.tokens.length},read:function(){if(!this.tokens.length)return end_of_stream;return this.tokens.shift()},prepend:function(token){if(Array.isArray(token)){var tokens=token;while(tokens.length)this.tokens.unshift(tokens.pop())}else{this.tokens.unshift(token)}},push:function(token){if(Array.isArray(token)){var tokens=token;while(tokens.length)this.tokens.push(tokens.shift())}else{this.tokens.push(token)}}};var finished=-1;function decoderError(fatal,opt_code_point){if(fatal)throw TypeError("Decoder error");return opt_code_point||65533}var DEFAULT_ENCODING="utf-8";function TextDecoder$1(encoding,options){if(!(this instanceof TextDecoder$1)){return new TextDecoder$1(encoding,options)}encoding=encoding!==undefined?String(encoding).toLowerCase():DEFAULT_ENCODING;if(encoding!==DEFAULT_ENCODING){throw new Error("Encoding not supported. Only utf-8 is supported")}options=ToDictionary(options);this._streaming=false;this._BOMseen=false;this._decoder=null;this._fatal=Boolean(options["fatal"]);this._ignoreBOM=Boolean(options["ignoreBOM"]);Object.defineProperty(this,"encoding",{value:"utf-8"});Object.defineProperty(this,"fatal",{value:this._fatal});Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}TextDecoder$1.prototype={decode:function decode(input,options){var bytes;if(typeof input==="object"&&input instanceof ArrayBuffer){bytes=new Uint8Array(input)}else if(typeof input==="object"&&"buffer"in input&&input.buffer instanceof ArrayBuffer){bytes=new Uint8Array(input.buffer,input.byteOffset,input.byteLength)}else{bytes=new Uint8Array(0)}options=ToDictionary(options);if(!this._streaming){this._decoder=new UTF8Decoder({fatal:this._fatal});this._BOMseen=false}this._streaming=Boolean(options["stream"]);var input_stream=new Stream(bytes);var code_points=[];var result;while(!input_stream.endOfStream()){result=this._decoder.handler(input_stream,input_stream.read());if(result===finished)break;if(result===null)continue;if(Array.isArray(result))code_points.push.apply(code_points,result);else code_points.push(result)}if(!this._streaming){do{result=this._decoder.handler(input_stream,input_stream.read());if(result===finished)break;if(result===null)continue;if(Array.isArray(result))code_points.push.apply(code_points,result);else code_points.push(result)}while(!input_stream.endOfStream());this._decoder=null}if(code_points.length){if(["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen){if(code_points[0]===65279){this._BOMseen=true;code_points.shift()}else{this._BOMseen=true}}}return codePointsToString(code_points)}};function TextEncoder$1(encoding,options){if(!(this instanceof TextEncoder$1))return new TextEncoder$1(encoding,options);encoding=encoding!==undefined?String(encoding).toLowerCase():DEFAULT_ENCODING;if(encoding!==DEFAULT_ENCODING){throw new Error("Encoding not supported. Only utf-8 is supported")}options=ToDictionary(options);this._streaming=false;this._encoder=null;this._options={fatal:Boolean(options["fatal"])};Object.defineProperty(this,"encoding",{value:"utf-8"})}TextEncoder$1.prototype={encode:function encode(opt_string,options){opt_string=opt_string?String(opt_string):"";options=ToDictionary(options);if(!this._streaming)this._encoder=new UTF8Encoder(this._options);this._streaming=Boolean(options["stream"]);var bytes=[];var input_stream=new Stream(stringToCodePoints(opt_string));var result;while(!input_stream.endOfStream()){result=this._encoder.handler(input_stream,input_stream.read());if(result===finished)break;if(Array.isArray(result))bytes.push.apply(bytes,result);else bytes.push(result)}if(!this._streaming){while(true){result=this._encoder.handler(input_stream,input_stream.read());if(result===finished)break;if(Array.isArray(result))bytes.push.apply(bytes,result);else bytes.push(result)}this._encoder=null}return new Uint8Array(bytes)}};function UTF8Decoder(options){var fatal=options.fatal;var utf8_code_point=0,utf8_bytes_seen=0,utf8_bytes_needed=0,utf8_lower_boundary=128,utf8_upper_boundary=191;this.handler=function(stream,bite){if(bite===end_of_stream&&utf8_bytes_needed!==0){utf8_bytes_needed=0;return decoderError(fatal)}if(bite===end_of_stream)return finished;if(utf8_bytes_needed===0){if(inRange(bite,0,127)){return bite}if(inRange(bite,194,223)){utf8_bytes_needed=1;utf8_code_point=bite-192}else if(inRange(bite,224,239)){if(bite===224)utf8_lower_boundary=160;if(bite===237)utf8_upper_boundary=159;utf8_bytes_needed=2;utf8_code_point=bite-224}else if(inRange(bite,240,244)){if(bite===240)utf8_lower_boundary=144;if(bite===244)utf8_upper_boundary=143;utf8_bytes_needed=3;utf8_code_point=bite-240}else{return decoderError(fatal)}utf8_code_point=utf8_code_point<<6*utf8_bytes_needed;return null}if(!inRange(bite,utf8_lower_boundary,utf8_upper_boundary)){utf8_code_point=utf8_bytes_needed=utf8_bytes_seen=0;utf8_lower_boundary=128;utf8_upper_boundary=191;stream.prepend(bite);return decoderError(fatal)}utf8_lower_boundary=128;utf8_upper_boundary=191;utf8_bytes_seen+=1;utf8_code_point+=bite-128<<6*(utf8_bytes_needed-utf8_bytes_seen);if(utf8_bytes_seen!==utf8_bytes_needed)return null;var code_point=utf8_code_point;utf8_code_point=utf8_bytes_needed=utf8_bytes_seen=0;return code_point}}function UTF8Encoder(options){options.fatal;this.handler=function(stream,code_point){if(code_point===end_of_stream)return finished;if(inRange(code_point,0,127))return code_point;var count,offset;if(inRange(code_point,128,2047)){count=1;offset=192}else if(inRange(code_point,2048,65535)){count=2;offset=224}else if(inRange(code_point,65536,1114111)){count=3;offset=240}var bytes=[(code_point>>6*count)+offset];while(count>0){var temp=code_point>>6*(count-1);bytes.push(128|temp&63);count-=1}return bytes}}encoding_lib.TextEncoder=TextEncoder$1;encoding_lib.TextDecoder=TextDecoder$1;var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;Object.defineProperty(o,k2,{enumerable:true,get:function(){return m[k]}})}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:true,value:v})}:function(o,v){o["default"]=v});var __decorate=commonjsGlobal&&commonjsGlobal.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};var __importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)if(k!=="default"&&Object.hasOwnProperty.call(mod,k))__createBinding(result,mod,k);__setModuleDefault(result,mod);return result};var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(lib,"__esModule",{value:true});var deserializeUnchecked_1=lib.deserializeUnchecked=deserialize_1=lib.deserialize=serialize_1=lib.serialize=lib.BinaryReader=lib.BinaryWriter=lib.BorshError=lib.baseDecode=lib.baseEncode=void 0;const bn_js_1=__importDefault(bnExports);const bs58_1=__importDefault(bs58);const encoding=__importStar(encoding_lib);const ResolvedTextDecoder=typeof TextDecoder!=="function"?encoding.TextDecoder:TextDecoder;const textDecoder=new ResolvedTextDecoder("utf-8",{fatal:true});function baseEncode(value){if(typeof value==="string"){value=Buffer.from(value,"utf8")}return bs58_1.default.encode(Buffer.from(value))}lib.baseEncode=baseEncode;function baseDecode(value){return Buffer.from(bs58_1.default.decode(value))}lib.baseDecode=baseDecode;const INITIAL_LENGTH=1024;class BorshError extends Error{constructor(message){super(message);this.fieldPath=[];this.originalMessage=message}addToFieldPath(fieldName){this.fieldPath.splice(0,0,fieldName);this.message=this.originalMessage+": "+this.fieldPath.join(".")}}lib.BorshError=BorshError;class BinaryWriter{constructor(){this.buf=Buffer.alloc(INITIAL_LENGTH);this.length=0}maybeResize(){if(this.buf.length<16+this.length){this.buf=Buffer.concat([this.buf,Buffer.alloc(INITIAL_LENGTH)])}}writeU8(value){this.maybeResize();this.buf.writeUInt8(value,this.length);this.length+=1}writeU16(value){this.maybeResize();this.buf.writeUInt16LE(value,this.length);this.length+=2}writeU32(value){this.maybeResize();this.buf.writeUInt32LE(value,this.length);this.length+=4}writeU64(value){this.maybeResize();this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray("le",8)))}writeU128(value){this.maybeResize();this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray("le",16)))}writeU256(value){this.maybeResize();this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray("le",32)))}writeU512(value){this.maybeResize();this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray("le",64)))}writeBuffer(buffer){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),buffer,Buffer.alloc(INITIAL_LENGTH)]);this.length+=buffer.length}writeString(str){this.maybeResize();const b=Buffer.from(str,"utf8");this.writeU32(b.length);this.writeBuffer(b)}writeFixedArray(array){this.writeBuffer(Buffer.from(array))}writeArray(array,fn){this.maybeResize();this.writeU32(array.length);for(const elem of array){this.maybeResize();fn(elem)}}toArray(){return this.buf.subarray(0,this.length)}}lib.BinaryWriter=BinaryWriter;function handlingRangeError(target,propertyKey,propertyDescriptor){const originalMethod=propertyDescriptor.value;propertyDescriptor.value=function(...args){try{return originalMethod.apply(this,args)}catch(e){if(e instanceof RangeError){const code=e.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(code)>=0){throw new BorshError("Reached the end of buffer when deserializing")}}throw e}}}class BinaryReader{constructor(buf){this.buf=buf;this.offset=0}readU8(){const value=this.buf.readUInt8(this.offset);this.offset+=1;return value}readU16(){const value=this.buf.readUInt16LE(this.offset);this.offset+=2;return value}readU32(){const value=this.buf.readUInt32LE(this.offset);this.offset+=4;return value}readU64(){const buf=this.readBuffer(8);return new bn_js_1.default(buf,"le")}readU128(){const buf=this.readBuffer(16);return new bn_js_1.default(buf,"le")}readU256(){const buf=this.readBuffer(32);return new bn_js_1.default(buf,"le")}readU512(){const buf=this.readBuffer(64);return new bn_js_1.default(buf,"le")}readBuffer(len){if(this.offset+len>this.buf.length){throw new BorshError(`Expected buffer length ${len} isn't within bounds`)}const result=this.buf.slice(this.offset,this.offset+len);this.offset+=len;return result}readString(){const len=this.readU32();const buf=this.readBuffer(len);try{return textDecoder.decode(buf)}catch(e){throw new BorshError(`Error decoding UTF-8 string: ${e}`)}}readFixedArray(len){return new Uint8Array(this.readBuffer(len))}readArray(fn){const len=this.readU32();const result=Array();for(let i=0;i{serializeField(schema,fieldName,item,fieldType[0],writer)}))}}else if(fieldType.kind!==undefined){switch(fieldType.kind){case"option":{if(value===null||value===undefined){writer.writeU8(0)}else{writer.writeU8(1);serializeField(schema,fieldName,value,fieldType.type,writer)}break}case"map":{writer.writeU32(value.size);value.forEach(((val,key)=>{serializeField(schema,fieldName,key,fieldType.key,writer);serializeField(schema,fieldName,val,fieldType.value,writer)}));break}default:throw new BorshError(`FieldType ${fieldType} unrecognized`)}}else{serializeStruct(schema,value,writer)}}catch(error){if(error instanceof BorshError){error.addToFieldPath(fieldName)}throw error}}function serializeStruct(schema,obj,writer){if(typeof obj.borshSerialize==="function"){obj.borshSerialize(writer);return}const structSchema=schema.get(obj.constructor);if(!structSchema){throw new BorshError(`Class ${obj.constructor.name} is missing in schema`)}if(structSchema.kind==="struct"){structSchema.fields.map((([fieldName,fieldType])=>{serializeField(schema,fieldName,obj[fieldName],fieldType,writer)}))}else if(structSchema.kind==="enum"){const name=obj[structSchema.field];for(let idx=0;idxdeserializeField(schema,fieldName,fieldType[0],reader)))}}if(fieldType.kind==="option"){const option=reader.readU8();if(option){return deserializeField(schema,fieldName,fieldType.type,reader)}return undefined}if(fieldType.kind==="map"){let map=new Map;const length=reader.readU32();for(let i=0;i=structSchema.values.length){throw new BorshError(`Enum index: ${idx} is out of range`)}const[fieldName,fieldType]=structSchema.values[idx];const fieldValue=deserializeField(schema,fieldName,fieldType,reader);return new classType({[fieldName]:fieldValue})}throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`)}function deserialize(schema,classType,buffer,Reader=BinaryReader){const reader=new Reader(buffer);const result=deserializeStruct(schema,classType,reader);if(reader.offsetPUBLIC_KEY_LENGTH){throw new Error("Invalid public key input")}}return _this}_createClass(PublicKey,[{key:"equals",value:function equals(publicKey){return this._bn.eq(publicKey._bn)}},{key:"toBase58",value:function toBase58(){return bs58$1.encode(this.toBytes())}},{key:"toJSON",value:function toJSON(){return this.toBase58()}},{key:"toBytes",value:function toBytes(){var buf=this.toBuffer();return new Uint8Array(buf.buffer,buf.byteOffset,buf.byteLength)}},{key:"toBuffer",value:function toBuffer(){var b=this._bn.toArrayLike(buffer.Buffer);if(b.length===PUBLIC_KEY_LENGTH){return b}var zeroPad=buffer.Buffer.alloc(32);b.copy(zeroPad,32-b.length);return zeroPad}},{key:_Symbol$toStringTag,get:function get(){return"PublicKey(".concat(this.toString(),")")}},{key:"toString",value:function toString(){return this.toBase58()}}],[{key:"unique",value:function unique(){var key=new PublicKey(uniquePublicKeyCounter);uniquePublicKeyCounter+=1;return new PublicKey(key.toBuffer())}},{key:"createWithSeed",value:function(){var _createWithSeed=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(fromPublicKey,seed,programId){var buffer$1,publicKeyBytes;return _regeneratorRuntime().wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:buffer$1=buffer.Buffer.concat([fromPublicKey.toBuffer(),buffer.Buffer.from(seed),programId.toBuffer()]);publicKeyBytes=sha256$1(buffer$1);return _context.abrupt("return",new PublicKey(publicKeyBytes));case 3:case"end":return _context.stop()}}),_callee)})));function createWithSeed(_x,_x2,_x3){return _createWithSeed.apply(this,arguments)}return createWithSeed}()},{key:"createProgramAddressSync",value:function createProgramAddressSync(seeds,programId){var buffer$1=buffer.Buffer.alloc(0);seeds.forEach((function(seed){if(seed.length>MAX_SEED_LENGTH){throw new TypeError("Max seed length exceeded")}buffer$1=buffer.Buffer.concat([buffer$1,toBuffer(seed)])}));buffer$1=buffer.Buffer.concat([buffer$1,programId.toBuffer(),buffer.Buffer.from("ProgramDerivedAddress")]);var publicKeyBytes=sha256$1(buffer$1);if(isOnCurve(publicKeyBytes)){throw new Error("Invalid seeds, address must fall off the curve")}return new PublicKey(publicKeyBytes)}},{key:"createProgramAddress",value:function(){var _createProgramAddress=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(seeds,programId){return _regeneratorRuntime().wrap((function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:return _context2.abrupt("return",this.createProgramAddressSync(seeds,programId));case 1:case"end":return _context2.stop()}}),_callee2,this)})));function createProgramAddress(_x4,_x5){return _createProgramAddress.apply(this,arguments)}return createProgramAddress}()},{key:"findProgramAddressSync",value:function findProgramAddressSync(seeds,programId){var nonce=255;var address;while(nonce!=0){try{var seedsWithNonce=seeds.concat(buffer.Buffer.from([nonce]));address=this.createProgramAddressSync(seedsWithNonce,programId)}catch(err){if(err instanceof TypeError){throw err}nonce--;continue}return[address,nonce]}throw new Error("Unable to find a viable program address nonce")}},{key:"findProgramAddress",value:function(){var _findProgramAddress=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(seeds,programId){return _regeneratorRuntime().wrap((function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:return _context3.abrupt("return",this.findProgramAddressSync(seeds,programId));case 1:case"end":return _context3.stop()}}),_callee3,this)})));function findProgramAddress(_x6,_x7){return _findProgramAddress.apply(this,arguments)}return findProgramAddress}()},{key:"isOnCurve",value:function isOnCurve$1(pubkeyData){var pubkey=new PublicKey(pubkeyData);return isOnCurve(pubkey.toBytes())}}]);return PublicKey}(Struct$1);PublicKey["default"]=new PublicKey("11111111111111111111111111111111");SOLANA_SCHEMA.set(PublicKey,{kind:"struct",fields:[["_bn","u256"]]});var Account=function(){function Account(secretKey){_classCallCheck(this,Account);this._publicKey=void 0;this._secretKey=void 0;if(secretKey){var secretKeyBuffer=toBuffer(secretKey);if(secretKey.length!==64){throw new Error("bad secret key size")}this._publicKey=secretKeyBuffer.slice(32,64);this._secretKey=secretKeyBuffer.slice(0,32)}else{this._secretKey=toBuffer(generatePrivateKey());this._publicKey=toBuffer(getPublicKey(this._secretKey))}}_createClass(Account,[{key:"publicKey",get:function get(){return new PublicKey(this._publicKey)}},{key:"secretKey",get:function get(){return buffer.Buffer.concat([this._secretKey,this._publicKey],64)}}]);return Account}();var BPF_LOADER_DEPRECATED_PROGRAM_ID=new PublicKey("BPFLoader1111111111111111111111111111111111");var Layout$1={};Object.defineProperty(Layout$1,"__esModule",{value:true});Layout$1.s16=Layout$1.s8=Layout$1.nu64be=Layout$1.u48be=Layout$1.u40be=Layout$1.u32be=Layout$1.u24be=Layout$1.u16be=nu64=Layout$1.nu64=Layout$1.u48=Layout$1.u40=u32=Layout$1.u32=Layout$1.u24=u16=Layout$1.u16=u8=Layout$1.u8=offset=Layout$1.offset=Layout$1.greedy=Layout$1.Constant=Layout$1.UTF8=Layout$1.CString=Layout$1.Blob=Layout$1.Boolean=Layout$1.BitField=Layout$1.BitStructure=Layout$1.VariantLayout=Layout$1.Union=Layout$1.UnionLayoutDiscriminator=Layout$1.UnionDiscriminator=Layout$1.Structure=Layout$1.Sequence=Layout$1.DoubleBE=Layout$1.Double=Layout$1.FloatBE=Layout$1.Float=Layout$1.NearInt64BE=Layout$1.NearInt64=Layout$1.NearUInt64BE=Layout$1.NearUInt64=Layout$1.IntBE=Layout$1.Int=Layout$1.UIntBE=Layout$1.UInt=Layout$1.OffsetLayout=Layout$1.GreedyCount=Layout$1.ExternalLayout=Layout$1.bindConstructorLayout=Layout$1.nameWithProperty=Layout$1.Layout=Layout$1.uint8ArrayToBuffer=Layout$1.checkUint8Array=void 0;Layout$1.constant=Layout$1.utf8=Layout$1.cstr=blob=Layout$1.blob=Layout$1.unionLayoutDiscriminator=Layout$1.union=seq=Layout$1.seq=Layout$1.bits=struct=Layout$1.struct=Layout$1.f64be=Layout$1.f64=Layout$1.f32be=Layout$1.f32=Layout$1.ns64be=Layout$1.s48be=Layout$1.s40be=Layout$1.s32be=Layout$1.s24be=Layout$1.s16be=ns64=Layout$1.ns64=Layout$1.s48=Layout$1.s40=Layout$1.s32=Layout$1.s24=void 0;const buffer_1=buffer;function checkUint8Array(b){if(!(b instanceof Uint8Array)){throw new TypeError("b must be a Uint8Array")}}Layout$1.checkUint8Array=checkUint8Array;function uint8ArrayToBuffer(b){checkUint8Array(b);return buffer_1.Buffer.from(b.buffer,b.byteOffset,b.length)}Layout$1.uint8ArrayToBuffer=uint8ArrayToBuffer;class Layout{constructor(span,property){if(!Number.isInteger(span)){throw new TypeError("span must be an integer")}this.span=span;this.property=property}makeDestinationObject(){return{}}getSpan(b,offset){if(0>this.span){throw new RangeError("indeterminate span")}return this.span}replicate(property){const rv=Object.create(this.constructor.prototype);Object.assign(rv,this);rv.property=property;return rv}fromArray(values){return undefined}}Layout$1.Layout=Layout;function nameWithProperty(name,lo){if(lo.property){return name+"["+lo.property+"]"}return name}Layout$1.nameWithProperty=nameWithProperty;function bindConstructorLayout(Class,layout){if("function"!==typeof Class){throw new TypeError("Class must be constructor")}if(Object.prototype.hasOwnProperty.call(Class,"layout_")){throw new Error("Class is already bound to a layout")}if(!(layout&&layout instanceof Layout)){throw new TypeError("layout must be a Layout")}if(Object.prototype.hasOwnProperty.call(layout,"boundConstructor_")){throw new Error("layout is already bound to a constructor")}Class.layout_=layout;layout.boundConstructor_=Class;layout.makeDestinationObject=()=>new Class;Object.defineProperty(Class.prototype,"encode",{value(b,offset){return layout.encode(this,b,offset)},writable:true});Object.defineProperty(Class,"decode",{value(b,offset){return layout.decode(b,offset)},writable:true})}Layout$1.bindConstructorLayout=bindConstructorLayout;class ExternalLayout extends Layout{isCount(){throw new Error("ExternalLayout is abstract")}}Layout$1.ExternalLayout=ExternalLayout;class GreedyCount extends ExternalLayout{constructor(elementSpan=1,property){if(!Number.isInteger(elementSpan)||0>=elementSpan){throw new TypeError("elementSpan must be a (positive) integer")}super(-1,property);this.elementSpan=elementSpan}isCount(){return true}decode(b,offset=0){checkUint8Array(b);const rem=b.length-offset;return Math.floor(rem/this.elementSpan)}encode(src,b,offset){return 0}}Layout$1.GreedyCount=GreedyCount;class OffsetLayout extends ExternalLayout{constructor(layout,offset=0,property){if(!(layout instanceof Layout)){throw new TypeError("layout must be a Layout")}if(!Number.isInteger(offset)){throw new TypeError("offset must be integer or undefined")}super(layout.span,property||layout.property);this.layout=layout;this.offset=offset}isCount(){return this.layout instanceof UInt||this.layout instanceof UIntBE}decode(b,offset=0){return this.layout.decode(b,offset+this.offset)}encode(src,b,offset=0){return this.layout.encode(src,b,offset+this.offset)}}Layout$1.OffsetLayout=OffsetLayout;class UInt extends Layout{constructor(span,property){super(span,property);if(6span+elo.encode(v,b,offset+span)),0);if(this.count instanceof ExternalLayout){this.count.encode(src.length,b,offset)}return span}}Layout$1.Sequence=Sequence;class Structure extends Layout{constructor(fields,property,decodePrefixes){if(!(Array.isArray(fields)&&fields.reduce(((acc,v)=>acc&&v instanceof Layout),true))){throw new TypeError("fields must be array of Layout instances")}if("boolean"===typeof property&&undefined===decodePrefixes){decodePrefixes=property;property=undefined}for(const fd of fields){if(0>fd.span&&undefined===fd.property){throw new Error("fields cannot contain unnamed variable-length layout")}}let span=-1;try{span=fields.reduce(((span,fd)=>span+fd.getSpan()),0)}catch(e){}super(span,property);this.fields=fields;this.decodePrefixes=!!decodePrefixes}getSpan(b,offset=0){if(0<=this.span){return this.span}let span=0;try{span=this.fields.reduce(((span,fd)=>{const fsp=fd.getSpan(b,offset);offset+=fsp;return span+fsp}),0)}catch(e){throw new RangeError("indeterminate span")}return span}decode(b,offset=0){checkUint8Array(b);const dest=this.makeDestinationObject();for(const fd of this.fields){if(undefined!==fd.property){dest[fd.property]=fd.decode(b,offset)}offset+=fd.getSpan(b,offset);if(this.decodePrefixes&&b.length===offset){break}}return dest}encode(src,b,offset=0){const firstOffset=offset;let lastOffset=0;let lastWrote=0;for(const fd of this.fields){let span=fd.span;lastWrote=0span){span=fd.getSpan(b,offset)}}}lastOffset=offset;offset+=span}return lastOffset+lastWrote-firstOffset}fromArray(values){const dest=this.makeDestinationObject();for(const fd of this.fields){if(undefined!==fd.property&&0fd.span){offset=-1}else if(0<=offset){offset+=fd.span}}return undefined}}Layout$1.Structure=Structure;class UnionDiscriminator{constructor(property){this.property=property}decode(b,offset){throw new Error("UnionDiscriminator is abstract")}encode(src,b,offset){throw new Error("UnionDiscriminator is abstract")}}Layout$1.UnionDiscriminator=UnionDiscriminator;class UnionLayoutDiscriminator extends UnionDiscriminator{constructor(layout,property){if(!(layout instanceof ExternalLayout&&layout.isCount())){throw new TypeError("layout must be an unsigned integer ExternalLayout")}super(property||layout.property||"variant");this.layout=layout}decode(b,offset){return this.layout.decode(b,offset)}encode(src,b,offset){return this.layout.encode(src,b,offset)}}Layout$1.UnionLayoutDiscriminator=UnionLayoutDiscriminator;class Union extends Layout{constructor(discr,defaultLayout,property){let discriminator;if(discr instanceof UInt||discr instanceof UIntBE){discriminator=new UnionLayoutDiscriminator(new OffsetLayout(discr))}else if(discr instanceof ExternalLayout&&discr.isCount()){discriminator=new UnionLayoutDiscriminator(discr)}else if(!(discr instanceof UnionDiscriminator)){throw new TypeError("discr must be a UnionDiscriminator "+"or an unsigned integer layout")}else{discriminator=discr}if(undefined===defaultLayout){defaultLayout=null}if(!(null===defaultLayout||defaultLayout instanceof Layout)){throw new TypeError("defaultLayout must be null or a Layout")}if(null!==defaultLayout){if(0>defaultLayout.span){throw new Error("defaultLayout must have constant span")}if(undefined===defaultLayout.property){defaultLayout=defaultLayout.replicate("content")}}let span=-1;if(defaultLayout){span=defaultLayout.span;if(0<=span&&(discr instanceof UInt||discr instanceof UIntBE)){span+=discriminator.layout.span}}super(span,property);this.discriminator=discriminator;this.usesPrefixDiscriminator=discr instanceof UInt||discr instanceof UIntBE;this.defaultLayout=defaultLayout;this.registry={};let boundGetSourceVariant=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(src){return boundGetSourceVariant(src)};this.configGetSourceVariant=function(gsv){boundGetSourceVariant=gsv.bind(this)}}getSpan(b,offset=0){if(0<=this.span){return this.span}const vlo=this.getVariant(b,offset);if(!vlo){throw new Error("unable to determine span for unrecognized variant")}return vlo.getSpan(b,offset)}defaultGetSourceVariant(src){if(Object.prototype.hasOwnProperty.call(src,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(src,this.defaultLayout.property)){return undefined}const vlo=this.registry[src[this.discriminator.property]];if(vlo&&(!vlo.layout||vlo.property&&Object.prototype.hasOwnProperty.call(src,vlo.property))){return vlo}}else{for(const tag in this.registry){const vlo=this.registry[tag];if(vlo.property&&Object.prototype.hasOwnProperty.call(src,vlo.property)){return vlo}}}throw new Error("unable to infer src variant")}decode(b,offset=0){let dest;const dlo=this.discriminator;const discr=dlo.decode(b,offset);const clo=this.registry[discr];if(undefined===clo){const defaultLayout=this.defaultLayout;let contentOffset=0;if(this.usesPrefixDiscriminator){contentOffset=dlo.layout.span}dest=this.makeDestinationObject();dest[dlo.property]=discr;dest[defaultLayout.property]=defaultLayout.decode(b,offset+contentOffset)}else{dest=clo.decode(b,offset)}return dest}encode(src,b,offset=0){const vlo=this.getSourceVariant(src);if(undefined===vlo){const dlo=this.discriminator;const clo=this.defaultLayout;let contentOffset=0;if(this.usesPrefixDiscriminator){contentOffset=dlo.layout.span}dlo.encode(src[dlo.property],b,offset);return contentOffset+clo.encode(src[clo.property],b,offset+contentOffset)}return vlo.encode(src,b,offset)}addVariant(variant,layout,property){const rv=new VariantLayout(this,variant,layout,property);this.registry[variant]=rv;return rv}getVariant(vb,offset=0){let variant;if(vb instanceof Uint8Array){variant=this.discriminator.decode(vb,offset)}else{variant=vb}return this.registry[variant]}}Layout$1.Union=Union;class VariantLayout extends Layout{constructor(union,variant,layout,property){if(!(union instanceof Union)){throw new TypeError("union must be a Union")}if(!Number.isInteger(variant)||0>variant){throw new TypeError("variant must be a (non-negative) integer")}if("string"===typeof layout&&undefined===property){property=layout;layout=null}if(layout){if(!(layout instanceof Layout)){throw new TypeError("layout must be a Layout")}if(null!==union.defaultLayout&&0<=layout.span&&layout.span>union.defaultLayout.span){throw new Error("variant span exceeds span of containing union")}if("string"!==typeof property){throw new TypeError("variant must have a String property")}}let span=union.span;if(0>union.span){span=layout?layout.span:0;if(0<=span&&union.usesPrefixDiscriminator){span+=union.discriminator.layout.span}}super(span,property);this.union=union;this.variant=variant;this.layout=layout||null}getSpan(b,offset=0){if(0<=this.span){return this.span}let contentOffset=0;if(this.union.usesPrefixDiscriminator){contentOffset=this.union.discriminator.layout.span}let span=0;if(this.layout){span=this.layout.getSpan(b,offset+contentOffset)}return contentOffset+span}decode(b,offset=0){const dest=this.makeDestinationObject();if(this!==this.union.getVariant(b,offset)){throw new Error("variant mismatch")}let contentOffset=0;if(this.union.usesPrefixDiscriminator){contentOffset=this.union.discriminator.layout.span}if(this.layout){dest[this.property]=this.layout.decode(b,offset+contentOffset)}else if(this.property){dest[this.property]=true}else if(this.union.usesPrefixDiscriminator){dest[this.union.discriminator.property]=this.variant}return dest}encode(src,b,offset=0){let contentOffset=0;if(this.union.usesPrefixDiscriminator){contentOffset=this.union.discriminator.layout.span}if(this.layout&&!Object.prototype.hasOwnProperty.call(src,this.property)){throw new TypeError("variant lacks property "+this.property)}this.union.discriminator.encode(this.variant,b,offset);let span=contentOffset;if(this.layout){this.layout.encode(src[this.property],b,offset+contentOffset);span+=this.layout.getSpan(b,offset+contentOffset);if(0<=this.union.span&&span>this.union.span){throw new Error("encoded variant overruns containing union")}}return span}fromArray(values){if(this.layout){return this.layout.fromArray(values)}return undefined}}Layout$1.VariantLayout=VariantLayout;function fixBitwiseResult(v){if(0>v){v+=4294967296}return v}class BitStructure extends Layout{constructor(word,msb,property){if(!(word instanceof UInt||word instanceof UIntBE)){throw new TypeError("word must be a UInt or UIntBE layout")}if("string"===typeof msb&&undefined===property){property=msb;msb=false}if(4=bits){throw new TypeError("bits must be positive integer")}const totalBits=8*container.span;const usedBits=container.fields.reduce(((sum,fd)=>sum+fd.bits),0);if(bits+usedBits>totalBits){throw new Error("bits too long for span remainder ("+(totalBits-usedBits)+" of "+totalBits+" remain)")}this.container=container;this.bits=bits;this.valueMask=(1<>>this.start;return value}encode(value){if("number"!==typeof value||!Number.isInteger(value)||value!==fixBitwiseResult(value&this.valueMask)){throw new TypeError(nameWithProperty("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask)}const word=this.container._packedGetValue();const wordValue=fixBitwiseResult(value<span){span=this.length.decode(b,offset)}return span}decode(b,offset=0){let span=this.span;if(0>span){span=this.length.decode(b,offset)}return uint8ArrayToBuffer(b).slice(offset,offset+span)}encode(src,b,offset){let span=this.length;if(this.length instanceof ExternalLayout){span=src.length}if(!(src instanceof Uint8Array&&span===src.length)){throw new TypeError(nameWithProperty("Blob.encode",this)+" requires (length "+span+") Uint8Array as src")}if(offset+span>b.length){throw new RangeError("encoding overruns Uint8Array")}const srcBuffer=uint8ArrayToBuffer(src);uint8ArrayToBuffer(b).write(srcBuffer.toString("hex"),offset,span,"hex");if(this.length instanceof ExternalLayout){this.length.encode(span,b,offset)}return span}}Layout$1.Blob=Blob;class CString extends Layout{constructor(property){super(-1,property)}getSpan(b,offset=0){checkUint8Array(b);let idx=offset;while(idxb.length){throw new RangeError("encoding overruns Buffer")}const buffer=uint8ArrayToBuffer(b);srcb.copy(buffer,offset);buffer[offset+span]=0;return span+1}}Layout$1.CString=CString;class UTF8 extends Layout{constructor(maxSpan,property){if("string"===typeof maxSpan&&undefined===property){property=maxSpan;maxSpan=undefined}if(undefined===maxSpan){maxSpan=-1}else if(!Number.isInteger(maxSpan)){throw new TypeError("maxSpan must be an integer")}super(-1,property);this.maxSpan=maxSpan}getSpan(b,offset=0){checkUint8Array(b);return b.length-offset}decode(b,offset=0){const span=this.getSpan(b,offset);if(0<=this.maxSpan&&this.maxSpanb.length){throw new RangeError("encoding overruns Buffer")}srcb.copy(uint8ArrayToBuffer(b),offset);return span}}Layout$1.UTF8=UTF8;class Constant extends Layout{constructor(value,property){super(0,property);this.value=value}decode(b,offset){return this.value}encode(src,b,offset){return 0}}Layout$1.Constant=Constant;Layout$1.greedy=(elementSpan,property)=>new GreedyCount(elementSpan,property);var offset=Layout$1.offset=(layout,offset,property)=>new OffsetLayout(layout,offset,property);var u8=Layout$1.u8=property=>new UInt(1,property);var u16=Layout$1.u16=property=>new UInt(2,property);Layout$1.u24=property=>new UInt(3,property);var u32=Layout$1.u32=property=>new UInt(4,property);Layout$1.u40=property=>new UInt(5,property);Layout$1.u48=property=>new UInt(6,property);var nu64=Layout$1.nu64=property=>new NearUInt64(property);Layout$1.u16be=property=>new UIntBE(2,property);Layout$1.u24be=property=>new UIntBE(3,property);Layout$1.u32be=property=>new UIntBE(4,property);Layout$1.u40be=property=>new UIntBE(5,property);Layout$1.u48be=property=>new UIntBE(6,property);Layout$1.nu64be=property=>new NearUInt64BE(property);Layout$1.s8=property=>new Int(1,property);Layout$1.s16=property=>new Int(2,property);Layout$1.s24=property=>new Int(3,property);Layout$1.s32=property=>new Int(4,property);Layout$1.s40=property=>new Int(5,property);Layout$1.s48=property=>new Int(6,property);var ns64=Layout$1.ns64=property=>new NearInt64(property);Layout$1.s16be=property=>new IntBE(2,property);Layout$1.s24be=property=>new IntBE(3,property);Layout$1.s32be=property=>new IntBE(4,property);Layout$1.s40be=property=>new IntBE(5,property);Layout$1.s48be=property=>new IntBE(6,property);Layout$1.ns64be=property=>new NearInt64BE(property);Layout$1.f32=property=>new Float(property);Layout$1.f32be=property=>new FloatBE(property);Layout$1.f64=property=>new Double(property);Layout$1.f64be=property=>new DoubleBE(property);var struct=Layout$1.struct=(fields,property,decodePrefixes)=>new Structure(fields,property,decodePrefixes);Layout$1.bits=(word,msb,property)=>new BitStructure(word,msb,property);var seq=Layout$1.seq=(elementLayout,count,property)=>new Sequence(elementLayout,count,property);Layout$1.union=(discr,defaultLayout,property)=>new Union(discr,defaultLayout,property);Layout$1.unionLayoutDiscriminator=(layout,property)=>new UnionLayoutDiscriminator(layout,property);var blob=Layout$1.blob=(length,property)=>new Blob(length,property);Layout$1.cstr=property=>new CString(property);Layout$1.utf8=(maxSpan,property)=>new UTF8(maxSpan,property);Layout$1.constant=(value,property)=>new Constant(value,property);var PACKET_DATA_SIZE=1280-40-8;var VERSION_PREFIX_MASK=127;var SIGNATURE_LENGTH_IN_BYTES=64;var TransactionExpiredBlockheightExceededError=function(_Error){_inherits(TransactionExpiredBlockheightExceededError,_Error);var _super=_createSuper(TransactionExpiredBlockheightExceededError);function TransactionExpiredBlockheightExceededError(signature){var _this;_classCallCheck(this,TransactionExpiredBlockheightExceededError);_this=_super.call(this,"Signature ".concat(signature," has expired: block height exceeded."));_this.signature=void 0;_this.signature=signature;return _this}return _createClass(TransactionExpiredBlockheightExceededError)}(_wrapNativeSuper(Error));Object.defineProperty(TransactionExpiredBlockheightExceededError.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});var TransactionExpiredTimeoutError=function(_Error2){_inherits(TransactionExpiredTimeoutError,_Error2);var _super2=_createSuper(TransactionExpiredTimeoutError);function TransactionExpiredTimeoutError(signature,timeoutSeconds){var _this2;_classCallCheck(this,TransactionExpiredTimeoutError);_this2=_super2.call(this,"Transaction was not confirmed in ".concat(timeoutSeconds.toFixed(2)," seconds. It is ")+"unknown if it succeeded or failed. Check signature "+"".concat(signature," using the Solana Explorer or CLI tools."));_this2.signature=void 0;_this2.signature=signature;return _this2}return _createClass(TransactionExpiredTimeoutError)}(_wrapNativeSuper(Error));Object.defineProperty(TransactionExpiredTimeoutError.prototype,"name",{value:"TransactionExpiredTimeoutError"});var TransactionExpiredNonceInvalidError=function(_Error3){_inherits(TransactionExpiredNonceInvalidError,_Error3);var _super3=_createSuper(TransactionExpiredNonceInvalidError);function TransactionExpiredNonceInvalidError(signature){var _this3;_classCallCheck(this,TransactionExpiredNonceInvalidError);_this3=_super3.call(this,"Signature ".concat(signature," has expired: the nonce is no longer valid."));_this3.signature=void 0;_this3.signature=signature;return _this3}return _createClass(TransactionExpiredNonceInvalidError)}(_wrapNativeSuper(Error));Object.defineProperty(TransactionExpiredNonceInvalidError.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});var MessageAccountKeys=function(){function MessageAccountKeys(staticAccountKeys,accountKeysFromLookups){_classCallCheck(this,MessageAccountKeys);this.staticAccountKeys=void 0;this.accountKeysFromLookups=void 0;this.staticAccountKeys=staticAccountKeys;this.accountKeysFromLookups=accountKeysFromLookups}_createClass(MessageAccountKeys,[{key:"keySegments",value:function keySegments(){var keySegments=[this.staticAccountKeys];if(this.accountKeysFromLookups){keySegments.push(this.accountKeysFromLookups.writable);keySegments.push(this.accountKeysFromLookups.readonly)}return keySegments}},{key:"get",value:function get(index){var _iterator=_createForOfIteratorHelper(this.keySegments()),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var keySegment=_step.value;if(indexU8_MAX+1){throw new Error("Account index overflow encountered during compilation")}var keyIndexMap=new Map;this.keySegments().flat().forEach((function(key,index){keyIndexMap.set(key.toBase58(),index)}));var findKeyIndex=function findKeyIndex(key){var keyIndex=keyIndexMap.get(key.toBase58());if(keyIndex===undefined)throw new Error("Encountered an unknown instruction account key during compilation");return keyIndex};return instructions.map((function(instruction){return{programIdIndex:findKeyIndex(instruction.programId),accountKeyIndexes:instruction.keys.map((function(meta){return findKeyIndex(meta.pubkey)})),data:instruction.data}}))}}]);return MessageAccountKeys}();var publicKey=function publicKey(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"publicKey";return blob(32,property)};var signature=function signature(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"signature";return blob(64,property)};var rustString=function rustString(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"string";var rsl=struct([u32("length"),u32("lengthPadding"),blob(offset(u32(),-8),"chars")],property);var _decode=rsl.decode.bind(rsl);var _encode=rsl.encode.bind(rsl);var rslShim=rsl;rslShim.decode=function(b,offset){var data=_decode(b,offset);return data["chars"].toString()};rslShim.encode=function(str,b,offset){var data={chars:buffer.Buffer.from(str,"utf8")};return _encode(data,b,offset)};rslShim.alloc=function(str){return u32().span+u32().span+buffer.Buffer.from(str,"utf8").length};return rslShim};var authorized=function authorized(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"authorized";return struct([publicKey("staker"),publicKey("withdrawer")],property)};var lockup=function lockup(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"lockup";return struct([ns64("unixTimestamp"),ns64("epoch"),publicKey("custodian")],property)};var voteInit=function voteInit(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"voteInit";return struct([publicKey("nodePubkey"),publicKey("authorizedVoter"),publicKey("authorizedWithdrawer"),u8("commission")],property)};var voteAuthorizeWithSeedArgs=function voteAuthorizeWithSeedArgs(){var property=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"voteAuthorizeWithSeedArgs";return struct([u32("voteAuthorizationType"),publicKey("currentAuthorityDerivedKeyOwnerPubkey"),rustString("currentAuthorityDerivedKeySeed"),publicKey("newAuthorized")],property)};function getAlloc(type,fields){var getItemAlloc=function getItemAlloc(item){if(item.span>=0){return item.span}else if(typeof item.alloc==="function"){return item.alloc(fields[item.property])}else if("count"in item&&"elementLayout"in item){var field=fields[item.property];if(Array.isArray(field)){return field.length*getItemAlloc(item.elementLayout)}}else if("fields"in item){return getAlloc({layout:item},fields[item.property])}return 0};var alloc=0;type.layout.fields.forEach((function(item){alloc+=getItemAlloc(item)}));return alloc}function decodeLength(bytes){var len=0;var size=0;for(;;){var elem=bytes.shift();len|=(elem&127)<>=7;if(rem_len==0){bytes.push(elem);break}else{elem|=128;bytes.push(elem)}}}function assert$1(condition,message){if(!condition){throw new Error(message||"Assertion failed")}}var CompiledKeys=function(){function CompiledKeys(payer,keyMetaMap){_classCallCheck(this,CompiledKeys);this.payer=void 0;this.keyMetaMap=void 0;this.payer=payer;this.keyMetaMap=keyMetaMap}_createClass(CompiledKeys,[{key:"getMessageComponents",value:function getMessageComponents(){var mapEntries=_toConsumableArray(this.keyMetaMap.entries());assert$1(mapEntries.length<=256,"Max static account keys length exceeded");var writableSigners=mapEntries.filter((function(_ref){var _ref2=_slicedToArray(_ref,2),meta=_ref2[1];return meta.isSigner&&meta.isWritable}));var readonlySigners=mapEntries.filter((function(_ref3){var _ref4=_slicedToArray(_ref3,2),meta=_ref4[1];return meta.isSigner&&!meta.isWritable}));var writableNonSigners=mapEntries.filter((function(_ref5){var _ref6=_slicedToArray(_ref5,2),meta=_ref6[1];return!meta.isSigner&&meta.isWritable}));var readonlyNonSigners=mapEntries.filter((function(_ref7){var _ref8=_slicedToArray(_ref7,2),meta=_ref8[1];return!meta.isSigner&&!meta.isWritable}));var header={numRequiredSignatures:writableSigners.length+readonlySigners.length,numReadonlySignedAccounts:readonlySigners.length,numReadonlyUnsignedAccounts:readonlyNonSigners.length};{assert$1(writableSigners.length>0,"Expected at least one writable signer key");var _writableSigners$=_slicedToArray(writableSigners[0],1),payerAddress=_writableSigners$[0];assert$1(payerAddress===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}var staticAccountKeys=[].concat(_toConsumableArray(writableSigners.map((function(_ref9){var _ref10=_slicedToArray(_ref9,1),address=_ref10[0];return new PublicKey(address)}))),_toConsumableArray(readonlySigners.map((function(_ref11){var _ref12=_slicedToArray(_ref11,1),address=_ref12[0];return new PublicKey(address)}))),_toConsumableArray(writableNonSigners.map((function(_ref13){var _ref14=_slicedToArray(_ref13,1),address=_ref14[0];return new PublicKey(address)}))),_toConsumableArray(readonlyNonSigners.map((function(_ref15){var _ref16=_slicedToArray(_ref15,1),address=_ref16[0];return new PublicKey(address)}))));return[header,staticAccountKeys]}},{key:"extractTableLookup",value:function extractTableLookup(lookupTable){var _this$drainKeysFoundI=this.drainKeysFoundInLookupTable(lookupTable.state.addresses,(function(keyMeta){return!keyMeta.isSigner&&!keyMeta.isInvoked&&keyMeta.isWritable})),_this$drainKeysFoundI2=_slicedToArray(_this$drainKeysFoundI,2),writableIndexes=_this$drainKeysFoundI2[0],drainedWritableKeys=_this$drainKeysFoundI2[1];var _this$drainKeysFoundI3=this.drainKeysFoundInLookupTable(lookupTable.state.addresses,(function(keyMeta){return!keyMeta.isSigner&&!keyMeta.isInvoked&&!keyMeta.isWritable})),_this$drainKeysFoundI4=_slicedToArray(_this$drainKeysFoundI3,2),readonlyIndexes=_this$drainKeysFoundI4[0],drainedReadonlyKeys=_this$drainKeysFoundI4[1];if(writableIndexes.length===0&&readonlyIndexes.length===0){return}return[{accountKey:lookupTable.key,writableIndexes:writableIndexes,readonlyIndexes:readonlyIndexes},{writable:drainedWritableKeys,readonly:drainedReadonlyKeys}]}},{key:"drainKeysFoundInLookupTable",value:function drainKeysFoundInLookupTable(lookupTableEntries,keyMetaFilter){var _this=this;var lookupTableIndexes=new Array;var drainedKeys=new Array;var _iterator=_createForOfIteratorHelper(this.keyMetaMap.entries()),_step;try{var _loop=function _loop(){var _step$value=_slicedToArray(_step.value,2),address=_step$value[0],keyMeta=_step$value[1];if(keyMetaFilter(keyMeta)){var key=new PublicKey(address);var lookupTableIndex=lookupTableEntries.findIndex((function(entry){return entry.equals(key)}));if(lookupTableIndex>=0){assert$1(lookupTableIndex<256,"Max lookup table index exceeded");lookupTableIndexes.push(lookupTableIndex);drainedKeys.push(key);_this.keyMetaMap["delete"](address)}}};for(_iterator.s();!(_step=_iterator.n()).done;){_loop()}}catch(err){_iterator.e(err)}finally{_iterator.f()}return[lookupTableIndexes,drainedKeys]}}],[{key:"compile",value:function compile(instructions,payer){var keyMetaMap=new Map;var getOrInsertDefault=function getOrInsertDefault(pubkey){var address=pubkey.toBase58();var keyMeta=keyMetaMap.get(address);if(keyMeta===undefined){keyMeta={isSigner:false,isWritable:false,isInvoked:false};keyMetaMap.set(address,keyMeta)}return keyMeta};var payerKeyMeta=getOrInsertDefault(payer);payerKeyMeta.isSigner=true;payerKeyMeta.isWritable=true;var _iterator2=_createForOfIteratorHelper(instructions),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var ix=_step2.value;getOrInsertDefault(ix.programId).isInvoked=true;var _iterator3=_createForOfIteratorHelper(ix.keys),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var accountMeta=_step3.value;var _keyMeta=getOrInsertDefault(accountMeta.pubkey);_keyMeta.isSigner||(_keyMeta.isSigner=accountMeta.isSigner);_keyMeta.isWritable||(_keyMeta.isWritable=accountMeta.isWritable)}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}return new CompiledKeys(payer,keyMetaMap)}}]);return CompiledKeys}();var END_OF_BUFFER_ERROR_MESSAGE="Reached end of buffer unexpectedly";function guardedShift(byteArray){if(byteArray.length===0){throw new Error(END_OF_BUFFER_ERROR_MESSAGE)}return byteArray.shift()}function guardedSplice(byteArray){var _args$;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var start=args[0];if(args.length===2?start+((_args$=args[1])!==null&&_args$!==void 0?_args$:0)>byteArray.length:start>=byteArray.length){throw new Error(END_OF_BUFFER_ERROR_MESSAGE)}return byteArray.splice.apply(byteArray,_toConsumableArray(args))}var Message=function(){function Message(args){var _this=this;_classCallCheck(this,Message);this.header=void 0;this.accountKeys=void 0;this.recentBlockhash=void 0;this.instructions=void 0;this.indexToProgramIds=new Map;this.header=args.header;this.accountKeys=args.accountKeys.map((function(account){return new PublicKey(account)}));this.recentBlockhash=args.recentBlockhash;this.instructions=args.instructions;this.instructions.forEach((function(ix){return _this.indexToProgramIds.set(ix.programIdIndex,_this.accountKeys[ix.programIdIndex])}))}_createClass(Message,[{key:"version",get:function get(){return"legacy"}},{key:"staticAccountKeys",get:function get(){return this.accountKeys}},{key:"compiledInstructions",get:function get(){return this.instructions.map((function(ix){return{programIdIndex:ix.programIdIndex,accountKeyIndexes:ix.accounts,data:bs58$1.decode(ix.data)}}))}},{key:"addressTableLookups",get:function get(){return[]}},{key:"getAccountKeys",value:function getAccountKeys(){return new MessageAccountKeys(this.staticAccountKeys)}},{key:"isAccountSigner",value:function isAccountSigner(index){return index=this.header.numRequiredSignatures){var unsignedAccountIndex=index-numSignedAccounts;var numUnsignedAccounts=this.accountKeys.length-numSignedAccounts;var numWritableUnsignedAccounts=numUnsignedAccounts-this.header.numReadonlyUnsignedAccounts;return unsignedAccountIndex0){throw new Error("Failed to get account keys because address table lookups were not resolved")}return new MessageAccountKeys(this.staticAccountKeys,accountKeysFromLookups)}},{key:"isAccountSigner",value:function isAccountSigner(index){return index=numStaticAccountKeys){var lookupAccountKeysIndex=index-numStaticAccountKeys;var numWritableLookupAccountKeys=this.addressTableLookups.reduce((function(count,lookup){return count+lookup.writableIndexes.length}),0);return lookupAccountKeysIndex=this.header.numRequiredSignatures){var unsignedAccountIndex=index-numSignedAccounts;var numUnsignedAccounts=numStaticAccountKeys-numSignedAccounts;var numWritableUnsignedAccounts=numUnsignedAccounts-this.header.numReadonlyUnsignedAccounts;return unsignedAccountIndex0){return this.signatures[0].signature}return null}},{key:"toJSON",value:function toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map((function(instruction){return instruction.toJSON()})),signers:this.signatures.map((function(_ref5){var publicKey=_ref5.publicKey;return publicKey.toJSON()}))}}},{key:"add",value:function add(){var _this=this;for(var _len=arguments.length,items=new Array(_len),_key=0;_key<_len;_key++){items[_key]=arguments[_key]}if(items.length===0){throw new Error("No instructions")}items.forEach((function(item){if("instructions"in item){_this.instructions=_this.instructions.concat(item.instructions)}else if("data"in item&&"programId"in item&&"keys"in item){_this.instructions.push(item)}else{_this.instructions.push(new TransactionInstruction(item))}}));return this}},{key:"compileMessage",value:function compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json)){return this._message}var recentBlockhash;var instructions;if(this.nonceInfo){recentBlockhash=this.nonceInfo.nonce;if(this.instructions[0]!=this.nonceInfo.nonceInstruction){instructions=[this.nonceInfo.nonceInstruction].concat(_toConsumableArray(this.instructions))}else{instructions=this.instructions}}else{recentBlockhash=this.recentBlockhash;instructions=this.instructions}if(!recentBlockhash){throw new Error("Transaction recentBlockhash required")}if(instructions.length<1){console.warn("No instructions provided")}var feePayer;if(this.feePayer){feePayer=this.feePayer}else if(this.signatures.length>0&&this.signatures[0].publicKey){feePayer=this.signatures[0].publicKey}else{throw new Error("Transaction fee payer required")}for(var i=0;i-1){uniqueMetas[uniqueIndex].isWritable=uniqueMetas[uniqueIndex].isWritable||accountMeta.isWritable;uniqueMetas[uniqueIndex].isSigner=uniqueMetas[uniqueIndex].isSigner||accountMeta.isSigner}else{uniqueMetas.push(accountMeta)}}));uniqueMetas.sort((function(x,y){if(x.isSigner!==y.isSigner){return x.isSigner?-1:1}if(x.isWritable!==y.isWritable){return x.isWritable?-1:1}var options={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:false,numeric:false,caseFirst:"lower"};return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58(),"en",options)}));var feePayerIndex=uniqueMetas.findIndex((function(x){return x.pubkey.equals(feePayer)}));if(feePayerIndex>-1){var _uniqueMetas$splice=uniqueMetas.splice(feePayerIndex,1),_uniqueMetas$splice2=_slicedToArray(_uniqueMetas$splice,1),payerMeta=_uniqueMetas$splice2[0];payerMeta.isSigner=true;payerMeta.isWritable=true;uniqueMetas.unshift(payerMeta)}else{uniqueMetas.unshift({pubkey:feePayer,isSigner:true,isWritable:true})}var _iterator=_createForOfIteratorHelper(this.signatures),_step;try{var _loop=function _loop(){var signature=_step.value;var uniqueIndex=uniqueMetas.findIndex((function(x){return x.pubkey.equals(signature.publicKey)}));if(uniqueIndex>-1){if(!uniqueMetas[uniqueIndex].isSigner){uniqueMetas[uniqueIndex].isSigner=true;console.warn("Transaction references a signature that is unnecessary, "+"only the fee payer and instruction signer accounts should sign a transaction. "+"This behavior is deprecated and will throw an error in the next major version release.")}}else{throw new Error("unknown signer: ".concat(signature.publicKey.toString()))}};for(_iterator.s();!(_step=_iterator.n()).done;){_loop()}}catch(err){_iterator.e(err)}finally{_iterator.f()}var numRequiredSignatures=0;var numReadonlySignedAccounts=0;var numReadonlyUnsignedAccounts=0;var signedKeys=[];var unsignedKeys=[];uniqueMetas.forEach((function(_ref6){var pubkey=_ref6.pubkey,isSigner=_ref6.isSigner,isWritable=_ref6.isWritable;if(isSigner){signedKeys.push(pubkey.toString());numRequiredSignatures+=1;if(!isWritable){numReadonlySignedAccounts+=1}}else{unsignedKeys.push(pubkey.toString());if(!isWritable){numReadonlyUnsignedAccounts+=1}}}));var accountKeys=signedKeys.concat(unsignedKeys);var compiledInstructions=instructions.map((function(instruction){var data=instruction.data,programId=instruction.programId;return{programIdIndex:accountKeys.indexOf(programId.toString()),accounts:instruction.keys.map((function(meta){return accountKeys.indexOf(meta.pubkey.toString())})),data:bs58$1.encode(data)}}));compiledInstructions.forEach((function(instruction){assert$1(instruction.programIdIndex>=0);instruction.accounts.forEach((function(keyIndex){return assert$1(keyIndex>=0)}))}));return new Message({header:{numRequiredSignatures:numRequiredSignatures,numReadonlySignedAccounts:numReadonlySignedAccounts,numReadonlyUnsignedAccounts:numReadonlyUnsignedAccounts},accountKeys:accountKeys,recentBlockhash:recentBlockhash,instructions:compiledInstructions})}},{key:"_compile",value:function _compile(){var message=this.compileMessage();var signedKeys=message.accountKeys.slice(0,message.header.numRequiredSignatures);if(this.signatures.length===signedKeys.length){var valid=this.signatures.every((function(pair,index){return signedKeys[index].equals(pair.publicKey)}));if(valid)return message}this.signatures=signedKeys.map((function(publicKey){return{signature:null,publicKey:publicKey}}));return message}},{key:"serializeMessage",value:function serializeMessage(){return this._compile().serialize()}},{key:"getEstimatedFee",value:function(){var _getEstimatedFee=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(connection){return _regeneratorRuntime().wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return connection.getFeeForMessage(this.compileMessage());case 2:return _context.abrupt("return",_context.sent.value);case 3:case"end":return _context.stop()}}),_callee,this)})));function getEstimatedFee(_x){return _getEstimatedFee.apply(this,arguments)}return getEstimatedFee}()},{key:"setSigners",value:function setSigners(){for(var _len2=arguments.length,signers=new Array(_len2),_key2=0;_key2<_len2;_key2++){signers[_key2]=arguments[_key2]}if(signers.length===0){throw new Error("No signers")}var seen=new Set;this.signatures=signers.filter((function(publicKey){var key=publicKey.toString();if(seen.has(key)){return false}else{seen.add(key);return true}})).map((function(publicKey){return{signature:null,publicKey:publicKey}}))}},{key:"sign",value:function sign(){for(var _len3=arguments.length,signers=new Array(_len3),_key3=0;_key3<_len3;_key3++){signers[_key3]=arguments[_key3]}if(signers.length===0){throw new Error("No signers")}var seen=new Set;var uniqueSigners=[];for(var _i=0,_signers=signers;_i<_signers.length;_i++){var signer=_signers[_i];var key=signer.publicKey.toString();if(seen.has(key)){continue}else{seen.add(key);uniqueSigners.push(signer)}}this.signatures=uniqueSigners.map((function(signer){return{signature:null,publicKey:signer.publicKey}}));var message=this._compile();this._partialSign.apply(this,[message].concat(uniqueSigners))}},{key:"partialSign",value:function partialSign(){for(var _len4=arguments.length,signers=new Array(_len4),_key4=0;_key4<_len4;_key4++){signers[_key4]=arguments[_key4]}if(signers.length===0){throw new Error("No signers")}var seen=new Set;var uniqueSigners=[];for(var _i2=0,_signers2=signers;_i2<_signers2.length;_i2++){var signer=_signers2[_i2];var key=signer.publicKey.toString();if(seen.has(key)){continue}else{seen.add(key);uniqueSigners.push(signer)}}var message=this._compile();this._partialSign.apply(this,[message].concat(uniqueSigners))}},{key:"_partialSign",value:function _partialSign(message){var _this2=this;var signData=message.serialize();for(var _len5=arguments.length,signers=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++){signers[_key5-1]=arguments[_key5]}signers.forEach((function(signer){var signature=sign(signData,signer.secretKey);_this2._addSignature(signer.publicKey,toBuffer(signature))}))}},{key:"addSignature",value:function addSignature(pubkey,signature){this._compile();this._addSignature(pubkey,signature)}},{key:"_addSignature",value:function _addSignature(pubkey,signature){assert$1(signature.length===64);var index=this.signatures.findIndex((function(sigpair){return pubkey.equals(sigpair.publicKey)}));if(index<0){throw new Error("unknown signer: ".concat(pubkey.toString()))}this.signatures[index].signature=buffer.Buffer.from(signature)}},{key:"verifySignatures",value:function verifySignatures(requireAllSignatures){return this._verifySignatures(this.serializeMessage(),requireAllSignatures===undefined?true:requireAllSignatures)}},{key:"_verifySignatures",value:function _verifySignatures(signData,requireAllSignatures){var _iterator2=_createForOfIteratorHelper(this.signatures),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _step2$value=_step2.value,signature=_step2$value.signature,publicKey=_step2$value.publicKey;if(signature===null){if(requireAllSignatures){return false}}else{if(!verify(signature,signData,publicKey.toBytes())){return false}}}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}return true}},{key:"serialize",value:function serialize(config){var _Object$assign=Object.assign({requireAllSignatures:true,verifySignatures:true},config),requireAllSignatures=_Object$assign.requireAllSignatures,verifySignatures=_Object$assign.verifySignatures;var signData=this.serializeMessage();if(verifySignatures&&!this._verifySignatures(signData,requireAllSignatures)){throw new Error("Signature verification failed")}return this._serialize(signData)}},{key:"_serialize",value:function _serialize(signData){var signatures=this.signatures;var signatureCount=[];encodeLength(signatureCount,signatures.length);var transactionLength=signatureCount.length+signatures.length*64+signData.length;var wireTransaction=buffer.Buffer.alloc(transactionLength);assert$1(signatures.length<256);buffer.Buffer.from(signatureCount).copy(wireTransaction,0);signatures.forEach((function(_ref7,index){var signature=_ref7.signature;if(signature!==null){assert$1(signature.length===64,"signature has invalid length");buffer.Buffer.from(signature).copy(wireTransaction,signatureCount.length+index*64)}}));signData.copy(wireTransaction,signatureCount.length+signatures.length*64);assert$1(wireTransaction.length<=PACKET_DATA_SIZE,"Transaction too large: ".concat(wireTransaction.length," > ").concat(PACKET_DATA_SIZE));return wireTransaction}},{key:"keys",get:function get(){assert$1(this.instructions.length===1);return this.instructions[0].keys.map((function(keyObj){return keyObj.pubkey}))}},{key:"programId",get:function get(){assert$1(this.instructions.length===1);return this.instructions[0].programId}},{key:"data",get:function get(){assert$1(this.instructions.length===1);return this.instructions[0].data}}],[{key:"from",value:function from(buffer$1){var byteArray=_toConsumableArray(buffer$1);var signatureCount=decodeLength(byteArray);var signatures=[];for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:[];var transaction=new Transaction;transaction.recentBlockhash=message.recentBlockhash;if(message.header.numRequiredSignatures>0){transaction.feePayer=message.accountKeys[0]}signatures.forEach((function(signature,index){var sigPubkeyPair={signature:signature==bs58$1.encode(DEFAULT_SIGNATURE)?null:bs58$1.decode(signature),publicKey:message.accountKeys[index]};transaction.signatures.push(sigPubkeyPair)}));message.instructions.forEach((function(instruction){var keys=instruction.accounts.map((function(account){var pubkey=message.accountKeys[account];return{pubkey:pubkey,isSigner:transaction.signatures.some((function(keyObj){return keyObj.publicKey.toString()===pubkey.toString()}))||message.isAccountSigner(account),isWritable:message.isAccountWritable(account)}}));transaction.instructions.push(new TransactionInstruction({keys:keys,programId:message.accountKeys[instruction.programIdIndex],data:bs58$1.decode(instruction.data)}))}));transaction._message=message;transaction._json=transaction.toJSON();return transaction}}]);return Transaction}();var TransactionMessage=function(){function TransactionMessage(args){_classCallCheck(this,TransactionMessage);this.payerKey=void 0;this.instructions=void 0;this.recentBlockhash=void 0;this.payerKey=args.payerKey;this.instructions=args.instructions;this.recentBlockhash=args.recentBlockhash}_createClass(TransactionMessage,[{key:"compileToLegacyMessage",value:function compileToLegacyMessage(){return Message.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions})}},{key:"compileToV0Message",value:function compileToV0Message(addressLookupTableAccounts){return MessageV0.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions,addressLookupTableAccounts:addressLookupTableAccounts})}}],[{key:"decompile",value:function decompile(message,args){var header=message.header,compiledInstructions=message.compiledInstructions,recentBlockhash=message.recentBlockhash;var numRequiredSignatures=header.numRequiredSignatures,numReadonlySignedAccounts=header.numReadonlySignedAccounts,numReadonlyUnsignedAccounts=header.numReadonlyUnsignedAccounts;var numWritableSignedAccounts=numRequiredSignatures-numReadonlySignedAccounts;assert$1(numWritableSignedAccounts>0,"Message header is invalid");var numWritableUnsignedAccounts=message.staticAccountKeys.length-numRequiredSignatures-numReadonlyUnsignedAccounts;assert$1(numWritableUnsignedAccounts>=0,"Message header is invalid");var accountKeys=message.getAccountKeys(args);var payerKey=accountKeys.get(0);if(payerKey===undefined){throw new Error("Failed to decompile message because no account keys were found")}var instructions=[];var _iterator=_createForOfIteratorHelper(compiledInstructions),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var compiledIx=_step.value;var keys=[];var _iterator2=_createForOfIteratorHelper(compiledIx.accountKeyIndexes),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var keyIndex=_step2.value;var pubkey=accountKeys.get(keyIndex);if(pubkey===undefined){throw new Error("Failed to find key for account key index ".concat(keyIndex))}var isSigner=keyIndex=0,"Cannot sign with non signer key ".concat(signer.publicKey.toBase58()));_this.signatures[signerIndex]=sign(messageData,signer.secretKey)};for(_iterator.s();!(_step=_iterator.n()).done;){_loop()}}catch(err){_iterator.e(err)}finally{_iterator.f()}}},{key:"addSignature",value:function addSignature(publicKey,signature){assert$1(signature.byteLength===64,"Signature must be 64 bytes long");var signerPubkeys=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);var signerIndex=signerPubkeys.findIndex((function(pubkey){return pubkey.equals(publicKey)}));assert$1(signerIndex>=0,"Can not add signature; `".concat(publicKey.toBase58(),"` is not required to sign this transaction"));this.signatures[signerIndex]=signature}}],[{key:"deserialize",value:function deserialize(serializedTransaction){var byteArray=_toConsumableArray(serializedTransaction);var signatures=[];var signaturesLength=decodeLength(byteArray);for(var i=0;i=0?type.layout.span:getAlloc(type,fields);var data=buffer.Buffer.alloc(allocLength);var layoutFields=Object.assign({instruction:type.index},fields);type.layout.encode(layoutFields,data);return data}function decodeData$1(type,buffer){var data;try{data=type.layout.decode(buffer)}catch(err){throw new Error("invalid instruction; "+err)}if(data.instruction!==type.index){throw new Error("invalid instruction; instruction index mismatch ".concat(data.instruction," != ").concat(type.index))}return data}var FeeCalculatorLayout=nu64("lamportsPerSignature");var NonceAccountLayout=struct([u32("version"),u32("state"),publicKey("authorizedPubkey"),publicKey("nonce"),struct([FeeCalculatorLayout],"feeCalculator")]);var NONCE_ACCOUNT_LENGTH=NonceAccountLayout.span;var NonceAccount=function(){function NonceAccount(args){_classCallCheck(this,NonceAccount);this.authorizedPubkey=void 0;this.nonce=void 0;this.feeCalculator=void 0;this.authorizedPubkey=args.authorizedPubkey;this.nonce=args.nonce;this.feeCalculator=args.feeCalculator}_createClass(NonceAccount,null,[{key:"fromAccountData",value:function fromAccountData(buffer){var nonceAccount=NonceAccountLayout.decode(toBuffer(buffer),0);return new NonceAccount({authorizedPubkey:new PublicKey(nonceAccount.authorizedPubkey),nonce:new PublicKey(nonceAccount.nonce).toString(),feeCalculator:nonceAccount.feeCalculator})}}]);return NonceAccount}();var browser$1={};Object.defineProperty(browser$1,"__esModule",{value:true});function toBigIntLE(buf){{const reversed=Buffer.from(buf);reversed.reverse();const hex=reversed.toString("hex");if(hex.length===0){return BigInt(0)}return BigInt(`0x${hex}`)}}var toBigIntLE_1=browser$1.toBigIntLE=toBigIntLE;function toBigIntBE(buf){{const hex=buf.toString("hex");if(hex.length===0){return BigInt(0)}return BigInt(`0x${hex}`)}}browser$1.toBigIntBE=toBigIntBE;function toBufferLE(num,width){{const hex=num.toString(16);const buffer=Buffer.from(hex.padStart(width*2,"0").slice(0,width*2),"hex");buffer.reverse();return buffer}}var toBufferLE_1=browser$1.toBufferLE=toBufferLE;function toBufferBE(num,width){{const hex=num.toString(16);return Buffer.from(hex.padStart(width*2,"0").slice(0,width*2),"hex")}}browser$1.toBufferBE=toBufferBE;var encodeDecode=function encodeDecode(layout){var decode=layout.decode.bind(layout);var encode=layout.encode.bind(layout);return{decode:decode,encode:encode}};var bigInt=function bigInt(length){return function(property){var layout=blob(length,property);var _encodeDecode=encodeDecode(layout),encode=_encodeDecode.encode,decode=_encodeDecode.decode;var bigIntLayout=layout;bigIntLayout.decode=function(buffer$1,offset){var src=decode(buffer$1,offset);return toBigIntLE_1(buffer.Buffer.from(src))};bigIntLayout.encode=function(bigInt,buffer,offset){var src=toBufferLE_1(bigInt,length);return encode(src,buffer,offset)};return bigIntLayout}};var u64$2=bigInt(8);var SystemInstruction=function(){function SystemInstruction(){_classCallCheck(this,SystemInstruction)}_createClass(SystemInstruction,null,[{key:"decodeInstructionType",value:function decodeInstructionType(instruction){this.checkProgramId(instruction.programId);var instructionTypeLayout=u32("instruction");var typeIndex=instructionTypeLayout.decode(instruction.data);var type;for(var _i=0,_Object$entries=Object.entries(SYSTEM_INSTRUCTION_LAYOUTS);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),ixType=_Object$entries$_i[0],layout=_Object$entries$_i[1];if(layout.index==typeIndex){type=ixType;break}}if(!type){throw new Error("Instruction type incorrect; not a SystemInstruction")}return type}},{key:"decodeCreateAccount",value:function decodeCreateAccount(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Create,instruction.data),lamports=_decodeData.lamports,space=_decodeData.space,programId=_decodeData.programId;return{fromPubkey:instruction.keys[0].pubkey,newAccountPubkey:instruction.keys[1].pubkey,lamports:lamports,space:space,programId:new PublicKey(programId)}}},{key:"decodeTransfer",value:function decodeTransfer(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData2=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Transfer,instruction.data),lamports=_decodeData2.lamports;return{fromPubkey:instruction.keys[0].pubkey,toPubkey:instruction.keys[1].pubkey,lamports:lamports}}},{key:"decodeTransferWithSeed",value:function decodeTransferWithSeed(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);var _decodeData3=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,instruction.data),lamports=_decodeData3.lamports,seed=_decodeData3.seed,programId=_decodeData3.programId;return{fromPubkey:instruction.keys[0].pubkey,basePubkey:instruction.keys[1].pubkey,toPubkey:instruction.keys[2].pubkey,lamports:lamports,seed:seed,programId:new PublicKey(programId)}}},{key:"decodeAllocate",value:function decodeAllocate(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,1);var _decodeData4=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Allocate,instruction.data),space=_decodeData4.space;return{accountPubkey:instruction.keys[0].pubkey,space:space}}},{key:"decodeAllocateWithSeed",value:function decodeAllocateWithSeed(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,1);var _decodeData5=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,instruction.data),base=_decodeData5.base,seed=_decodeData5.seed,space=_decodeData5.space,programId=_decodeData5.programId;return{accountPubkey:instruction.keys[0].pubkey,basePubkey:new PublicKey(base),seed:seed,space:space,programId:new PublicKey(programId)}}},{key:"decodeAssign",value:function decodeAssign(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,1);var _decodeData6=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Assign,instruction.data),programId=_decodeData6.programId;return{accountPubkey:instruction.keys[0].pubkey,programId:new PublicKey(programId)}}},{key:"decodeAssignWithSeed",value:function decodeAssignWithSeed(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,1);var _decodeData7=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,instruction.data),base=_decodeData7.base,seed=_decodeData7.seed,programId=_decodeData7.programId;return{accountPubkey:instruction.keys[0].pubkey,basePubkey:new PublicKey(base),seed:seed,programId:new PublicKey(programId)}}},{key:"decodeCreateWithSeed",value:function decodeCreateWithSeed(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData8=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,instruction.data),base=_decodeData8.base,seed=_decodeData8.seed,lamports=_decodeData8.lamports,space=_decodeData8.space,programId=_decodeData8.programId;return{fromPubkey:instruction.keys[0].pubkey,newAccountPubkey:instruction.keys[1].pubkey,basePubkey:new PublicKey(base),seed:seed,lamports:lamports,space:space,programId:new PublicKey(programId)}}},{key:"decodeNonceInitialize",value:function decodeNonceInitialize(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);var _decodeData9=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,instruction.data),authorized=_decodeData9.authorized;return{noncePubkey:instruction.keys[0].pubkey,authorizedPubkey:new PublicKey(authorized)}}},{key:"decodeNonceAdvance",value:function decodeNonceAdvance(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,instruction.data);return{noncePubkey:instruction.keys[0].pubkey,authorizedPubkey:instruction.keys[2].pubkey}}},{key:"decodeNonceWithdraw",value:function decodeNonceWithdraw(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,5);var _decodeData10=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,instruction.data),lamports=_decodeData10.lamports;return{noncePubkey:instruction.keys[0].pubkey,toPubkey:instruction.keys[1].pubkey,authorizedPubkey:instruction.keys[4].pubkey,lamports:lamports}}},{key:"decodeNonceAuthorize",value:function decodeNonceAuthorize(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData11=decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,instruction.data),authorized=_decodeData11.authorized;return{noncePubkey:instruction.keys[0].pubkey,authorizedPubkey:instruction.keys[1].pubkey,newAuthorizedPubkey:new PublicKey(authorized)}}},{key:"checkProgramId",value:function checkProgramId(programId){if(!programId.equals(SystemProgram.programId)){throw new Error("invalid instruction; programId is not SystemProgram")}}},{key:"checkKeyLength",value:function checkKeyLength(keys,expectedLength){if(keys.length0?balanceNeeded:1,space:data.length,programId:programId}));case 17:if(!(transaction!==null)){_context.next=20;break}_context.next=20;return sendAndConfirmTransaction(connection,transaction,[payer,program],{commitment:"confirmed"});case 20:dataLayout=struct([u32("instruction"),u32("offset"),u32("bytesLength"),u32("bytesLengthPadding"),seq(u8("byte"),offset(u32(),-8),"bytes")]);chunkSize=Loader.chunkSize;offset$1=0;array=data;transactions=[];case 25:if(!(array.length>0)){_context.next=39;break}bytes=array.slice(0,chunkSize);_data=buffer.Buffer.alloc(chunkSize+16);dataLayout.encode({instruction:0,offset:offset$1,bytes:bytes,bytesLength:0,bytesLengthPadding:0},_data);_transaction=(new Transaction).add({keys:[{pubkey:program.publicKey,isSigner:true,isWritable:true}],programId:programId,data:_data});transactions.push(sendAndConfirmTransaction(connection,_transaction,[payer,program],{commitment:"confirmed"}));if(!connection._rpcEndpoint.includes("solana.com")){_context.next=35;break}REQUESTS_PER_SECOND=4;_context.next=35;return sleep(1e3/REQUESTS_PER_SECOND);case 35:offset$1+=chunkSize;array=array.slice(chunkSize);_context.next=25;break;case 39:_context.next=41;return Promise.all(transactions);case 41:_dataLayout=struct([u32("instruction")]);_data2=buffer.Buffer.alloc(_dataLayout.span);_dataLayout.encode({instruction:1},_data2);_transaction2=(new Transaction).add({keys:[{pubkey:program.publicKey,isSigner:true,isWritable:true},{pubkey:SYSVAR_RENT_PUBKEY,isSigner:false,isWritable:false}],programId:programId,data:_data2});deployCommitment="processed";_context.next=48;return connection.sendTransaction(_transaction2,[payer,program],{preflightCommitment:deployCommitment});case 48:finalizeSignature=_context.sent;_context.next=51;return connection.confirmTransaction({signature:finalizeSignature,lastValidBlockHeight:_transaction2.lastValidBlockHeight,blockhash:_transaction2.recentBlockhash},deployCommitment);case 51:_yield$connection$con=_context.sent;context=_yield$connection$con.context;value=_yield$connection$con.value;if(!value.err){_context.next=56;break}throw new Error("Transaction ".concat(finalizeSignature," failed (").concat(JSON.stringify(value),")"));case 56:_context.prev=57;_context.next=60;return connection.getSlot({commitment:deployCommitment});case 60:currentSlot=_context.sent;if(!(currentSlot>context.slot)){_context.next=63;break}return _context.abrupt("break",71);case 63:_context.next=67;break;case 65:_context.prev=65;_context.t0=_context["catch"](57);case 67:_context.next=69;return new Promise((function(resolve){return setTimeout(resolve,Math.round(MS_PER_SLOT/2))}));case 69:_context.next=56;break;case 71:return _context.abrupt("return",true);case 72:case"end":return _context.stop()}}),_callee,null,[[57,65]])})));function load(_x,_x2,_x3,_x4,_x5){return _load.apply(this,arguments)}return load}()}]);return Loader}();Loader.chunkSize=CHUNK_SIZE;var BPF_LOADER_PROGRAM_ID=new PublicKey("BPFLoader2111111111111111111111111111111111");var BpfLoader=function(){function BpfLoader(){_classCallCheck(this,BpfLoader)}_createClass(BpfLoader,null,[{key:"getMinNumSignatures",value:function getMinNumSignatures(dataLength){return Loader.getMinNumSignatures(dataLength)}},{key:"load",value:function load(connection,payer,program,elf,loaderProgramId){return Loader.load(connection,payer,program,loaderProgramId,elf)}}]);return BpfLoader}();var objToString=Object.prototype.toString;var objKeys=Object.keys||function(obj){var keys=[];for(var name in obj){keys.push(name)}return keys};function stringify$1(val,isArrayProp){var i,max,str,keys,key,propVal,toStr;if(val===true){return"true"}if(val===false){return"false"}switch(typeof val){case"object":if(val===null){return null}else if(val.toJSON&&typeof val.toJSON==="function"){return stringify$1(val.toJSON(),isArrayProp)}else{toStr=objToString.call(val);if(toStr==="[object Array]"){str="[";max=val.length-1;for(i=0;i-1){str+=stringify$1(val[i],true)}return str+"]"}else if(toStr==="[object Object]"){keys=objKeys(val).sort();max=keys.length;str="";i=0;while(i{var _cached;return(_cached=cached)!=null?_cached:cached=[failure,...failures()]}}}function isIterable(x){return isObject(x)&&typeof x[Symbol.iterator]==="function"}function isObject(x){return typeof x==="object"&&x!=null}function print(value){return typeof value==="string"?JSON.stringify(value):""+value}function shiftIterator(input){const{done:done,value:value}=input.next();return done?undefined:value}function toFailure(result,context,struct,value){if(result===true){return}else if(result===false){result={}}else if(typeof result==="string"){result={message:result}}const{path:path,branch:branch}=context;const{type:type}=struct;const{refinement:refinement,message:message="Expected a value of type `"+type+"`"+(refinement?" with refinement `"+refinement+"`":"")+", but received: `"+print(value)+"`"}=result;return{value:value,type:type,refinement:refinement,key:path[path.length-1],path:path,branch:branch,...result,message:message}}function*toFailures(result,context,struct,value){if(!isIterable(result)){result=[result]}for(const r of result){const failure=toFailure(r,context,struct,value);if(failure){yield failure}}}function*run(value,struct,options={}){const{path:path=[],branch:branch=[value],coerce:coerce=false,mask:mask=false}=options;const ctx={path:path,branch:branch};if(coerce){value=struct.coercer(value,ctx);if(mask&&struct.type!=="type"&&isObject(struct.schema)&&isObject(value)&&!Array.isArray(value)){for(const key in value){if(struct.schema[key]===undefined){delete value[key]}}}}let valid=true;for(const failure of struct.validator(value,ctx)){valid=false;yield[failure,undefined]}for(let[k,v,s]of struct.entries(value,ctx)){const ts=run(v,s,{path:k===undefined?path:[...path,k],branch:k===undefined?branch:[...branch,v],coerce:coerce,mask:mask});for(const t of ts){if(t[0]){valid=false;yield[t[0],undefined]}else if(coerce){v=t[1];if(k===undefined){value=v}else if(value instanceof Map){value.set(k,v)}else if(value instanceof Set){value.add(v)}else if(isObject(value)){value[k]=v}}}}if(valid){for(const failure of struct.refiner(value,ctx)){valid=false;yield[failure,undefined]}}if(valid){yield[undefined,value]}}class Struct{constructor(props){const{type:type,schema:schema,validator:validator,refiner:refiner,coercer:coercer=(value=>value),entries:entries=function*(){}}=props;this.type=type;this.schema=schema;this.entries=entries;this.coercer=coercer;if(validator){this.validator=(value,context)=>{const result=validator(value,context);return toFailures(result,context,this,value)}}else{this.validator=()=>[]}if(refiner){this.refiner=(value,context)=>{const result=refiner(value,context);return toFailures(result,context,this,value)}}else{this.refiner=()=>[]}}assert(value){return assert(value,this)}create(value){return create(value,this)}is(value){return is(value,this)}mask(value){return mask(value,this)}validate(value,options={}){return validate$1(value,this,options)}}function assert(value,struct){const result=validate$1(value,struct);if(result[0]){throw result[0]}}function create(value,struct){const result=validate$1(value,struct,{coerce:true});if(result[0]){throw result[0]}else{return result[1]}}function mask(value,struct){const result=validate$1(value,struct,{coerce:true,mask:true});if(result[0]){throw result[0]}else{return result[1]}}function is(value,struct){const result=validate$1(value,struct);return!result[0]}function validate$1(value,struct,options={}){const tuples=run(value,struct,options);const tuple=shiftIterator(tuples);if(tuple[0]){const error=new StructError(tuple[0],(function*(){for(const t of tuples){if(t[0]){yield t[0]}}}));return[error,undefined]}else{const v=tuple[1];return[undefined,v]}}function define(name,validator){return new Struct({type:name,schema:null,validator:validator})}function any(){return define("any",(()=>true))}function array(Element){return new Struct({type:"array",schema:Element,*entries(value){if(Element&&Array.isArray(value)){for(const[i,v]of value.entries()){yield[i,v,Element]}}},coercer(value){return Array.isArray(value)?value.slice():value},validator(value){return Array.isArray(value)||"Expected an array value, but received: "+print(value)}})}function boolean(){return define("boolean",(value=>typeof value==="boolean"))}function instance(Class){return define("instance",(value=>value instanceof Class||"Expected a `"+Class.name+"` instance, but received: "+print(value)))}function literal(constant){const description=print(constant);const t=typeof constant;return new Struct({type:"literal",schema:t==="string"||t==="number"||t==="boolean"?constant:null,validator(value){return value===constant||"Expected the literal `"+description+"`, but received: "+print(value)}})}function never(){return define("never",(()=>false))}function nullable(struct){return new Struct({...struct,validator:(value,ctx)=>value===null||struct.validator(value,ctx),refiner:(value,ctx)=>value===null||struct.refiner(value,ctx)})}function number(){return define("number",(value=>typeof value==="number"&&!isNaN(value)||"Expected a number, but received: "+print(value)))}function optional(struct){return new Struct({...struct,validator:(value,ctx)=>value===undefined||struct.validator(value,ctx),refiner:(value,ctx)=>value===undefined||struct.refiner(value,ctx)})}function record(Key,Value){return new Struct({type:"record",schema:null,*entries(value){if(isObject(value)){for(const k in value){const v=value[k];yield[k,k,Key];yield[k,v,Value]}}},validator(value){return isObject(value)||"Expected an object, but received: "+print(value)}})}function string(){return define("string",(value=>typeof value==="string"||"Expected a string, but received: "+print(value)))}function tuple(Elements){const Never=never();return new Struct({type:"tuple",schema:null,*entries(value){if(Array.isArray(value)){const length=Math.max(Elements.length,value.length);for(let i=0;is.type)).join(" | ");return new Struct({type:"union",schema:null,validator(value,ctx){const failures=[];for(const S of Structs){const[...tuples]=run(value,S,ctx);const[first]=tuples;if(!first[0]){return[]}else{for(const[failure]of tuples){if(failure){failures.push(failure)}}}}return["Expected the value to satisfy a union of `"+description+"`, but received: "+print(value),...failures]}})}function unknown(){return define("unknown",(()=>true))}function coerce(struct,condition,coercer){return new Struct({...struct,coercer:(value,ctx)=>is(value,condition)?struct.coercer(coercer(value,ctx),ctx):struct.coercer(value,ctx)})}var getRandomValues;var rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){getRandomValues=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=="undefined"&&typeof msCrypto.getRandomValues==="function"&&msCrypto.getRandomValues.bind(msCrypto);if(!getRandomValues){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return getRandomValues(rnds8)}var REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(uuid){return typeof uuid==="string"&®EX.test(uuid)}var byteToHex=[];for(var i=0;i<256;++i){byteToHex.push((i+256).toString(16).substr(1))}function stringify(arr){var offset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var uuid=(byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+"-"+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+"-"+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+"-"+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+"-"+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase();if(!validate(uuid)){throw TypeError("Stringified UUID is invalid")}return uuid}var _nodeId;var _clockseq;var _lastMSecs=0;var _lastNSecs=0;function v1(options,buf,offset){var i=buf&&offset||0;var b=buf||new Array(16);options=options||{};var node=options.node||_nodeId;var clockseq=options.clockseq!==undefined?options.clockseq:_clockseq;if(node==null||clockseq==null){var seedBytes=options.random||(options.rng||rng)();if(node==null){node=_nodeId=[seedBytes[0]|1,seedBytes[1],seedBytes[2],seedBytes[3],seedBytes[4],seedBytes[5]]}if(clockseq==null){clockseq=_clockseq=(seedBytes[6]<<8|seedBytes[7])&16383}}var msecs=options.msecs!==undefined?options.msecs:Date.now();var nsecs=options.nsecs!==undefined?options.nsecs:_lastNSecs+1;var dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/1e4;if(dt<0&&options.clockseq===undefined){clockseq=clockseq+1&16383}if((dt<0||msecs>_lastMSecs)&&options.nsecs===undefined){nsecs=0}if(nsecs>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}_lastMSecs=msecs;_lastNSecs=nsecs;_clockseq=clockseq;msecs+=122192928e5;var tl=((msecs&268435455)*1e4+nsecs)%4294967296;b[i++]=tl>>>24&255;b[i++]=tl>>>16&255;b[i++]=tl>>>8&255;b[i++]=tl&255;var tmh=msecs/4294967296*1e4&268435455;b[i++]=tmh>>>8&255;b[i++]=tmh&255;b[i++]=tmh>>>24&15|16;b[i++]=tmh>>>16&255;b[i++]=clockseq>>>8|128;b[i++]=clockseq&255;for(var n=0;n<6;++n){b[i+n]=node[n]}return buf||stringify(b)}function parse(uuid){if(!validate(uuid)){throw TypeError("Invalid UUID")}var v;var arr=new Uint8Array(16);arr[0]=(v=parseInt(uuid.slice(0,8),16))>>>24;arr[1]=v>>>16&255;arr[2]=v>>>8&255;arr[3]=v&255;arr[4]=(v=parseInt(uuid.slice(9,13),16))>>>8;arr[5]=v&255;arr[6]=(v=parseInt(uuid.slice(14,18),16))>>>8;arr[7]=v&255;arr[8]=(v=parseInt(uuid.slice(19,23),16))>>>8;arr[9]=v&255;arr[10]=(v=parseInt(uuid.slice(24,36),16))/1099511627776&255;arr[11]=v/4294967296&255;arr[12]=v>>>24&255;arr[13]=v>>>16&255;arr[14]=v>>>8&255;arr[15]=v&255;return arr}function stringToBytes(str){str=unescape(encodeURIComponent(str));var bytes=[];for(var i=0;i>5]>>>i%32&255;var hex=parseInt(hexTab.charAt(x>>>4&15)+hexTab.charAt(x&15),16);output.push(hex)}return output}function getOutputLength(inputLength8){return(inputLength8+64>>>9<<4)+14+1}function wordsToMd5(x,len){x[len>>5]|=128<>5]|=(input[i/8]&255)<>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}function bitRotateLeft(num,cnt){return num<>>32-cnt}function md5cmn(q,a,b,x,s,t){return safeAdd(bitRotateLeft(safeAdd(safeAdd(a,q),safeAdd(x,t)),s),b)}function md5ff(a,b,c,d,x,s,t){return md5cmn(b&c|~b&d,a,b,x,s,t)}function md5gg(a,b,c,d,x,s,t){return md5cmn(b&d|c&~d,a,b,x,s,t)}function md5hh(a,b,c,d,x,s,t){return md5cmn(b^c^d,a,b,x,s,t)}function md5ii(a,b,c,d,x,s,t){return md5cmn(c^(b|~d),a,b,x,s,t)}var v3=v35("v3",48,md5);var v3$1=v3;function v4(options,buf,offset){options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){offset=offset||0;for(var i=0;i<16;++i){buf[offset+i]=rnds[i]}return buf}return stringify(rnds)}function f(s,x,y,z){switch(s){case 0:return x&y^~x&z;case 1:return x^y^z;case 2:return x&y^x&z^y&z;case 3:return x^y^z}}function ROTL(x,n){return x<>>32-n}function sha1(bytes){var K=[1518500249,1859775393,2400959708,3395469782];var H=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof bytes==="string"){var msg=unescape(encodeURIComponent(bytes));bytes=[];for(var i=0;i>>0;e=d;d=c;c=ROTL(b,30)>>>0;b=a;a=T}H[0]=H[0]+a>>>0;H[1]=H[1]+b>>>0;H[2]=H[2]+c>>>0;H[3]=H[3]+d>>>0;H[4]=H[4]+e>>>0}return[H[0]>>24&255,H[0]>>16&255,H[0]>>8&255,H[0]&255,H[1]>>24&255,H[1]>>16&255,H[1]>>8&255,H[1]&255,H[2]>>24&255,H[2]>>16&255,H[2]>>8&255,H[2]&255,H[3]>>24&255,H[3]>>16&255,H[3]>>8&255,H[3]&255,H[4]>>24&255,H[4]>>16&255,H[4]>>8&255,H[4]&255]}var v5=v35("v5",80,sha1);var v5$1=v5;var nil="00000000-0000-0000-0000-000000000000";function version(uuid){if(!validate(uuid)){throw TypeError("Invalid UUID")}return parseInt(uuid.substr(14,1),16)}var esmBrowser=Object.freeze({__proto__:null,NIL:nil,parse:parse,stringify:stringify,v1:v1,v3:v3$1,v4:v4,v5:v5$1,validate:validate,version:version});var require$$0=getAugmentedNamespace(esmBrowser);const uuid$1=require$$0.v4;const generateRequest$1=function(method,params,id,options){if(typeof method!=="string"){throw new TypeError(method+" must be a string")}options=options||{};const version=typeof options.version==="number"?options.version:2;if(version!==1&&version!==2){throw new TypeError(version+" must be 1 or 2")}const request={method:method};if(version===2){request.jsonrpc="2.0"}if(params){if(typeof params!=="object"&&!Array.isArray(params)){throw new TypeError(params+" must be an object, array or omitted")}request.params=params}if(typeof id==="undefined"){const generator=typeof options.generator==="function"?options.generator:function(){return uuid$1()};request.id=generator(request,options)}else if(version===2&&id===null){if(options.notificationIdNull){request.id=null}}else{request.id=id}return request};var generateRequest_1=generateRequest$1;const uuid=require$$0.v4;const generateRequest=generateRequest_1;const ClientBrowser=function(callServer,options){if(!(this instanceof ClientBrowser)){return new ClientBrowser(callServer,options)}if(!options){options={}}this.options={reviver:typeof options.reviver!=="undefined"?options.reviver:null,replacer:typeof options.replacer!=="undefined"?options.replacer:null,generator:typeof options.generator!=="undefined"?options.generator:function(){return uuid()},version:typeof options.version!=="undefined"?options.version:2,notificationIdNull:typeof options.notificationIdNull==="boolean"?options.notificationIdNull:false};this.callServer=callServer};var browser=ClientBrowser;ClientBrowser.prototype.request=function(method,params,id,callback){const self=this;let request=null;const isBatch=Array.isArray(method)&&typeof params==="function";if(this.options.version===1&&isBatch){throw new TypeError("JSON-RPC 1.0 does not support batching")}const isRaw=!isBatch&&method&&typeof method==="object"&&typeof params==="function";if(isBatch||isRaw){callback=params;request=method}else{if(typeof id==="function"){callback=id;id=undefined}const hasCallback=typeof callback==="function";try{request=generateRequest(method,params,id,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(err){if(hasCallback){return callback(err)}throw err}if(!hasCallback){return request}}let message;try{message=JSON.stringify(request,this.options.replacer)}catch(err){return callback(err)}this.callServer(message,(function(err,response){self._parseResponse(err,response,callback)}));return request};ClientBrowser.prototype._parseResponse=function(err,responseText,callback){if(err){callback(err);return}if(!responseText){return callback()}let response;try{response=JSON.parse(responseText,this.options.reviver)}catch(err){return callback(err)}if(callback.length===3){if(Array.isArray(response)){const isError=function(res){return typeof res.error!=="undefined"};const isNotError=function(res){return!isError(res)};return callback(null,response.filter(isError),response.filter(isNotError))}else{return callback(null,response.error,response.result)}}callback(null,response)};var RpcClient=getDefaultExportFromCjs(browser);var MINIMUM_SLOT_PER_EPOCH=32;function trailingZeros(n){var trailingZeros=0;while(n>1){n/=2;trailingZeros++}return trailingZeros}function nextPowerOfTwo(n){if(n===0)return 1;n--;n|=n>>1;n|=n>>2;n|=n>>4;n|=n>>8;n|=n>>16;n|=n>>32;return n+1}var EpochSchedule=function(){function EpochSchedule(slotsPerEpoch,leaderScheduleSlotOffset,warmup,firstNormalEpoch,firstNormalSlot){_classCallCheck(this,EpochSchedule);this.slotsPerEpoch=void 0;this.leaderScheduleSlotOffset=void 0;this.warmup=void 0;this.firstNormalEpoch=void 0;this.firstNormalSlot=void 0;this.slotsPerEpoch=slotsPerEpoch;this.leaderScheduleSlotOffset=leaderScheduleSlotOffset;this.warmup=warmup;this.firstNormalEpoch=firstNormalEpoch;this.firstNormalSlot=firstNormalSlot}_createClass(EpochSchedule,[{key:"getEpoch",value:function getEpoch(slot){return this.getEpochAndSlotIndex(slot)[0]}},{key:"getEpochAndSlotIndex",value:function getEpochAndSlotIndex(slot){if(slot=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function _catch(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc},"next"===this.method&&(this.arg=undefined),ContinueSentinel}},exports}module.exports=_regeneratorRuntime,module.exports.__esModule=true,module.exports["default"]=module.exports})(regeneratorRuntime$1);return regeneratorRuntime$1.exports}var regenerator;var hasRequiredRegenerator;function requireRegenerator(){if(hasRequiredRegenerator)return regenerator;hasRequiredRegenerator=1;var runtime=requireRegeneratorRuntime()();regenerator=runtime;try{regeneratorRuntime=runtime}catch(accidentalStrictMode){if(typeof globalThis==="object"){globalThis.regeneratorRuntime=runtime}else{Function("r","regeneratorRuntime = r")(runtime)}}return regenerator}var asyncToGenerator={exports:{}};var hasRequiredAsyncToGenerator;function requireAsyncToGenerator(){if(hasRequiredAsyncToGenerator)return asyncToGenerator.exports;hasRequiredAsyncToGenerator=1;(function(module){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value}catch(error){reject(error);return}if(info.done){resolve(value)}else{Promise.resolve(value).then(_next,_throw)}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(undefined)}))}}module.exports=_asyncToGenerator,module.exports.__esModule=true,module.exports["default"]=module.exports})(asyncToGenerator);return asyncToGenerator.exports}var classCallCheck={exports:{}};var hasRequiredClassCallCheck;function requireClassCallCheck(){if(hasRequiredClassCallCheck)return classCallCheck.exports;hasRequiredClassCallCheck=1;(function(module){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}module.exports=_classCallCheck,module.exports.__esModule=true,module.exports["default"]=module.exports})(classCallCheck);return classCallCheck.exports}var createClass={exports:{}};var toPropertyKey={exports:{}};var toPrimitive={exports:{}};var hasRequiredToPrimitive;function requireToPrimitive(){if(hasRequiredToPrimitive)return toPrimitive.exports;hasRequiredToPrimitive=1;(function(module){var _typeof=require_typeof()["default"];function _toPrimitive(input,hint){if(_typeof(input)!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(_typeof(res)!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}module.exports=_toPrimitive,module.exports.__esModule=true,module.exports["default"]=module.exports})(toPrimitive);return toPrimitive.exports}var hasRequiredToPropertyKey;function requireToPropertyKey(){if(hasRequiredToPropertyKey)return toPropertyKey.exports;hasRequiredToPropertyKey=1;(function(module){var _typeof=require_typeof()["default"];var toPrimitive=requireToPrimitive();function _toPropertyKey(arg){var key=toPrimitive(arg,"string");return _typeof(key)==="symbol"?key:String(key)}module.exports=_toPropertyKey,module.exports.__esModule=true,module.exports["default"]=module.exports})(toPropertyKey);return toPropertyKey.exports}var hasRequiredCreateClass;function requireCreateClass(){if(hasRequiredCreateClass)return createClass.exports;hasRequiredCreateClass=1;(function(module){var toPropertyKey=requireToPropertyKey();function _defineProperties(target,props){for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:"ws://localhost:8080";var _a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var generate_request_id=arguments.length>3?arguments[3]:undefined;(0,_classCallCheck2["default"])(this,CommonClient);var _a$autoconnect=_a.autoconnect,autoconnect=_a$autoconnect===void 0?true:_a$autoconnect,_a$reconnect=_a.reconnect,reconnect=_a$reconnect===void 0?true:_a$reconnect,_a$reconnect_interval=_a.reconnect_interval,reconnect_interval=_a$reconnect_interval===void 0?1e3:_a$reconnect_interval,_a$max_reconnects=_a.max_reconnects,max_reconnects=_a$max_reconnects===void 0?5:_a$max_reconnects,rest_options=__rest(_a,["autoconnect","reconnect","reconnect_interval","max_reconnects"]);_this=_super.call(this);_this.webSocketFactory=webSocketFactory;_this.queue={};_this.rpc_id=0;_this.address=address;_this.autoconnect=autoconnect;_this.ready=false;_this.reconnect=reconnect;_this.reconnect_timer_id=undefined;_this.reconnect_interval=reconnect_interval;_this.max_reconnects=max_reconnects;_this.rest_options=rest_options;_this.current_reconnects=0;_this.generate_request_id=generate_request_id||function(){return++_this.rpc_id};if(_this.autoconnect)_this._connect(_this.address,Object.assign({autoconnect:_this.autoconnect,reconnect:_this.reconnect,reconnect_interval:_this.reconnect_interval,max_reconnects:_this.max_reconnects},_this.rest_options));return _this}(0,_createClass2["default"])(CommonClient,[{key:"connect",value:function connect(){if(this.socket)return;this._connect(this.address,Object.assign({autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects},this.rest_options))}},{key:"call",value:function call(method,params,timeout,ws_opts){var _this2=this;if(!ws_opts&&"object"===(0,_typeof2["default"])(timeout)){ws_opts=timeout;timeout=null}return new Promise((function(resolve,reject){if(!_this2.ready)return reject(new Error("socket not ready"));var rpc_id=_this2.generate_request_id(method,params);var message={jsonrpc:"2.0",method:method,params:params||null,id:rpc_id};_this2.socket.send(JSON.stringify(message),ws_opts,(function(error){if(error)return reject(error);_this2.queue[rpc_id]={promise:[resolve,reject]};if(timeout){_this2.queue[rpc_id].timeout=setTimeout((function(){delete _this2.queue[rpc_id];reject(new Error("reply timeout"))}),timeout)}}))}))}},{key:"login",value:function(){var _login=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark((function _callee(params){var resp;return _regenerator["default"].wrap((function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.next=2;return this.call("rpc.login",params);case 2:resp=_context.sent;if(resp){_context.next=5;break}throw new Error("authentication failed");case 5:return _context.abrupt("return",resp);case 6:case"end":return _context.stop()}}}),_callee,this)})));function login(_x){return _login.apply(this,arguments)}return login}()},{key:"listMethods",value:function(){var _listMethods=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark((function _callee2(){return _regenerator["default"].wrap((function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this.call("__listMethods");case 2:return _context2.abrupt("return",_context2.sent);case 3:case"end":return _context2.stop()}}}),_callee2,this)})));function listMethods(){return _listMethods.apply(this,arguments)}return listMethods}()},{key:"notify",value:function notify(method,params){var _this3=this;return new Promise((function(resolve,reject){if(!_this3.ready)return reject(new Error("socket not ready"));var message={jsonrpc:"2.0",method:method,params:params||null};_this3.socket.send(JSON.stringify(message),(function(error){if(error)return reject(error);resolve()}))}))}},{key:"subscribe",value:function(){var _subscribe=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark((function _callee3(event){var result;return _regenerator["default"].wrap((function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:if(typeof event==="string")event=[event];_context3.next=3;return this.call("rpc.on",event);case 3:result=_context3.sent;if(!(typeof event==="string"&&result[event]!=="ok")){_context3.next=6;break}throw new Error("Failed subscribing to an event '"+event+"' with: "+result[event]);case 6:return _context3.abrupt("return",result);case 7:case"end":return _context3.stop()}}}),_callee3,this)})));function subscribe(_x2){return _subscribe.apply(this,arguments)}return subscribe}()},{key:"unsubscribe",value:function(){var _unsubscribe=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark((function _callee4(event){var result;return _regenerator["default"].wrap((function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:if(typeof event==="string")event=[event];_context4.next=3;return this.call("rpc.off",event);case 3:result=_context4.sent;if(!(typeof event==="string"&&result[event]!=="ok")){_context4.next=6;break}throw new Error("Failed unsubscribing from an event with: "+result);case 6:return _context4.abrupt("return",result);case 7:case"end":return _context4.stop()}}}),_callee4,this)})));function unsubscribe(_x3){return _unsubscribe.apply(this,arguments)}return unsubscribe}()},{key:"close",value:function close(code,data){this.socket.close(code||1e3,data)}},{key:"_connect",value:function _connect(address,options){var _this4=this;clearTimeout(this.reconnect_timer_id);this.socket=this.webSocketFactory(address,options);this.socket.addEventListener("open",(function(){_this4.ready=true;_this4.emit("open");_this4.current_reconnects=0}));this.socket.addEventListener("message",(function(_ref){var message=_ref.data;if(message instanceof ArrayBuffer)message=Buffer.from(message).toString();try{message=JSON.parse(message)}catch(error){return}if(message.notification&&_this4.listeners(message.notification).length){if(!Object.keys(message.params).length)return _this4.emit(message.notification);var args=[message.notification];if(message.params.constructor===Object)args.push(message.params);else for(var i=0;i_this4.current_reconnects||_this4.max_reconnects===0))_this4.reconnect_timer_id=setTimeout((function(){return _this4._connect(address,options)}),_this4.reconnect_interval)}))}}]);return CommonClient}(_eventemitter.EventEmitter);exports["default"]=CommonClient})(client);var RpcWebSocketCommonClient=getDefaultExportFromCjs(client);var websocket_browser={};(function(exports){var _interopRequireDefault=interopRequireDefaultExports;Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=_default;var _classCallCheck2=_interopRequireDefault(requireClassCallCheck());var _createClass2=_interopRequireDefault(requireCreateClass());var _inherits2=_interopRequireDefault(requireInherits());var _possibleConstructorReturn2=_interopRequireDefault(requirePossibleConstructorReturn());var _getPrototypeOf2=_interopRequireDefault(requireGetPrototypeOf());var _eventemitter=requireEventemitter3();function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return true}catch(e){return false}}var WebSocketBrowserImpl=function(_EventEmitter){(0,_inherits2["default"])(WebSocketBrowserImpl,_EventEmitter);var _super=_createSuper(WebSocketBrowserImpl);function WebSocketBrowserImpl(address,options,protocols){var _this;(0,_classCallCheck2["default"])(this,WebSocketBrowserImpl);_this=_super.call(this);_this.socket=new window.WebSocket(address,protocols);_this.socket.onopen=function(){return _this.emit("open")};_this.socket.onmessage=function(event){return _this.emit("message",event.data)};_this.socket.onerror=function(error){return _this.emit("error",error)};_this.socket.onclose=function(event){_this.emit("close",event.code,event.reason)};return _this}(0,_createClass2["default"])(WebSocketBrowserImpl,[{key:"send",value:function send(data,optionsOrCallback,callback){var cb=callback||optionsOrCallback;try{this.socket.send(data);cb()}catch(error){cb(error)}}},{key:"close",value:function close(code,reason){this.socket.close(code,reason)}},{key:"addEventListener",value:function addEventListener(type,listener,options){this.socket.addEventListener(type,listener,options)}}]);return WebSocketBrowserImpl}(_eventemitter.EventEmitter);function _default(address,options){return new WebSocketBrowserImpl(address,options)}})(websocket_browser);var createRpc=getDefaultExportFromCjs(websocket_browser);var RpcWebSocketClient=function(_RpcWebSocketCommonCl){_inherits(RpcWebSocketClient,_RpcWebSocketCommonCl);var _super=_createSuper(RpcWebSocketClient);function RpcWebSocketClient(address,options,generate_request_id){var _this;_classCallCheck(this,RpcWebSocketClient);var webSocketFactory=function webSocketFactory(url){var rpc=createRpc(url,_objectSpread2({autoconnect:true,max_reconnects:5,reconnect:true,reconnect_interval:1e3},options));if("socket"in rpc){_this.underlyingSocket=rpc.socket}else{_this.underlyingSocket=rpc}return rpc};_this=_super.call(this,webSocketFactory,address,options,generate_request_id);_this.underlyingSocket=void 0;return _this}_createClass(RpcWebSocketClient,[{key:"call",value:function call(){var _this$underlyingSocke;var readyState=(_this$underlyingSocke=this.underlyingSocket)===null||_this$underlyingSocke===void 0?void 0:_this$underlyingSocke.readyState;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}if(readyState===1){var _get2;return(_get2=_get(_getPrototypeOf(RpcWebSocketClient.prototype),"call",this)).call.apply(_get2,[this].concat(args))}return Promise.reject(new Error("Tried to call a JSON-RPC method `"+args[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+readyState+")"))}},{key:"notify",value:function notify(){var _this$underlyingSocke2;var readyState=(_this$underlyingSocke2=this.underlyingSocket)===null||_this$underlyingSocke2===void 0?void 0:_this$underlyingSocke2.readyState;for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2]}if(readyState===1){var _get3;return(_get3=_get(_getPrototypeOf(RpcWebSocketClient.prototype),"notify",this)).call.apply(_get3,[this].concat(args))}return Promise.reject(new Error("Tried to send a JSON-RPC notification `"+args[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+readyState+")"))}}]);return RpcWebSocketClient}(RpcWebSocketCommonClient);function decodeData(type,data){var decoded;try{decoded=type.layout.decode(data)}catch(err){throw new Error("invalid instruction; "+err)}if(decoded.typeIndex!==type.index){throw new Error("invalid account data; account type mismatch ".concat(decoded.typeIndex," != ").concat(type.index))}return decoded}var LOOKUP_TABLE_META_SIZE=56;var AddressLookupTableAccount=function(){function AddressLookupTableAccount(args){_classCallCheck(this,AddressLookupTableAccount);this.key=void 0;this.state=void 0;this.key=args.key;this.state=args.state}_createClass(AddressLookupTableAccount,[{key:"isActive",value:function isActive(){var U64_MAX=BigInt("0xffffffffffffffff");return this.state.deactivationSlot===U64_MAX}}],[{key:"deserialize",value:function deserialize(accountData){var meta=decodeData(LookupTableMetaLayout,accountData);var serializedAddressesLen=accountData.length-LOOKUP_TABLE_META_SIZE;assert$1(serializedAddressesLen>=0,"lookup table is invalid");assert$1(serializedAddressesLen%32===0,"lookup table is invalid");var numSerializedAddresses=serializedAddressesLen/32;var _BufferLayout$struct$=struct([seq(publicKey(),numSerializedAddresses,"addresses")]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE)),addresses=_BufferLayout$struct$.addresses;return{deactivationSlot:meta.deactivationSlot,lastExtendedSlot:meta.lastExtendedSlot,lastExtendedSlotStartIndex:meta.lastExtendedStartIndex,authority:meta.authority.length!==0?new PublicKey(meta.authority[0]):undefined,addresses:addresses.map((function(address){return new PublicKey(address)}))}}}]);return AddressLookupTableAccount}();var LookupTableMetaLayout={index:1,layout:struct([u32("typeIndex"),u64$2("deactivationSlot"),nu64("lastExtendedSlot"),u8("lastExtendedStartIndex"),u8(),seq(publicKey(),offset(u8(),-1),"authority")])};var URL_RE=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;function makeWebsocketUrl(endpoint){var matches=endpoint.match(URL_RE);if(matches==null){throw TypeError("Failed to validate endpoint URL `".concat(endpoint,"`"))}var _matches=_slicedToArray(matches,4);_matches[0];var hostish=_matches[1],portWithColon=_matches[2],rest=_matches[3];var protocol=endpoint.startsWith("https:")?"wss:":"ws:";var startPort=portWithColon==null?null:parseInt(portWithColon.slice(1),10);var websocketPort=startPort==null?"":":".concat(startPort+1);return"".concat(protocol,"//").concat(hostish).concat(websocketPort).concat(rest)}var _process$env$npm_pack;var _excluded=["commitment"],_excluded2=["encoding"],_excluded3=["commitment"],_excluded4=["commitment"];var PublicKeyFromString=coerce(instance(PublicKey),string(),(function(value){return new PublicKey(value)}));var RawAccountDataResult=tuple([string(),literal("base64")]);var BufferFromRawAccountData=coerce(instance(buffer.Buffer),RawAccountDataResult,(function(value){return buffer.Buffer.from(value[0],"base64")}));var BLOCKHASH_CACHE_TIMEOUT_MS=30*1e3;function assertEndpointUrl(putativeUrl){if(/^https?:/.test(putativeUrl)===false){throw new TypeError("Endpoint URL must start with `http:` or `https:`.")}return putativeUrl}function extractCommitmentFromConfig(commitmentOrConfig){var commitment;var config;if(typeof commitmentOrConfig==="string"){commitment=commitmentOrConfig}else if(commitmentOrConfig){var specifiedCommitment=commitmentOrConfig.commitment,specifiedConfig=_objectWithoutProperties(commitmentOrConfig,_excluded);commitment=specifiedCommitment;config=specifiedConfig}return{commitment:commitment,config:config}}function createRpcResult(result){return union([type({jsonrpc:literal("2.0"),id:string(),result:result}),type({jsonrpc:literal("2.0"),id:string(),error:type({code:unknown(),message:string(),data:optional(any())})})])}var UnknownRpcResult=createRpcResult(unknown());function jsonRpcResult(schema){return coerce(createRpcResult(schema),UnknownRpcResult,(function(value){if("error"in value){return value}else{return _objectSpread2(_objectSpread2({},value),{},{result:create(value.result,schema)})}}))}function jsonRpcResultAndContext(value){return jsonRpcResult(type({context:type({slot:number()}),value:value}))}function notificationResultAndContext(value){return type({context:type({slot:number()}),value:value})}function versionedMessageFromResponse(version,response){if(version===0){return new MessageV0({header:response.header,staticAccountKeys:response.accountKeys.map((function(accountKey){return new PublicKey(accountKey)})),recentBlockhash:response.recentBlockhash,compiledInstructions:response.instructions.map((function(ix){return{programIdIndex:ix.programIdIndex,accountKeyIndexes:ix.accounts,data:bs58$1.decode(ix.data)}})),addressTableLookups:response.addressTableLookups})}else{return new Message(response)}}var GetInflationGovernorResult=type({foundation:number(),foundationTerm:number(),initial:number(),taper:number(),terminal:number()});var GetInflationRewardResult=jsonRpcResult(array(nullable(type({epoch:number(),effectiveSlot:number(),amount:number(),postBalance:number(),commission:optional(nullable(number()))}))));var GetRecentPrioritizationFeesResult=array(type({slot:number(),prioritizationFee:number()}));var GetInflationRateResult=type({total:number(),validator:number(),foundation:number(),epoch:number()});var GetEpochInfoResult=type({epoch:number(),slotIndex:number(),slotsInEpoch:number(),absoluteSlot:number(),blockHeight:optional(number()),transactionCount:optional(number())});var GetEpochScheduleResult=type({slotsPerEpoch:number(),leaderScheduleSlotOffset:number(),warmup:boolean(),firstNormalEpoch:number(),firstNormalSlot:number()});var GetLeaderScheduleResult=record(string(),array(number()));var TransactionErrorResult=nullable(union([type({}),string()]));var SignatureStatusResult=type({err:TransactionErrorResult});var SignatureReceivedResult=literal("receivedSignature");var VersionResult=type({"solana-core":string(),"feature-set":optional(number())});var SimulatedTransactionResponseStruct=jsonRpcResultAndContext(type({err:nullable(union([type({}),string()])),logs:nullable(array(string())),accounts:optional(nullable(array(nullable(type({executable:boolean(),owner:string(),lamports:number(),data:array(string()),rentEpoch:optional(number())}))))),unitsConsumed:optional(number()),returnData:optional(nullable(type({programId:string(),data:tuple([string(),literal("base64")])})))}));var BlockProductionResponseStruct=jsonRpcResultAndContext(type({byIdentity:record(string(),array(number())),range:type({firstSlot:number(),lastSlot:number()})}));function createRpcClient(url,httpHeaders,customFetch,fetchMiddleware,disableRetryOnRateLimit,httpAgent){var fetch=customFetch?customFetch:fetchImpl;var agent;{if(httpAgent!=null){console.warn("You have supplied an `httpAgent` when creating a `Connection` in a browser environment."+"It has been ignored; `httpAgent` is only used in Node environments.")}}var fetchWithMiddleware;if(fetchMiddleware){fetchWithMiddleware=function(){var _ref=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(info,init){var modifiedFetchArgs;return _regeneratorRuntime().wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return new Promise((function(resolve,reject){try{fetchMiddleware(info,init,(function(modifiedInfo,modifiedInit){return resolve([modifiedInfo,modifiedInit])}))}catch(error){reject(error)}}));case 2:modifiedFetchArgs=_context.sent;_context.next=5;return fetch.apply(void 0,_toConsumableArray(modifiedFetchArgs));case 5:return _context.abrupt("return",_context.sent);case 6:case"end":return _context.stop()}}),_callee)})));return function fetchWithMiddleware(_x,_x2){return _ref.apply(this,arguments)}}()}var clientBrowser=new RpcClient(function(){var _ref2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(request,callback){var options,too_many_requests_retries,res,waitTime,text;return _regeneratorRuntime().wrap((function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:options={method:"POST",body:request,agent:agent,headers:Object.assign({"Content-Type":"application/json"},httpHeaders||{},COMMON_HTTP_HEADERS)};_context2.prev=1;too_many_requests_retries=5;waitTime=500;case 4:if(!fetchWithMiddleware){_context2.next=10;break}_context2.next=7;return fetchWithMiddleware(url,options);case 7:res=_context2.sent;_context2.next=13;break;case 10:_context2.next=12;return fetch(url,options);case 12:res=_context2.sent;case 13:if(!(res.status!==429)){_context2.next=15;break}return _context2.abrupt("break",26);case 15:if(!(disableRetryOnRateLimit===true)){_context2.next=17;break}return _context2.abrupt("break",26);case 17:too_many_requests_retries-=1;if(!(too_many_requests_retries===0)){_context2.next=20;break}return _context2.abrupt("break",26);case 20:console.log("Server responded with ".concat(res.status," ").concat(res.statusText,". Retrying after ").concat(waitTime,"ms delay..."));_context2.next=23;return sleep(waitTime);case 23:waitTime*=2;case 24:_context2.next=4;break;case 26:_context2.next=28;return res.text();case 28:text=_context2.sent;if(res.ok){callback(null,text)}else{callback(new Error("".concat(res.status," ").concat(res.statusText,": ").concat(text)))}_context2.next=35;break;case 32:_context2.prev=32;_context2.t0=_context2["catch"](1);if(_context2.t0 instanceof Error)callback(_context2.t0);case 35:case"end":return _context2.stop()}}),_callee2,null,[[1,32]])})));return function(_x3,_x4){return _ref2.apply(this,arguments)}}(),{});return clientBrowser}function createRpcRequest(client){return function(method,args){return new Promise((function(resolve,reject){client.request(method,args,(function(err,response){if(err){reject(err);return}resolve(response)}))}))}}function createRpcBatchRequest(client){return function(requests){return new Promise((function(resolve,reject){if(requests.length===0)resolve([]);var batch=requests.map((function(params){return client.request(params.methodName,params.args)}));client.request(batch,(function(err,response){if(err){reject(err);return}resolve(response)}))}))}}var GetInflationGovernorRpcResult=jsonRpcResult(GetInflationGovernorResult);var GetInflationRateRpcResult=jsonRpcResult(GetInflationRateResult);var GetRecentPrioritizationFeesRpcResult=jsonRpcResult(GetRecentPrioritizationFeesResult);var GetEpochInfoRpcResult=jsonRpcResult(GetEpochInfoResult);var GetEpochScheduleRpcResult=jsonRpcResult(GetEpochScheduleResult);var GetLeaderScheduleRpcResult=jsonRpcResult(GetLeaderScheduleResult);var SlotRpcResult=jsonRpcResult(number());var GetSupplyRpcResult=jsonRpcResultAndContext(type({total:number(),circulating:number(),nonCirculating:number(),nonCirculatingAccounts:array(PublicKeyFromString)}));var TokenAmountResult=type({amount:string(),uiAmount:nullable(number()),decimals:number(),uiAmountString:optional(string())});var GetTokenLargestAccountsResult=jsonRpcResultAndContext(array(type({address:PublicKeyFromString,amount:string(),uiAmount:nullable(number()),decimals:number(),uiAmountString:optional(string())})));var GetTokenAccountsByOwner=jsonRpcResultAndContext(array(type({pubkey:PublicKeyFromString,account:type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:BufferFromRawAccountData,rentEpoch:number()})})));var ParsedAccountDataResult=type({program:string(),parsed:unknown(),space:number()});var GetParsedTokenAccountsByOwner=jsonRpcResultAndContext(array(type({pubkey:PublicKeyFromString,account:type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:ParsedAccountDataResult,rentEpoch:number()})})));var GetLargestAccountsRpcResult=jsonRpcResultAndContext(array(type({lamports:number(),address:PublicKeyFromString})));var AccountInfoResult=type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:BufferFromRawAccountData,rentEpoch:number()});var KeyedAccountInfoResult=type({pubkey:PublicKeyFromString,account:AccountInfoResult});var ParsedOrRawAccountData=coerce(union([instance(buffer.Buffer),ParsedAccountDataResult]),union([RawAccountDataResult,ParsedAccountDataResult]),(function(value){if(Array.isArray(value)){return create(value,BufferFromRawAccountData)}else{return value}}));var ParsedAccountInfoResult=type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:ParsedOrRawAccountData,rentEpoch:number()});var KeyedParsedAccountInfoResult=type({pubkey:PublicKeyFromString,account:ParsedAccountInfoResult});var StakeActivationResult=type({state:union([literal("active"),literal("inactive"),literal("activating"),literal("deactivating")]),active:number(),inactive:number()});var GetConfirmedSignaturesForAddress2RpcResult=jsonRpcResult(array(type({signature:string(),slot:number(),err:TransactionErrorResult,memo:nullable(string()),blockTime:optional(nullable(number()))})));var GetSignaturesForAddressRpcResult=jsonRpcResult(array(type({signature:string(),slot:number(),err:TransactionErrorResult,memo:nullable(string()),blockTime:optional(nullable(number()))})));var AccountNotificationResult=type({subscription:number(),result:notificationResultAndContext(AccountInfoResult)});var ProgramAccountInfoResult=type({pubkey:PublicKeyFromString,account:AccountInfoResult});var ProgramAccountNotificationResult=type({subscription:number(),result:notificationResultAndContext(ProgramAccountInfoResult)});var SlotInfoResult=type({parent:number(),slot:number(),root:number()});var SlotNotificationResult=type({subscription:number(),result:SlotInfoResult});var SlotUpdateResult=union([type({type:union([literal("firstShredReceived"),literal("completed"),literal("optimisticConfirmation"),literal("root")]),slot:number(),timestamp:number()}),type({type:literal("createdBank"),parent:number(),slot:number(),timestamp:number()}),type({type:literal("frozen"),slot:number(),timestamp:number(),stats:type({numTransactionEntries:number(),numSuccessfulTransactions:number(),numFailedTransactions:number(),maxTransactionsPerEntry:number()})}),type({type:literal("dead"),slot:number(),timestamp:number(),err:string()})]);var SlotUpdateNotificationResult=type({subscription:number(),result:SlotUpdateResult});var SignatureNotificationResult=type({subscription:number(),result:notificationResultAndContext(union([SignatureStatusResult,SignatureReceivedResult]))});var RootNotificationResult=type({subscription:number(),result:number()});var ContactInfoResult=type({pubkey:string(),gossip:nullable(string()),tpu:nullable(string()),rpc:nullable(string()),version:nullable(string())});var VoteAccountInfoResult=type({votePubkey:string(),nodePubkey:string(),activatedStake:number(),epochVoteAccount:boolean(),epochCredits:array(tuple([number(),number(),number()])),commission:number(),lastVote:number(),rootSlot:nullable(number())});var GetVoteAccounts=jsonRpcResult(type({current:array(VoteAccountInfoResult),delinquent:array(VoteAccountInfoResult)}));var ConfirmationStatus=union([literal("processed"),literal("confirmed"),literal("finalized")]);var SignatureStatusResponse=type({slot:number(),confirmations:nullable(number()),err:TransactionErrorResult,confirmationStatus:optional(ConfirmationStatus)});var GetSignatureStatusesRpcResult=jsonRpcResultAndContext(array(nullable(SignatureStatusResponse)));var GetMinimumBalanceForRentExemptionRpcResult=jsonRpcResult(number());var AddressTableLookupStruct=type({accountKey:PublicKeyFromString,writableIndexes:array(number()),readonlyIndexes:array(number())});var ConfirmedTransactionResult=type({signatures:array(string()),message:type({accountKeys:array(string()),header:type({numRequiredSignatures:number(),numReadonlySignedAccounts:number(),numReadonlyUnsignedAccounts:number()}),instructions:array(type({accounts:array(number()),data:string(),programIdIndex:number()})),recentBlockhash:string(),addressTableLookups:optional(array(AddressTableLookupStruct))})});var AnnotatedAccountKey=type({pubkey:PublicKeyFromString,signer:boolean(),writable:boolean(),source:optional(union([literal("transaction"),literal("lookupTable")]))});var ConfirmedTransactionAccountsModeResult=type({accountKeys:array(AnnotatedAccountKey),signatures:array(string())});var ParsedInstructionResult=type({parsed:unknown(),program:string(),programId:PublicKeyFromString});var RawInstructionResult=type({accounts:array(PublicKeyFromString),data:string(),programId:PublicKeyFromString});var InstructionResult=union([RawInstructionResult,ParsedInstructionResult]);var UnknownInstructionResult=union([type({parsed:unknown(),program:string(),programId:string()}),type({accounts:array(string()),data:string(),programId:string()})]);var ParsedOrRawInstruction=coerce(InstructionResult,UnknownInstructionResult,(function(value){if("accounts"in value){return create(value,RawInstructionResult)}else{return create(value,ParsedInstructionResult)}}));var ParsedConfirmedTransactionResult=type({signatures:array(string()),message:type({accountKeys:array(AnnotatedAccountKey),instructions:array(ParsedOrRawInstruction),recentBlockhash:string(),addressTableLookups:optional(nullable(array(AddressTableLookupStruct)))})});var TokenBalanceResult=type({accountIndex:number(),mint:string(),owner:optional(string()),uiTokenAmount:TokenAmountResult});var LoadedAddressesResult=type({writable:array(PublicKeyFromString),readonly:array(PublicKeyFromString)});var ConfirmedTransactionMetaResult=type({err:TransactionErrorResult,fee:number(),innerInstructions:optional(nullable(array(type({index:number(),instructions:array(type({accounts:array(number()),data:string(),programIdIndex:number()}))})))),preBalances:array(number()),postBalances:array(number()),logMessages:optional(nullable(array(string()))),preTokenBalances:optional(nullable(array(TokenBalanceResult))),postTokenBalances:optional(nullable(array(TokenBalanceResult))),loadedAddresses:optional(LoadedAddressesResult),computeUnitsConsumed:optional(number())});var ParsedConfirmedTransactionMetaResult=type({err:TransactionErrorResult,fee:number(),innerInstructions:optional(nullable(array(type({index:number(),instructions:array(ParsedOrRawInstruction)})))),preBalances:array(number()),postBalances:array(number()),logMessages:optional(nullable(array(string()))),preTokenBalances:optional(nullable(array(TokenBalanceResult))),postTokenBalances:optional(nullable(array(TokenBalanceResult))),loadedAddresses:optional(LoadedAddressesResult),computeUnitsConsumed:optional(number())});var TransactionVersionStruct=union([literal(0),literal("legacy")]);var RewardsResult=type({pubkey:string(),lamports:number(),postBalance:nullable(number()),rewardType:nullable(string()),commission:optional(nullable(number()))});var GetBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionResult,meta:nullable(ConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetNoneModeBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetAccountsModeBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionAccountsModeResult,meta:nullable(ConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetParsedBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ParsedConfirmedTransactionResult,meta:nullable(ParsedConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetParsedAccountsModeBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionAccountsModeResult,meta:nullable(ParsedConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetParsedNoneModeBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));var GetConfirmedBlockRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionResult,meta:nullable(ConfirmedTransactionMetaResult)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number())})));var GetBlockSignaturesRpcResult=jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),signatures:array(string()),blockTime:nullable(number())})));var GetTransactionRpcResult=jsonRpcResult(nullable(type({slot:number(),meta:ConfirmedTransactionMetaResult,blockTime:optional(nullable(number())),transaction:ConfirmedTransactionResult,version:optional(TransactionVersionStruct)})));var GetParsedTransactionRpcResult=jsonRpcResult(nullable(type({slot:number(),transaction:ParsedConfirmedTransactionResult,meta:nullable(ParsedConfirmedTransactionMetaResult),blockTime:optional(nullable(number())),version:optional(TransactionVersionStruct)})));var GetRecentBlockhashAndContextRpcResult=jsonRpcResultAndContext(type({blockhash:string(),feeCalculator:type({lamportsPerSignature:number()})}));var GetLatestBlockhashRpcResult=jsonRpcResultAndContext(type({blockhash:string(),lastValidBlockHeight:number()}));var IsBlockhashValidRpcResult=jsonRpcResultAndContext(boolean());var PerfSampleResult=type({slot:number(),numTransactions:number(),numSlots:number(),samplePeriodSecs:number()});var GetRecentPerformanceSamplesRpcResult=jsonRpcResult(array(PerfSampleResult));var GetFeeCalculatorRpcResult=jsonRpcResultAndContext(nullable(type({feeCalculator:type({lamportsPerSignature:number()})})));var RequestAirdropRpcResult=jsonRpcResult(string());var SendTransactionRpcResult=jsonRpcResult(string());var LogsResult=type({err:TransactionErrorResult,logs:array(string()),signature:string()});var LogsNotificationResult=type({result:notificationResultAndContext(LogsResult),subscription:number()});var COMMON_HTTP_HEADERS={"solana-client":"js/".concat((_process$env$npm_pack="1.78.4")!==null&&_process$env$npm_pack!==void 0?_process$env$npm_pack:"UNKNOWN")};var Connection=function(){function Connection(endpoint,_commitmentOrConfig){var _this=this;_classCallCheck(this,Connection);this._commitment=void 0;this._confirmTransactionInitialTimeout=void 0;this._rpcEndpoint=void 0;this._rpcWsEndpoint=void 0;this._rpcClient=void 0;this._rpcRequest=void 0;this._rpcBatchRequest=void 0;this._rpcWebSocket=void 0;this._rpcWebSocketConnected=false;this._rpcWebSocketHeartbeat=null;this._rpcWebSocketIdleTimeout=null;this._rpcWebSocketGeneration=0;this._disableBlockhashCaching=false;this._pollingBlockhash=false;this._blockhashInfo={latestBlockhash:null,lastFetch:0,transactionSignatures:[],simulatedSignatures:[]};this._nextClientSubscriptionId=0;this._subscriptionDisposeFunctionsByClientSubscriptionId={};this._subscriptionHashByClientSubscriptionId={};this._subscriptionStateChangeCallbacksByHash={};this._subscriptionCallbacksByServerSubscriptionId={};this._subscriptionsByHash={};this._subscriptionsAutoDisposedByRpc=new Set;this.getBlockHeight=function(){var requestPromises={};return function(){var _ref3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(commitmentOrConfig){var _requestPromises$requ;var _extractCommitmentFro,commitment,config,args,requestHash;return _regeneratorRuntime().wrap((function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_extractCommitmentFro=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro.commitment,config=_extractCommitmentFro.config;args=_this._buildArgs([],commitment,undefined,config);requestHash=fastStableStringify$1(args);requestPromises[requestHash]=(_requestPromises$requ=requestPromises[requestHash])!==null&&_requestPromises$requ!==void 0?_requestPromises$requ:_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return _this._rpcRequest("getBlockHeight",args);case 3:unsafeRes=_context3.sent;res=create(unsafeRes,jsonRpcResult(number()));if(!("error"in res)){_context3.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get block height information");case 7:return _context3.abrupt("return",res.result);case 8:_context3.prev=8;delete requestPromises[requestHash];return _context3.finish(8);case 11:case"end":return _context3.stop()}}),_callee3,null,[[0,,8,11]])})))();_context4.next=6;return requestPromises[requestHash];case 6:return _context4.abrupt("return",_context4.sent);case 7:case"end":return _context4.stop()}}),_callee4)})));return function(_x5){return _ref3.apply(this,arguments)}}()}();var wsEndpoint;var httpHeaders;var fetch;var fetchMiddleware;var disableRetryOnRateLimit;var httpAgent;if(_commitmentOrConfig&&typeof _commitmentOrConfig==="string"){this._commitment=_commitmentOrConfig}else if(_commitmentOrConfig){this._commitment=_commitmentOrConfig.commitment;this._confirmTransactionInitialTimeout=_commitmentOrConfig.confirmTransactionInitialTimeout;wsEndpoint=_commitmentOrConfig.wsEndpoint;httpHeaders=_commitmentOrConfig.httpHeaders;fetch=_commitmentOrConfig.fetch;fetchMiddleware=_commitmentOrConfig.fetchMiddleware;disableRetryOnRateLimit=_commitmentOrConfig.disableRetryOnRateLimit;httpAgent=_commitmentOrConfig.httpAgent}this._rpcEndpoint=assertEndpointUrl(endpoint);this._rpcWsEndpoint=wsEndpoint||makeWebsocketUrl(endpoint);this._rpcClient=createRpcClient(endpoint,httpHeaders,fetch,fetchMiddleware,disableRetryOnRateLimit,httpAgent);this._rpcRequest=createRpcRequest(this._rpcClient);this._rpcBatchRequest=createRpcBatchRequest(this._rpcClient);this._rpcWebSocket=new RpcWebSocketClient(this._rpcWsEndpoint,{autoconnect:false,max_reconnects:Infinity});this._rpcWebSocket.on("open",this._wsOnOpen.bind(this));this._rpcWebSocket.on("error",this._wsOnError.bind(this));this._rpcWebSocket.on("close",this._wsOnClose.bind(this));this._rpcWebSocket.on("accountNotification",this._wsOnAccountNotification.bind(this));this._rpcWebSocket.on("programNotification",this._wsOnProgramAccountNotification.bind(this));this._rpcWebSocket.on("slotNotification",this._wsOnSlotNotification.bind(this));this._rpcWebSocket.on("slotsUpdatesNotification",this._wsOnSlotUpdatesNotification.bind(this));this._rpcWebSocket.on("signatureNotification",this._wsOnSignatureNotification.bind(this));this._rpcWebSocket.on("rootNotification",this._wsOnRootNotification.bind(this));this._rpcWebSocket.on("logsNotification",this._wsOnLogsNotification.bind(this))}_createClass(Connection,[{key:"commitment",get:function get(){return this._commitment}},{key:"rpcEndpoint",get:function get(){return this._rpcEndpoint}},{key:"getBalanceAndContext",value:function(){var _getBalanceAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(publicKey,commitmentOrConfig){var _extractCommitmentFro2,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_extractCommitmentFro2=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro2.commitment,config=_extractCommitmentFro2.config;args=this._buildArgs([publicKey.toBase58()],commitment,undefined,config);_context5.next=4;return this._rpcRequest("getBalance",args);case 4:unsafeRes=_context5.sent;res=create(unsafeRes,jsonRpcResultAndContext(number()));if(!("error"in res)){_context5.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get balance for ".concat(publicKey.toBase58()));case 8:return _context5.abrupt("return",res.result);case 9:case"end":return _context5.stop()}}),_callee5,this)})));function getBalanceAndContext(_x6,_x7){return _getBalanceAndContext.apply(this,arguments)}return getBalanceAndContext}()},{key:"getBalance",value:function(){var _getBalance=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(publicKey,commitmentOrConfig){return _regeneratorRuntime().wrap((function _callee6$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return this.getBalanceAndContext(publicKey,commitmentOrConfig).then((function(x){return x.value}))["catch"]((function(e){throw new Error("failed to get balance of account "+publicKey.toBase58()+": "+e)}));case 2:return _context6.abrupt("return",_context6.sent);case 3:case"end":return _context6.stop()}}),_callee6,this)})));function getBalance(_x8,_x9){return _getBalance.apply(this,arguments)}return getBalance}()},{key:"getBlockTime",value:function(){var _getBlockTime=_asyncToGenerator(_regeneratorRuntime().mark((function _callee7(slot){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee7$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return this._rpcRequest("getBlockTime",[slot]);case 2:unsafeRes=_context7.sent;res=create(unsafeRes,jsonRpcResult(nullable(number())));if(!("error"in res)){_context7.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get block time for slot ".concat(slot));case 6:return _context7.abrupt("return",res.result);case 7:case"end":return _context7.stop()}}),_callee7,this)})));function getBlockTime(_x10){return _getBlockTime.apply(this,arguments)}return getBlockTime}()},{key:"getMinimumLedgerSlot",value:function(){var _getMinimumLedgerSlot=_asyncToGenerator(_regeneratorRuntime().mark((function _callee8(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee8$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return this._rpcRequest("minimumLedgerSlot",[]);case 2:unsafeRes=_context8.sent;res=create(unsafeRes,jsonRpcResult(number()));if(!("error"in res)){_context8.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get minimum ledger slot");case 6:return _context8.abrupt("return",res.result);case 7:case"end":return _context8.stop()}}),_callee8,this)})));function getMinimumLedgerSlot(){return _getMinimumLedgerSlot.apply(this,arguments)}return getMinimumLedgerSlot}()},{key:"getFirstAvailableBlock",value:function(){var _getFirstAvailableBlock=_asyncToGenerator(_regeneratorRuntime().mark((function _callee9(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee9$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return this._rpcRequest("getFirstAvailableBlock",[]);case 2:unsafeRes=_context9.sent;res=create(unsafeRes,SlotRpcResult);if(!("error"in res)){_context9.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get first available block");case 6:return _context9.abrupt("return",res.result);case 7:case"end":return _context9.stop()}}),_callee9,this)})));function getFirstAvailableBlock(){return _getFirstAvailableBlock.apply(this,arguments)}return getFirstAvailableBlock}()},{key:"getSupply",value:function(){var _getSupply=_asyncToGenerator(_regeneratorRuntime().mark((function _callee10(config){var configArg,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee10$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:configArg={};if(typeof config==="string"){configArg={commitment:config}}else if(config){configArg=_objectSpread2(_objectSpread2({},config),{},{commitment:config&&config.commitment||this.commitment})}else{configArg={commitment:this.commitment}}_context10.next=4;return this._rpcRequest("getSupply",[configArg]);case 4:unsafeRes=_context10.sent;res=create(unsafeRes,GetSupplyRpcResult);if(!("error"in res)){_context10.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get supply");case 8:return _context10.abrupt("return",res.result);case 9:case"end":return _context10.stop()}}),_callee10,this)})));function getSupply(_x11){return _getSupply.apply(this,arguments)}return getSupply}()},{key:"getTokenSupply",value:function(){var _getTokenSupply=_asyncToGenerator(_regeneratorRuntime().mark((function _callee11(tokenMintAddress,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee11$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:args=this._buildArgs([tokenMintAddress.toBase58()],commitment);_context11.next=3;return this._rpcRequest("getTokenSupply",args);case 3:unsafeRes=_context11.sent;res=create(unsafeRes,jsonRpcResultAndContext(TokenAmountResult));if(!("error"in res)){_context11.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get token supply");case 7:return _context11.abrupt("return",res.result);case 8:case"end":return _context11.stop()}}),_callee11,this)})));function getTokenSupply(_x12,_x13){return _getTokenSupply.apply(this,arguments)}return getTokenSupply}()},{key:"getTokenAccountBalance",value:function(){var _getTokenAccountBalance=_asyncToGenerator(_regeneratorRuntime().mark((function _callee12(tokenAddress,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee12$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:args=this._buildArgs([tokenAddress.toBase58()],commitment);_context12.next=3;return this._rpcRequest("getTokenAccountBalance",args);case 3:unsafeRes=_context12.sent;res=create(unsafeRes,jsonRpcResultAndContext(TokenAmountResult));if(!("error"in res)){_context12.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get token account balance");case 7:return _context12.abrupt("return",res.result);case 8:case"end":return _context12.stop()}}),_callee12,this)})));function getTokenAccountBalance(_x14,_x15){return _getTokenAccountBalance.apply(this,arguments)}return getTokenAccountBalance}()},{key:"getTokenAccountsByOwner",value:function(){var _getTokenAccountsByOwner=_asyncToGenerator(_regeneratorRuntime().mark((function _callee13(ownerAddress,filter,commitmentOrConfig){var _extractCommitmentFro3,commitment,config,_args,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee13$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_extractCommitmentFro3=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro3.commitment,config=_extractCommitmentFro3.config;_args=[ownerAddress.toBase58()];if("mint"in filter){_args.push({mint:filter.mint.toBase58()})}else{_args.push({programId:filter.programId.toBase58()})}args=this._buildArgs(_args,commitment,"base64",config);_context13.next=6;return this._rpcRequest("getTokenAccountsByOwner",args);case 6:unsafeRes=_context13.sent;res=create(unsafeRes,GetTokenAccountsByOwner);if(!("error"in res)){_context13.next=10;break}throw new SolanaJSONRPCError(res.error,"failed to get token accounts owned by account ".concat(ownerAddress.toBase58()));case 10:return _context13.abrupt("return",res.result);case 11:case"end":return _context13.stop()}}),_callee13,this)})));function getTokenAccountsByOwner(_x16,_x17,_x18){return _getTokenAccountsByOwner.apply(this,arguments)}return getTokenAccountsByOwner}()},{key:"getParsedTokenAccountsByOwner",value:function(){var _getParsedTokenAccountsByOwner=_asyncToGenerator(_regeneratorRuntime().mark((function _callee14(ownerAddress,filter,commitment){var _args,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee14$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_args=[ownerAddress.toBase58()];if("mint"in filter){_args.push({mint:filter.mint.toBase58()})}else{_args.push({programId:filter.programId.toBase58()})}args=this._buildArgs(_args,commitment,"jsonParsed");_context14.next=5;return this._rpcRequest("getTokenAccountsByOwner",args);case 5:unsafeRes=_context14.sent;res=create(unsafeRes,GetParsedTokenAccountsByOwner);if(!("error"in res)){_context14.next=9;break}throw new SolanaJSONRPCError(res.error,"failed to get token accounts owned by account ".concat(ownerAddress.toBase58()));case 9:return _context14.abrupt("return",res.result);case 10:case"end":return _context14.stop()}}),_callee14,this)})));function getParsedTokenAccountsByOwner(_x19,_x20,_x21){return _getParsedTokenAccountsByOwner.apply(this,arguments)}return getParsedTokenAccountsByOwner}()},{key:"getLargestAccounts",value:function(){var _getLargestAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee15(config){var arg,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee15$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:arg=_objectSpread2(_objectSpread2({},config),{},{commitment:config&&config.commitment||this.commitment});args=arg.filter||arg.commitment?[arg]:[];_context15.next=4;return this._rpcRequest("getLargestAccounts",args);case 4:unsafeRes=_context15.sent;res=create(unsafeRes,GetLargestAccountsRpcResult);if(!("error"in res)){_context15.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get largest accounts");case 8:return _context15.abrupt("return",res.result);case 9:case"end":return _context15.stop()}}),_callee15,this)})));function getLargestAccounts(_x22){return _getLargestAccounts.apply(this,arguments)}return getLargestAccounts}()},{key:"getTokenLargestAccounts",value:function(){var _getTokenLargestAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee16(mintAddress,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee16$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:args=this._buildArgs([mintAddress.toBase58()],commitment);_context16.next=3;return this._rpcRequest("getTokenLargestAccounts",args);case 3:unsafeRes=_context16.sent;res=create(unsafeRes,GetTokenLargestAccountsResult);if(!("error"in res)){_context16.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get token largest accounts");case 7:return _context16.abrupt("return",res.result);case 8:case"end":return _context16.stop()}}),_callee16,this)})));function getTokenLargestAccounts(_x23,_x24){return _getTokenLargestAccounts.apply(this,arguments)}return getTokenLargestAccounts}()},{key:"getAccountInfoAndContext",value:function(){var _getAccountInfoAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee17(publicKey,commitmentOrConfig){var _extractCommitmentFro4,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee17$(_context17){while(1)switch(_context17.prev=_context17.next){case 0:_extractCommitmentFro4=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro4.commitment,config=_extractCommitmentFro4.config;args=this._buildArgs([publicKey.toBase58()],commitment,"base64",config);_context17.next=4;return this._rpcRequest("getAccountInfo",args);case 4:unsafeRes=_context17.sent;res=create(unsafeRes,jsonRpcResultAndContext(nullable(AccountInfoResult)));if(!("error"in res)){_context17.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get info about account ".concat(publicKey.toBase58()));case 8:return _context17.abrupt("return",res.result);case 9:case"end":return _context17.stop()}}),_callee17,this)})));function getAccountInfoAndContext(_x25,_x26){return _getAccountInfoAndContext.apply(this,arguments)}return getAccountInfoAndContext}()},{key:"getParsedAccountInfo",value:function(){var _getParsedAccountInfo=_asyncToGenerator(_regeneratorRuntime().mark((function _callee18(publicKey,commitmentOrConfig){var _extractCommitmentFro5,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee18$(_context18){while(1)switch(_context18.prev=_context18.next){case 0:_extractCommitmentFro5=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro5.commitment,config=_extractCommitmentFro5.config;args=this._buildArgs([publicKey.toBase58()],commitment,"jsonParsed",config);_context18.next=4;return this._rpcRequest("getAccountInfo",args);case 4:unsafeRes=_context18.sent;res=create(unsafeRes,jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)));if(!("error"in res)){_context18.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get info about account ".concat(publicKey.toBase58()));case 8:return _context18.abrupt("return",res.result);case 9:case"end":return _context18.stop()}}),_callee18,this)})));function getParsedAccountInfo(_x27,_x28){return _getParsedAccountInfo.apply(this,arguments)}return getParsedAccountInfo}()},{key:"getAccountInfo",value:function(){var _getAccountInfo=_asyncToGenerator(_regeneratorRuntime().mark((function _callee19(publicKey,commitmentOrConfig){var res;return _regeneratorRuntime().wrap((function _callee19$(_context19){while(1)switch(_context19.prev=_context19.next){case 0:_context19.prev=0;_context19.next=3;return this.getAccountInfoAndContext(publicKey,commitmentOrConfig);case 3:res=_context19.sent;return _context19.abrupt("return",res.value);case 7:_context19.prev=7;_context19.t0=_context19["catch"](0);throw new Error("failed to get info about account "+publicKey.toBase58()+": "+_context19.t0);case 10:case"end":return _context19.stop()}}),_callee19,this,[[0,7]])})));function getAccountInfo(_x29,_x30){return _getAccountInfo.apply(this,arguments)}return getAccountInfo}()},{key:"getMultipleParsedAccounts",value:function(){var _getMultipleParsedAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee20(publicKeys,rawConfig){var _extractCommitmentFro6,commitment,config,keys,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee20$(_context20){while(1)switch(_context20.prev=_context20.next){case 0:_extractCommitmentFro6=extractCommitmentFromConfig(rawConfig),commitment=_extractCommitmentFro6.commitment,config=_extractCommitmentFro6.config;keys=publicKeys.map((function(key){return key.toBase58()}));args=this._buildArgs([keys],commitment,"jsonParsed",config);_context20.next=5;return this._rpcRequest("getMultipleAccounts",args);case 5:unsafeRes=_context20.sent;res=create(unsafeRes,jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))));if(!("error"in res)){_context20.next=9;break}throw new SolanaJSONRPCError(res.error,"failed to get info for accounts ".concat(keys));case 9:return _context20.abrupt("return",res.result);case 10:case"end":return _context20.stop()}}),_callee20,this)})));function getMultipleParsedAccounts(_x31,_x32){return _getMultipleParsedAccounts.apply(this,arguments)}return getMultipleParsedAccounts}()},{key:"getMultipleAccountsInfoAndContext",value:function(){var _getMultipleAccountsInfoAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee21(publicKeys,commitmentOrConfig){var _extractCommitmentFro7,commitment,config,keys,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee21$(_context21){while(1)switch(_context21.prev=_context21.next){case 0:_extractCommitmentFro7=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro7.commitment,config=_extractCommitmentFro7.config;keys=publicKeys.map((function(key){return key.toBase58()}));args=this._buildArgs([keys],commitment,"base64",config);_context21.next=5;return this._rpcRequest("getMultipleAccounts",args);case 5:unsafeRes=_context21.sent;res=create(unsafeRes,jsonRpcResultAndContext(array(nullable(AccountInfoResult))));if(!("error"in res)){_context21.next=9;break}throw new SolanaJSONRPCError(res.error,"failed to get info for accounts ".concat(keys));case 9:return _context21.abrupt("return",res.result);case 10:case"end":return _context21.stop()}}),_callee21,this)})));function getMultipleAccountsInfoAndContext(_x33,_x34){return _getMultipleAccountsInfoAndContext.apply(this,arguments)}return getMultipleAccountsInfoAndContext}()},{key:"getMultipleAccountsInfo",value:function(){var _getMultipleAccountsInfo=_asyncToGenerator(_regeneratorRuntime().mark((function _callee22(publicKeys,commitmentOrConfig){var res;return _regeneratorRuntime().wrap((function _callee22$(_context22){while(1)switch(_context22.prev=_context22.next){case 0:_context22.next=2;return this.getMultipleAccountsInfoAndContext(publicKeys,commitmentOrConfig);case 2:res=_context22.sent;return _context22.abrupt("return",res.value);case 4:case"end":return _context22.stop()}}),_callee22,this)})));function getMultipleAccountsInfo(_x35,_x36){return _getMultipleAccountsInfo.apply(this,arguments)}return getMultipleAccountsInfo}()},{key:"getStakeActivation",value:function(){var _getStakeActivation=_asyncToGenerator(_regeneratorRuntime().mark((function _callee23(publicKey,commitmentOrConfig,epoch){var _extractCommitmentFro8,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee23$(_context23){while(1)switch(_context23.prev=_context23.next){case 0:_extractCommitmentFro8=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro8.commitment,config=_extractCommitmentFro8.config;args=this._buildArgs([publicKey.toBase58()],commitment,undefined,_objectSpread2(_objectSpread2({},config),{},{epoch:epoch!=null?epoch:config===null||config===void 0?void 0:config.epoch}));_context23.next=4;return this._rpcRequest("getStakeActivation",args);case 4:unsafeRes=_context23.sent;res=create(unsafeRes,jsonRpcResult(StakeActivationResult));if(!("error"in res)){_context23.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get Stake Activation ".concat(publicKey.toBase58()));case 8:return _context23.abrupt("return",res.result);case 9:case"end":return _context23.stop()}}),_callee23,this)})));function getStakeActivation(_x37,_x38,_x39){return _getStakeActivation.apply(this,arguments)}return getStakeActivation}()},{key:"getProgramAccounts",value:function(){var _getProgramAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee24(programId,configOrCommitment){var _extractCommitmentFro9,commitment,config,_ref5,encoding,configWithoutEncoding,args,unsafeRes,baseSchema,res;return _regeneratorRuntime().wrap((function _callee24$(_context24){while(1)switch(_context24.prev=_context24.next){case 0:_extractCommitmentFro9=extractCommitmentFromConfig(configOrCommitment),commitment=_extractCommitmentFro9.commitment,config=_extractCommitmentFro9.config;_ref5=config||{},encoding=_ref5.encoding,configWithoutEncoding=_objectWithoutProperties(_ref5,_excluded2);args=this._buildArgs([programId.toBase58()],commitment,encoding||"base64",configWithoutEncoding);_context24.next=5;return this._rpcRequest("getProgramAccounts",args);case 5:unsafeRes=_context24.sent;baseSchema=array(KeyedAccountInfoResult);res=configWithoutEncoding.withContext===true?create(unsafeRes,jsonRpcResultAndContext(baseSchema)):create(unsafeRes,jsonRpcResult(baseSchema));if(!("error"in res)){_context24.next=10;break}throw new SolanaJSONRPCError(res.error,"failed to get accounts owned by program ".concat(programId.toBase58()));case 10:return _context24.abrupt("return",res.result);case 11:case"end":return _context24.stop()}}),_callee24,this)})));function getProgramAccounts(_x40,_x41){return _getProgramAccounts.apply(this,arguments)}return getProgramAccounts}()},{key:"getParsedProgramAccounts",value:function(){var _getParsedProgramAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee25(programId,configOrCommitment){var _extractCommitmentFro10,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee25$(_context25){while(1)switch(_context25.prev=_context25.next){case 0:_extractCommitmentFro10=extractCommitmentFromConfig(configOrCommitment),commitment=_extractCommitmentFro10.commitment,config=_extractCommitmentFro10.config;args=this._buildArgs([programId.toBase58()],commitment,"jsonParsed",config);_context25.next=4;return this._rpcRequest("getProgramAccounts",args);case 4:unsafeRes=_context25.sent;res=create(unsafeRes,jsonRpcResult(array(KeyedParsedAccountInfoResult)));if(!("error"in res)){_context25.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get accounts owned by program ".concat(programId.toBase58()));case 8:return _context25.abrupt("return",res.result);case 9:case"end":return _context25.stop()}}),_callee25,this)})));function getParsedProgramAccounts(_x42,_x43){return _getParsedProgramAccounts.apply(this,arguments)}return getParsedProgramAccounts}()},{key:"confirmTransaction",value:function(){var _confirmTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee26(strategy,commitment){var rawSignature,_config$abortSignal,_config,decodedSignature;return _regeneratorRuntime().wrap((function _callee26$(_context26){while(1)switch(_context26.prev=_context26.next){case 0:if(!(typeof strategy=="string")){_context26.next=4;break}rawSignature=strategy;_context26.next=8;break;case 4:_config=strategy;if(!((_config$abortSignal=_config.abortSignal)!==null&&_config$abortSignal!==void 0&&_config$abortSignal.aborted)){_context26.next=7;break}return _context26.abrupt("return",Promise.reject(_config.abortSignal.reason));case 7:rawSignature=_config.signature;case 8:_context26.prev=8;decodedSignature=bs58$1.decode(rawSignature);_context26.next=15;break;case 12:_context26.prev=12;_context26.t0=_context26["catch"](8);throw new Error("signature must be base58 encoded: "+rawSignature);case 15:assert$1(decodedSignature.length===64,"signature has invalid length");if(!(typeof strategy==="string")){_context26.next=22;break}_context26.next=19;return this.confirmTransactionUsingLegacyTimeoutStrategy({commitment:commitment||this.commitment,signature:rawSignature});case 19:return _context26.abrupt("return",_context26.sent);case 22:if(!("lastValidBlockHeight"in strategy)){_context26.next=28;break}_context26.next=25;return this.confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:commitment||this.commitment,strategy:strategy});case 25:return _context26.abrupt("return",_context26.sent);case 28:_context26.next=30;return this.confirmTransactionUsingDurableNonceStrategy({commitment:commitment||this.commitment,strategy:strategy});case 30:return _context26.abrupt("return",_context26.sent);case 31:case"end":return _context26.stop()}}),_callee26,this,[[8,12]])})));function confirmTransaction(_x44,_x45){return _confirmTransaction.apply(this,arguments)}return confirmTransaction}()},{key:"getCancellationPromise",value:function getCancellationPromise(signal){return new Promise((function(_,reject){if(signal==null){return}if(signal.aborted){reject(signal.reason)}else{signal.addEventListener("abort",(function(){reject(signal.reason)}))}}))}},{key:"getTransactionConfirmationPromise",value:function getTransactionConfirmationPromise(_ref6){var _this2=this;var commitment=_ref6.commitment,signature=_ref6.signature;var signatureSubscriptionId;var disposeSignatureSubscriptionStateChangeObserver;var done=false;var confirmationPromise=new Promise((function(resolve,reject){try{signatureSubscriptionId=_this2.onSignature(signature,(function(result,context){signatureSubscriptionId=undefined;var response={context:context,value:result};resolve({__type:TransactionStatus.PROCESSED,response:response})}),commitment);var subscriptionSetupPromise=new Promise((function(resolveSubscriptionSetup){if(signatureSubscriptionId==null){resolveSubscriptionSetup()}else{disposeSignatureSubscriptionStateChangeObserver=_this2._onSubscriptionStateChange(signatureSubscriptionId,(function(nextState){if(nextState==="subscribed"){resolveSubscriptionSetup()}}))}}));_asyncToGenerator(_regeneratorRuntime().mark((function _callee27(){var response,context,value;return _regeneratorRuntime().wrap((function _callee27$(_context27){while(1)switch(_context27.prev=_context27.next){case 0:_context27.next=2;return subscriptionSetupPromise;case 2:if(!done){_context27.next=4;break}return _context27.abrupt("return");case 4:_context27.next=6;return _this2.getSignatureStatus(signature);case 6:response=_context27.sent;if(!done){_context27.next=9;break}return _context27.abrupt("return");case 9:if(!(response==null)){_context27.next=11;break}return _context27.abrupt("return");case 11:context=response.context,value=response.value;if(!(value==null)){_context27.next=14;break}return _context27.abrupt("return");case 14:if(!(value!==null&&value!==void 0&&value.err)){_context27.next=18;break}reject(value.err);_context27.next=29;break;case 18:_context27.t0=commitment;_context27.next=_context27.t0==="confirmed"?21:_context27.t0==="single"?21:_context27.t0==="singleGossip"?21:_context27.t0==="finalized"?24:_context27.t0==="max"?24:_context27.t0==="root"?24:_context27.t0==="processed"?27:_context27.t0==="recent"?27:27;break;case 21:if(!(value.confirmationStatus==="processed")){_context27.next=23;break}return _context27.abrupt("return");case 23:return _context27.abrupt("break",27);case 24:if(!(value.confirmationStatus==="processed"||value.confirmationStatus==="confirmed")){_context27.next=26;break}return _context27.abrupt("return");case 26:return _context27.abrupt("break",27);case 27:done=true;resolve({__type:TransactionStatus.PROCESSED,response:{context:context,value:value}});case 29:case"end":return _context27.stop()}}),_callee27)})))()}catch(err){reject(err)}}));var abortConfirmation=function abortConfirmation(){if(disposeSignatureSubscriptionStateChangeObserver){disposeSignatureSubscriptionStateChangeObserver();disposeSignatureSubscriptionStateChangeObserver=undefined}if(signatureSubscriptionId!=null){_this2.removeSignatureListener(signatureSubscriptionId);signatureSubscriptionId=undefined}};return{abortConfirmation:abortConfirmation,confirmationPromise:confirmationPromise}}},{key:"confirmTransactionUsingBlockHeightExceedanceStrategy",value:function(){var _confirmTransactionUsingBlockHeightExceedanceStrategy=_asyncToGenerator(_regeneratorRuntime().mark((function _callee30(_ref8){var _this3=this;var commitment,_ref8$strategy,abortSignal,lastValidBlockHeight,signature,done,expiryPromise,_this$getTransactionC,abortConfirmation,confirmationPromise,cancellationPromise,result,outcome;return _regeneratorRuntime().wrap((function _callee30$(_context30){while(1)switch(_context30.prev=_context30.next){case 0:commitment=_ref8.commitment,_ref8$strategy=_ref8.strategy,abortSignal=_ref8$strategy.abortSignal,lastValidBlockHeight=_ref8$strategy.lastValidBlockHeight,signature=_ref8$strategy.signature;done=false;expiryPromise=new Promise((function(resolve){var checkBlockHeight=function(){var _ref9=_asyncToGenerator(_regeneratorRuntime().mark((function _callee28(){var blockHeight;return _regeneratorRuntime().wrap((function _callee28$(_context28){while(1)switch(_context28.prev=_context28.next){case 0:_context28.prev=0;_context28.next=3;return _this3.getBlockHeight(commitment);case 3:blockHeight=_context28.sent;return _context28.abrupt("return",blockHeight);case 7:_context28.prev=7;_context28.t0=_context28["catch"](0);return _context28.abrupt("return",-1);case 10:case"end":return _context28.stop()}}),_callee28,null,[[0,7]])})));return function checkBlockHeight(){return _ref9.apply(this,arguments)}}();_asyncToGenerator(_regeneratorRuntime().mark((function _callee29(){var currentBlockHeight;return _regeneratorRuntime().wrap((function _callee29$(_context29){while(1)switch(_context29.prev=_context29.next){case 0:_context29.next=2;return checkBlockHeight();case 2:currentBlockHeight=_context29.sent;if(!done){_context29.next=5;break}return _context29.abrupt("return");case 5:if(!(currentBlockHeight<=lastValidBlockHeight)){_context29.next=17;break}_context29.next=8;return sleep(1e3);case 8:if(!done){_context29.next=10;break}return _context29.abrupt("return");case 10:_context29.next=12;return checkBlockHeight();case 12:currentBlockHeight=_context29.sent;if(!done){_context29.next=15;break}return _context29.abrupt("return");case 15:_context29.next=5;break;case 17:resolve({__type:TransactionStatus.BLOCKHEIGHT_EXCEEDED});case 18:case"end":return _context29.stop()}}),_callee29)})))()}));_this$getTransactionC=this.getTransactionConfirmationPromise({commitment:commitment,signature:signature}),abortConfirmation=_this$getTransactionC.abortConfirmation,confirmationPromise=_this$getTransactionC.confirmationPromise;cancellationPromise=this.getCancellationPromise(abortSignal);_context30.prev=5;_context30.next=8;return Promise.race([cancellationPromise,confirmationPromise,expiryPromise]);case 8:outcome=_context30.sent;if(!(outcome.__type===TransactionStatus.PROCESSED)){_context30.next=13;break}result=outcome.response;_context30.next=14;break;case 13:throw new TransactionExpiredBlockheightExceededError(signature);case 14:_context30.prev=14;done=true;abortConfirmation();return _context30.finish(14);case 18:return _context30.abrupt("return",result);case 19:case"end":return _context30.stop()}}),_callee30,this,[[5,,14,18]])})));function confirmTransactionUsingBlockHeightExceedanceStrategy(_x46){return _confirmTransactionUsingBlockHeightExceedanceStrategy.apply(this,arguments)}return confirmTransactionUsingBlockHeightExceedanceStrategy}()},{key:"confirmTransactionUsingDurableNonceStrategy",value:function(){var _confirmTransactionUsingDurableNonceStrategy=_asyncToGenerator(_regeneratorRuntime().mark((function _callee33(_ref11){var _this4=this;var commitment,_ref11$strategy,abortSignal,minContextSlot,nonceAccountPubkey,nonceValue,signature,done,expiryPromise,_this$getTransactionC2,abortConfirmation,confirmationPromise,cancellationPromise,result,outcome,_signatureStatus,signatureStatus,_outcome$slotInWhichN,status,commitmentForStatus,confirmationStatus;return _regeneratorRuntime().wrap((function _callee33$(_context34){while(1)switch(_context34.prev=_context34.next){case 0:commitment=_ref11.commitment,_ref11$strategy=_ref11.strategy,abortSignal=_ref11$strategy.abortSignal,minContextSlot=_ref11$strategy.minContextSlot,nonceAccountPubkey=_ref11$strategy.nonceAccountPubkey,nonceValue=_ref11$strategy.nonceValue,signature=_ref11$strategy.signature;done=false;expiryPromise=new Promise((function(resolve){var currentNonceValue=nonceValue;var lastCheckedSlot=null;var getCurrentNonceValue=function(){var _ref12=_asyncToGenerator(_regeneratorRuntime().mark((function _callee31(){var _yield$_this4$getNonc,_context31,nonceAccount;return _regeneratorRuntime().wrap((function _callee31$(_context32){while(1)switch(_context32.prev=_context32.next){case 0:_context32.prev=0;_context32.next=3;return _this4.getNonceAndContext(nonceAccountPubkey,{commitment:commitment,minContextSlot:minContextSlot});case 3:_yield$_this4$getNonc=_context32.sent;_context31=_yield$_this4$getNonc.context;nonceAccount=_yield$_this4$getNonc.value;lastCheckedSlot=_context31.slot;return _context32.abrupt("return",nonceAccount===null||nonceAccount===void 0?void 0:nonceAccount.nonce);case 10:_context32.prev=10;_context32.t0=_context32["catch"](0);return _context32.abrupt("return",currentNonceValue);case 13:case"end":return _context32.stop()}}),_callee31,null,[[0,10]])})));return function getCurrentNonceValue(){return _ref12.apply(this,arguments)}}();_asyncToGenerator(_regeneratorRuntime().mark((function _callee32(){return _regeneratorRuntime().wrap((function _callee32$(_context33){while(1)switch(_context33.prev=_context33.next){case 0:_context33.next=2;return getCurrentNonceValue();case 2:currentNonceValue=_context33.sent;if(!done){_context33.next=5;break}return _context33.abrupt("return");case 5:if(!(nonceValue!==currentNonceValue)){_context33.next=9;break}resolve({__type:TransactionStatus.NONCE_INVALID,slotInWhichNonceDidAdvance:lastCheckedSlot});return _context33.abrupt("return");case 9:_context33.next=11;return sleep(2e3);case 11:if(!done){_context33.next=13;break}return _context33.abrupt("return");case 13:_context33.next=15;return getCurrentNonceValue();case 15:currentNonceValue=_context33.sent;if(!done){_context33.next=18;break}return _context33.abrupt("return");case 18:_context33.next=5;break;case 20:case"end":return _context33.stop()}}),_callee32)})))()}));_this$getTransactionC2=this.getTransactionConfirmationPromise({commitment:commitment,signature:signature}),abortConfirmation=_this$getTransactionC2.abortConfirmation,confirmationPromise=_this$getTransactionC2.confirmationPromise;cancellationPromise=this.getCancellationPromise(abortSignal);_context34.prev=5;_context34.next=8;return Promise.race([cancellationPromise,confirmationPromise,expiryPromise]);case 8:outcome=_context34.sent;if(!(outcome.__type===TransactionStatus.PROCESSED)){_context34.next=13;break}result=outcome.response;_context34.next=47;break;case 13:_context34.next=16;return this.getSignatureStatus(signature);case 16:status=_context34.sent;if(!(status==null)){_context34.next=19;break}return _context34.abrupt("break",27);case 19:if(!(status.context.slot<((_outcome$slotInWhichN=outcome.slotInWhichNonceDidAdvance)!==null&&_outcome$slotInWhichN!==void 0?_outcome$slotInWhichN:minContextSlot))){_context34.next=23;break}_context34.next=22;return sleep(400);case 22:return _context34.abrupt("continue",13);case 23:signatureStatus=status;return _context34.abrupt("break",27);case 27:if(!((_signatureStatus=signatureStatus)!==null&&_signatureStatus!==void 0&&_signatureStatus.value)){_context34.next=46;break}commitmentForStatus=commitment||"finalized";confirmationStatus=signatureStatus.value.confirmationStatus;_context34.t0=commitmentForStatus;_context34.next=_context34.t0==="processed"?33:_context34.t0==="recent"?33:_context34.t0==="confirmed"?36:_context34.t0==="single"?36:_context34.t0==="singleGossip"?36:_context34.t0==="finalized"?39:_context34.t0==="max"?39:_context34.t0==="root"?39:42;break;case 33:if(!(confirmationStatus!=="processed"&&confirmationStatus!=="confirmed"&&confirmationStatus!=="finalized")){_context34.next=35;break}throw new TransactionExpiredNonceInvalidError(signature);case 35:return _context34.abrupt("break",43);case 36:if(!(confirmationStatus!=="confirmed"&&confirmationStatus!=="finalized")){_context34.next=38;break}throw new TransactionExpiredNonceInvalidError(signature);case 38:return _context34.abrupt("break",43);case 39:if(!(confirmationStatus!=="finalized")){_context34.next=41;break}throw new TransactionExpiredNonceInvalidError(signature);case 41:return _context34.abrupt("break",43);case 42:case 43:result={context:signatureStatus.context,value:{err:signatureStatus.value.err}};_context34.next=47;break;case 46:throw new TransactionExpiredNonceInvalidError(signature);case 47:_context34.prev=47;done=true;abortConfirmation();return _context34.finish(47);case 51:return _context34.abrupt("return",result);case 52:case"end":return _context34.stop()}}),_callee33,this,[[5,,47,51]])})));function confirmTransactionUsingDurableNonceStrategy(_x47){return _confirmTransactionUsingDurableNonceStrategy.apply(this,arguments)}return confirmTransactionUsingDurableNonceStrategy}()},{key:"confirmTransactionUsingLegacyTimeoutStrategy",value:function(){var _confirmTransactionUsingLegacyTimeoutStrategy=_asyncToGenerator(_regeneratorRuntime().mark((function _callee34(_ref14){var _this5=this;var commitment,signature,timeoutId,expiryPromise,_this$getTransactionC3,abortConfirmation,confirmationPromise,result,outcome;return _regeneratorRuntime().wrap((function _callee34$(_context35){while(1)switch(_context35.prev=_context35.next){case 0:commitment=_ref14.commitment,signature=_ref14.signature;expiryPromise=new Promise((function(resolve){var timeoutMs=_this5._confirmTransactionInitialTimeout||60*1e3;switch(commitment){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":{timeoutMs=_this5._confirmTransactionInitialTimeout||30*1e3;break}}timeoutId=setTimeout((function(){return resolve({__type:TransactionStatus.TIMED_OUT,timeoutMs:timeoutMs})}),timeoutMs)}));_this$getTransactionC3=this.getTransactionConfirmationPromise({commitment:commitment,signature:signature}),abortConfirmation=_this$getTransactionC3.abortConfirmation,confirmationPromise=_this$getTransactionC3.confirmationPromise;_context35.prev=3;_context35.next=6;return Promise.race([confirmationPromise,expiryPromise]);case 6:outcome=_context35.sent;if(!(outcome.__type===TransactionStatus.PROCESSED)){_context35.next=11;break}result=outcome.response;_context35.next=12;break;case 11:throw new TransactionExpiredTimeoutError(signature,outcome.timeoutMs/1e3);case 12:_context35.prev=12;clearTimeout(timeoutId);abortConfirmation();return _context35.finish(12);case 16:return _context35.abrupt("return",result);case 17:case"end":return _context35.stop()}}),_callee34,this,[[3,,12,16]])})));function confirmTransactionUsingLegacyTimeoutStrategy(_x48){return _confirmTransactionUsingLegacyTimeoutStrategy.apply(this,arguments)}return confirmTransactionUsingLegacyTimeoutStrategy}()},{key:"getClusterNodes",value:function(){var _getClusterNodes=_asyncToGenerator(_regeneratorRuntime().mark((function _callee35(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee35$(_context36){while(1)switch(_context36.prev=_context36.next){case 0:_context36.next=2;return this._rpcRequest("getClusterNodes",[]);case 2:unsafeRes=_context36.sent;res=create(unsafeRes,jsonRpcResult(array(ContactInfoResult)));if(!("error"in res)){_context36.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get cluster nodes");case 6:return _context36.abrupt("return",res.result);case 7:case"end":return _context36.stop()}}),_callee35,this)})));function getClusterNodes(){return _getClusterNodes.apply(this,arguments)}return getClusterNodes}()},{key:"getVoteAccounts",value:function(){var _getVoteAccounts=_asyncToGenerator(_regeneratorRuntime().mark((function _callee36(commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee36$(_context37){while(1)switch(_context37.prev=_context37.next){case 0:args=this._buildArgs([],commitment);_context37.next=3;return this._rpcRequest("getVoteAccounts",args);case 3:unsafeRes=_context37.sent;res=create(unsafeRes,GetVoteAccounts);if(!("error"in res)){_context37.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get vote accounts");case 7:return _context37.abrupt("return",res.result);case 8:case"end":return _context37.stop()}}),_callee36,this)})));function getVoteAccounts(_x49){return _getVoteAccounts.apply(this,arguments)}return getVoteAccounts}()},{key:"getSlot",value:function(){var _getSlot=_asyncToGenerator(_regeneratorRuntime().mark((function _callee37(commitmentOrConfig){var _extractCommitmentFro11,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee37$(_context38){while(1)switch(_context38.prev=_context38.next){case 0:_extractCommitmentFro11=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro11.commitment,config=_extractCommitmentFro11.config;args=this._buildArgs([],commitment,undefined,config);_context38.next=4;return this._rpcRequest("getSlot",args);case 4:unsafeRes=_context38.sent;res=create(unsafeRes,jsonRpcResult(number()));if(!("error"in res)){_context38.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get slot");case 8:return _context38.abrupt("return",res.result);case 9:case"end":return _context38.stop()}}),_callee37,this)})));function getSlot(_x50){return _getSlot.apply(this,arguments)}return getSlot}()},{key:"getSlotLeader",value:function(){var _getSlotLeader=_asyncToGenerator(_regeneratorRuntime().mark((function _callee38(commitmentOrConfig){var _extractCommitmentFro12,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee38$(_context39){while(1)switch(_context39.prev=_context39.next){case 0:_extractCommitmentFro12=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro12.commitment,config=_extractCommitmentFro12.config;args=this._buildArgs([],commitment,undefined,config);_context39.next=4;return this._rpcRequest("getSlotLeader",args);case 4:unsafeRes=_context39.sent;res=create(unsafeRes,jsonRpcResult(string()));if(!("error"in res)){_context39.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get slot leader");case 8:return _context39.abrupt("return",res.result);case 9:case"end":return _context39.stop()}}),_callee38,this)})));function getSlotLeader(_x51){return _getSlotLeader.apply(this,arguments)}return getSlotLeader}()},{key:"getSlotLeaders",value:function(){var _getSlotLeaders=_asyncToGenerator(_regeneratorRuntime().mark((function _callee39(startSlot,limit){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee39$(_context40){while(1)switch(_context40.prev=_context40.next){case 0:args=[startSlot,limit];_context40.next=3;return this._rpcRequest("getSlotLeaders",args);case 3:unsafeRes=_context40.sent;res=create(unsafeRes,jsonRpcResult(array(PublicKeyFromString)));if(!("error"in res)){_context40.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get slot leaders");case 7:return _context40.abrupt("return",res.result);case 8:case"end":return _context40.stop()}}),_callee39,this)})));function getSlotLeaders(_x52,_x53){return _getSlotLeaders.apply(this,arguments)}return getSlotLeaders}()},{key:"getSignatureStatus",value:function(){var _getSignatureStatus=_asyncToGenerator(_regeneratorRuntime().mark((function _callee40(signature,config){var _yield$this$getSignat,context,values,value;return _regeneratorRuntime().wrap((function _callee40$(_context41){while(1)switch(_context41.prev=_context41.next){case 0:_context41.next=2;return this.getSignatureStatuses([signature],config);case 2:_yield$this$getSignat=_context41.sent;context=_yield$this$getSignat.context;values=_yield$this$getSignat.value;assert$1(values.length===1);value=values[0];return _context41.abrupt("return",{context:context,value:value});case 8:case"end":return _context41.stop()}}),_callee40,this)})));function getSignatureStatus(_x54,_x55){return _getSignatureStatus.apply(this,arguments)}return getSignatureStatus}()},{key:"getSignatureStatuses",value:function(){var _getSignatureStatuses=_asyncToGenerator(_regeneratorRuntime().mark((function _callee41(signatures,config){var params,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee41$(_context42){while(1)switch(_context42.prev=_context42.next){case 0:params=[signatures];if(config){params.push(config)}_context42.next=4;return this._rpcRequest("getSignatureStatuses",params);case 4:unsafeRes=_context42.sent;res=create(unsafeRes,GetSignatureStatusesRpcResult);if(!("error"in res)){_context42.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get signature status");case 8:return _context42.abrupt("return",res.result);case 9:case"end":return _context42.stop()}}),_callee41,this)})));function getSignatureStatuses(_x56,_x57){return _getSignatureStatuses.apply(this,arguments)}return getSignatureStatuses}()},{key:"getTransactionCount",value:function(){var _getTransactionCount=_asyncToGenerator(_regeneratorRuntime().mark((function _callee42(commitmentOrConfig){var _extractCommitmentFro13,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee42$(_context43){while(1)switch(_context43.prev=_context43.next){case 0:_extractCommitmentFro13=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro13.commitment,config=_extractCommitmentFro13.config;args=this._buildArgs([],commitment,undefined,config);_context43.next=4;return this._rpcRequest("getTransactionCount",args);case 4:unsafeRes=_context43.sent;res=create(unsafeRes,jsonRpcResult(number()));if(!("error"in res)){_context43.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get transaction count");case 8:return _context43.abrupt("return",res.result);case 9:case"end":return _context43.stop()}}),_callee42,this)})));function getTransactionCount(_x58){return _getTransactionCount.apply(this,arguments)}return getTransactionCount}()},{key:"getTotalSupply",value:function(){var _getTotalSupply=_asyncToGenerator(_regeneratorRuntime().mark((function _callee43(commitment){var result;return _regeneratorRuntime().wrap((function _callee43$(_context44){while(1)switch(_context44.prev=_context44.next){case 0:_context44.next=2;return this.getSupply({commitment:commitment,excludeNonCirculatingAccountsList:true});case 2:result=_context44.sent;return _context44.abrupt("return",result.value.total);case 4:case"end":return _context44.stop()}}),_callee43,this)})));function getTotalSupply(_x59){return _getTotalSupply.apply(this,arguments)}return getTotalSupply}()},{key:"getInflationGovernor",value:function(){var _getInflationGovernor=_asyncToGenerator(_regeneratorRuntime().mark((function _callee44(commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee44$(_context45){while(1)switch(_context45.prev=_context45.next){case 0:args=this._buildArgs([],commitment);_context45.next=3;return this._rpcRequest("getInflationGovernor",args);case 3:unsafeRes=_context45.sent;res=create(unsafeRes,GetInflationGovernorRpcResult);if(!("error"in res)){_context45.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get inflation");case 7:return _context45.abrupt("return",res.result);case 8:case"end":return _context45.stop()}}),_callee44,this)})));function getInflationGovernor(_x60){return _getInflationGovernor.apply(this,arguments)}return getInflationGovernor}()},{key:"getInflationReward",value:function(){var _getInflationReward=_asyncToGenerator(_regeneratorRuntime().mark((function _callee45(addresses,epoch,commitmentOrConfig){var _extractCommitmentFro14,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee45$(_context46){while(1)switch(_context46.prev=_context46.next){case 0:_extractCommitmentFro14=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro14.commitment,config=_extractCommitmentFro14.config;args=this._buildArgs([addresses.map((function(pubkey){return pubkey.toBase58()}))],commitment,undefined,_objectSpread2(_objectSpread2({},config),{},{epoch:epoch!=null?epoch:config===null||config===void 0?void 0:config.epoch}));_context46.next=4;return this._rpcRequest("getInflationReward",args);case 4:unsafeRes=_context46.sent;res=create(unsafeRes,GetInflationRewardResult);if(!("error"in res)){_context46.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get inflation reward");case 8:return _context46.abrupt("return",res.result);case 9:case"end":return _context46.stop()}}),_callee45,this)})));function getInflationReward(_x61,_x62,_x63){return _getInflationReward.apply(this,arguments)}return getInflationReward}()},{key:"getInflationRate",value:function(){var _getInflationRate=_asyncToGenerator(_regeneratorRuntime().mark((function _callee46(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee46$(_context47){while(1)switch(_context47.prev=_context47.next){case 0:_context47.next=2;return this._rpcRequest("getInflationRate",[]);case 2:unsafeRes=_context47.sent;res=create(unsafeRes,GetInflationRateRpcResult);if(!("error"in res)){_context47.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get inflation rate");case 6:return _context47.abrupt("return",res.result);case 7:case"end":return _context47.stop()}}),_callee46,this)})));function getInflationRate(){return _getInflationRate.apply(this,arguments)}return getInflationRate}()},{key:"getEpochInfo",value:function(){var _getEpochInfo=_asyncToGenerator(_regeneratorRuntime().mark((function _callee47(commitmentOrConfig){var _extractCommitmentFro15,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee47$(_context48){while(1)switch(_context48.prev=_context48.next){case 0:_extractCommitmentFro15=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro15.commitment,config=_extractCommitmentFro15.config;args=this._buildArgs([],commitment,undefined,config);_context48.next=4;return this._rpcRequest("getEpochInfo",args);case 4:unsafeRes=_context48.sent;res=create(unsafeRes,GetEpochInfoRpcResult);if(!("error"in res)){_context48.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get epoch info");case 8:return _context48.abrupt("return",res.result);case 9:case"end":return _context48.stop()}}),_callee47,this)})));function getEpochInfo(_x64){return _getEpochInfo.apply(this,arguments)}return getEpochInfo}()},{key:"getEpochSchedule",value:function(){var _getEpochSchedule=_asyncToGenerator(_regeneratorRuntime().mark((function _callee48(){var unsafeRes,res,epochSchedule;return _regeneratorRuntime().wrap((function _callee48$(_context49){while(1)switch(_context49.prev=_context49.next){case 0:_context49.next=2;return this._rpcRequest("getEpochSchedule",[]);case 2:unsafeRes=_context49.sent;res=create(unsafeRes,GetEpochScheduleRpcResult);if(!("error"in res)){_context49.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get epoch schedule");case 6:epochSchedule=res.result;return _context49.abrupt("return",new EpochSchedule(epochSchedule.slotsPerEpoch,epochSchedule.leaderScheduleSlotOffset,epochSchedule.warmup,epochSchedule.firstNormalEpoch,epochSchedule.firstNormalSlot));case 8:case"end":return _context49.stop()}}),_callee48,this)})));function getEpochSchedule(){return _getEpochSchedule.apply(this,arguments)}return getEpochSchedule}()},{key:"getLeaderSchedule",value:function(){var _getLeaderSchedule=_asyncToGenerator(_regeneratorRuntime().mark((function _callee49(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee49$(_context50){while(1)switch(_context50.prev=_context50.next){case 0:_context50.next=2;return this._rpcRequest("getLeaderSchedule",[]);case 2:unsafeRes=_context50.sent;res=create(unsafeRes,GetLeaderScheduleRpcResult);if(!("error"in res)){_context50.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get leader schedule");case 6:return _context50.abrupt("return",res.result);case 7:case"end":return _context50.stop()}}),_callee49,this)})));function getLeaderSchedule(){return _getLeaderSchedule.apply(this,arguments)}return getLeaderSchedule}()},{key:"getMinimumBalanceForRentExemption",value:function(){var _getMinimumBalanceForRentExemption=_asyncToGenerator(_regeneratorRuntime().mark((function _callee50(dataLength,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee50$(_context51){while(1)switch(_context51.prev=_context51.next){case 0:args=this._buildArgs([dataLength],commitment);_context51.next=3;return this._rpcRequest("getMinimumBalanceForRentExemption",args);case 3:unsafeRes=_context51.sent;res=create(unsafeRes,GetMinimumBalanceForRentExemptionRpcResult);if(!("error"in res)){_context51.next=8;break}console.warn("Unable to fetch minimum balance for rent exemption");return _context51.abrupt("return",0);case 8:return _context51.abrupt("return",res.result);case 9:case"end":return _context51.stop()}}),_callee50,this)})));function getMinimumBalanceForRentExemption(_x65,_x66){return _getMinimumBalanceForRentExemption.apply(this,arguments)}return getMinimumBalanceForRentExemption}()},{key:"getRecentBlockhashAndContext",value:function(){var _getRecentBlockhashAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee51(commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee51$(_context52){while(1)switch(_context52.prev=_context52.next){case 0:args=this._buildArgs([],commitment);_context52.next=3;return this._rpcRequest("getRecentBlockhash",args);case 3:unsafeRes=_context52.sent;res=create(unsafeRes,GetRecentBlockhashAndContextRpcResult);if(!("error"in res)){_context52.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get recent blockhash");case 7:return _context52.abrupt("return",res.result);case 8:case"end":return _context52.stop()}}),_callee51,this)})));function getRecentBlockhashAndContext(_x67){return _getRecentBlockhashAndContext.apply(this,arguments)}return getRecentBlockhashAndContext}()},{key:"getRecentPerformanceSamples",value:function(){var _getRecentPerformanceSamples=_asyncToGenerator(_regeneratorRuntime().mark((function _callee52(limit){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee52$(_context53){while(1)switch(_context53.prev=_context53.next){case 0:_context53.next=2;return this._rpcRequest("getRecentPerformanceSamples",limit?[limit]:[]);case 2:unsafeRes=_context53.sent;res=create(unsafeRes,GetRecentPerformanceSamplesRpcResult);if(!("error"in res)){_context53.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get recent performance samples");case 6:return _context53.abrupt("return",res.result);case 7:case"end":return _context53.stop()}}),_callee52,this)})));function getRecentPerformanceSamples(_x68){return _getRecentPerformanceSamples.apply(this,arguments)}return getRecentPerformanceSamples}()},{key:"getFeeCalculatorForBlockhash",value:function(){var _getFeeCalculatorForBlockhash=_asyncToGenerator(_regeneratorRuntime().mark((function _callee53(blockhash,commitment){var args,unsafeRes,res,_res$result,context,value;return _regeneratorRuntime().wrap((function _callee53$(_context54){while(1)switch(_context54.prev=_context54.next){case 0:args=this._buildArgs([blockhash],commitment);_context54.next=3;return this._rpcRequest("getFeeCalculatorForBlockhash",args);case 3:unsafeRes=_context54.sent;res=create(unsafeRes,GetFeeCalculatorRpcResult);if(!("error"in res)){_context54.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get fee calculator");case 7:_res$result=res.result,context=_res$result.context,value=_res$result.value;return _context54.abrupt("return",{context:context,value:value!==null?value.feeCalculator:null});case 9:case"end":return _context54.stop()}}),_callee53,this)})));function getFeeCalculatorForBlockhash(_x69,_x70){return _getFeeCalculatorForBlockhash.apply(this,arguments)}return getFeeCalculatorForBlockhash}()},{key:"getFeeForMessage",value:function(){var _getFeeForMessage=_asyncToGenerator(_regeneratorRuntime().mark((function _callee54(message,commitment){var wireMessage,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee54$(_context55){while(1)switch(_context55.prev=_context55.next){case 0:wireMessage=toBuffer(message.serialize()).toString("base64");args=this._buildArgs([wireMessage],commitment);_context55.next=4;return this._rpcRequest("getFeeForMessage",args);case 4:unsafeRes=_context55.sent;res=create(unsafeRes,jsonRpcResultAndContext(nullable(number())));if(!("error"in res)){_context55.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get fee for message");case 8:if(!(res.result===null)){_context55.next=10;break}throw new Error("invalid blockhash");case 10:return _context55.abrupt("return",res.result);case 11:case"end":return _context55.stop()}}),_callee54,this)})));function getFeeForMessage(_x71,_x72){return _getFeeForMessage.apply(this,arguments)}return getFeeForMessage}()},{key:"getRecentPrioritizationFees",value:function(){var _getRecentPrioritizationFees=_asyncToGenerator(_regeneratorRuntime().mark((function _callee55(config){var _config$lockedWritabl;var accounts,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee55$(_context56){while(1)switch(_context56.prev=_context56.next){case 0:accounts=config===null||config===void 0?void 0:(_config$lockedWritabl=config.lockedWritableAccounts)===null||_config$lockedWritabl===void 0?void 0:_config$lockedWritabl.map((function(key){return key.toBase58()}));args=accounts!==null&&accounts!==void 0&&accounts.length?[accounts]:[];_context56.next=4;return this._rpcRequest("getRecentPrioritizationFees",args);case 4:unsafeRes=_context56.sent;res=create(unsafeRes,GetRecentPrioritizationFeesRpcResult);if(!("error"in res)){_context56.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get recent prioritization fees");case 8:return _context56.abrupt("return",res.result);case 9:case"end":return _context56.stop()}}),_callee55,this)})));function getRecentPrioritizationFees(_x73){return _getRecentPrioritizationFees.apply(this,arguments)}return getRecentPrioritizationFees}()},{key:"getRecentBlockhash",value:function(){var _getRecentBlockhash=_asyncToGenerator(_regeneratorRuntime().mark((function _callee56(commitment){var res;return _regeneratorRuntime().wrap((function _callee56$(_context57){while(1)switch(_context57.prev=_context57.next){case 0:_context57.prev=0;_context57.next=3;return this.getRecentBlockhashAndContext(commitment);case 3:res=_context57.sent;return _context57.abrupt("return",res.value);case 7:_context57.prev=7;_context57.t0=_context57["catch"](0);throw new Error("failed to get recent blockhash: "+_context57.t0);case 10:case"end":return _context57.stop()}}),_callee56,this,[[0,7]])})));function getRecentBlockhash(_x74){return _getRecentBlockhash.apply(this,arguments)}return getRecentBlockhash}()},{key:"getLatestBlockhash",value:function(){var _getLatestBlockhash=_asyncToGenerator(_regeneratorRuntime().mark((function _callee57(commitmentOrConfig){var res;return _regeneratorRuntime().wrap((function _callee57$(_context58){while(1)switch(_context58.prev=_context58.next){case 0:_context58.prev=0;_context58.next=3;return this.getLatestBlockhashAndContext(commitmentOrConfig);case 3:res=_context58.sent;return _context58.abrupt("return",res.value);case 7:_context58.prev=7;_context58.t0=_context58["catch"](0);throw new Error("failed to get recent blockhash: "+_context58.t0);case 10:case"end":return _context58.stop()}}),_callee57,this,[[0,7]])})));function getLatestBlockhash(_x75){return _getLatestBlockhash.apply(this,arguments)}return getLatestBlockhash}()},{key:"getLatestBlockhashAndContext",value:function(){var _getLatestBlockhashAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee58(commitmentOrConfig){var _extractCommitmentFro16,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee58$(_context59){while(1)switch(_context59.prev=_context59.next){case 0:_extractCommitmentFro16=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro16.commitment,config=_extractCommitmentFro16.config;args=this._buildArgs([],commitment,undefined,config);_context59.next=4;return this._rpcRequest("getLatestBlockhash",args);case 4:unsafeRes=_context59.sent;res=create(unsafeRes,GetLatestBlockhashRpcResult);if(!("error"in res)){_context59.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get latest blockhash");case 8:return _context59.abrupt("return",res.result);case 9:case"end":return _context59.stop()}}),_callee58,this)})));function getLatestBlockhashAndContext(_x76){return _getLatestBlockhashAndContext.apply(this,arguments)}return getLatestBlockhashAndContext}()},{key:"isBlockhashValid",value:function(){var _isBlockhashValid=_asyncToGenerator(_regeneratorRuntime().mark((function _callee59(blockhash,rawConfig){var _extractCommitmentFro17,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee59$(_context60){while(1)switch(_context60.prev=_context60.next){case 0:_extractCommitmentFro17=extractCommitmentFromConfig(rawConfig),commitment=_extractCommitmentFro17.commitment,config=_extractCommitmentFro17.config;args=this._buildArgs([blockhash],commitment,undefined,config);_context60.next=4;return this._rpcRequest("isBlockhashValid",args);case 4:unsafeRes=_context60.sent;res=create(unsafeRes,IsBlockhashValidRpcResult);if(!("error"in res)){_context60.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to determine if the blockhash `"+blockhash+"`is valid");case 8:return _context60.abrupt("return",res.result);case 9:case"end":return _context60.stop()}}),_callee59,this)})));function isBlockhashValid(_x77,_x78){return _isBlockhashValid.apply(this,arguments)}return isBlockhashValid}()},{key:"getVersion",value:function(){var _getVersion=_asyncToGenerator(_regeneratorRuntime().mark((function _callee60(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee60$(_context61){while(1)switch(_context61.prev=_context61.next){case 0:_context61.next=2;return this._rpcRequest("getVersion",[]);case 2:unsafeRes=_context61.sent;res=create(unsafeRes,jsonRpcResult(VersionResult));if(!("error"in res)){_context61.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get version");case 6:return _context61.abrupt("return",res.result);case 7:case"end":return _context61.stop()}}),_callee60,this)})));function getVersion(){return _getVersion.apply(this,arguments)}return getVersion}()},{key:"getGenesisHash",value:function(){var _getGenesisHash=_asyncToGenerator(_regeneratorRuntime().mark((function _callee61(){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee61$(_context62){while(1)switch(_context62.prev=_context62.next){case 0:_context62.next=2;return this._rpcRequest("getGenesisHash",[]);case 2:unsafeRes=_context62.sent;res=create(unsafeRes,jsonRpcResult(string()));if(!("error"in res)){_context62.next=6;break}throw new SolanaJSONRPCError(res.error,"failed to get genesis hash");case 6:return _context62.abrupt("return",res.result);case 7:case"end":return _context62.stop()}}),_callee61,this)})));function getGenesisHash(){return _getGenesisHash.apply(this,arguments)}return getGenesisHash}()},{key:"getBlock",value:function(){var _getBlock=_asyncToGenerator(_regeneratorRuntime().mark((function _callee62(slot,rawConfig){var _extractCommitmentFro18,commitment,config,args,unsafeRes,res,_res,_res2,result;return _regeneratorRuntime().wrap((function _callee62$(_context63){while(1)switch(_context63.prev=_context63.next){case 0:_extractCommitmentFro18=extractCommitmentFromConfig(rawConfig),commitment=_extractCommitmentFro18.commitment,config=_extractCommitmentFro18.config;args=this._buildArgsAtLeastConfirmed([slot],commitment,undefined,config);_context63.next=4;return this._rpcRequest("getBlock",args);case 4:unsafeRes=_context63.sent;_context63.prev=5;_context63.t0=config===null||config===void 0?void 0:config.transactionDetails;_context63.next=_context63.t0==="accounts"?9:_context63.t0==="none"?13:17;break;case 9:res=create(unsafeRes,GetAccountsModeBlockRpcResult);if(!("error"in res)){_context63.next=12;break}throw res.error;case 12:return _context63.abrupt("return",res.result);case 13:_res=create(unsafeRes,GetNoneModeBlockRpcResult);if(!("error"in _res)){_context63.next=16;break}throw _res.error;case 16:return _context63.abrupt("return",_res.result);case 17:_res2=create(unsafeRes,GetBlockRpcResult);if(!("error"in _res2)){_context63.next=20;break}throw _res2.error;case 20:result=_res2.result;return _context63.abrupt("return",result?_objectSpread2(_objectSpread2({},result),{},{transactions:result.transactions.map((function(_ref15){var transaction=_ref15.transaction,meta=_ref15.meta,version=_ref15.version;return{meta:meta,transaction:_objectSpread2(_objectSpread2({},transaction),{},{message:versionedMessageFromResponse(version,transaction.message)}),version:version}}))}):null);case 22:_context63.next=27;break;case 24:_context63.prev=24;_context63.t1=_context63["catch"](5);throw new SolanaJSONRPCError(_context63.t1,"failed to get confirmed block");case 27:case"end":return _context63.stop()}}),_callee62,this,[[5,24]])})));function getBlock(_x79,_x80){return _getBlock.apply(this,arguments)}return getBlock}()},{key:"getParsedBlock",value:function(){var _getParsedBlock=_asyncToGenerator(_regeneratorRuntime().mark((function _callee63(slot,rawConfig){var _extractCommitmentFro19,commitment,config,args,unsafeRes,res,_res3,_res4;return _regeneratorRuntime().wrap((function _callee63$(_context64){while(1)switch(_context64.prev=_context64.next){case 0:_extractCommitmentFro19=extractCommitmentFromConfig(rawConfig),commitment=_extractCommitmentFro19.commitment,config=_extractCommitmentFro19.config;args=this._buildArgsAtLeastConfirmed([slot],commitment,"jsonParsed",config);_context64.next=4;return this._rpcRequest("getBlock",args);case 4:unsafeRes=_context64.sent;_context64.prev=5;_context64.t0=config===null||config===void 0?void 0:config.transactionDetails;_context64.next=_context64.t0==="accounts"?9:_context64.t0==="none"?13:17;break;case 9:res=create(unsafeRes,GetParsedAccountsModeBlockRpcResult);if(!("error"in res)){_context64.next=12;break}throw res.error;case 12:return _context64.abrupt("return",res.result);case 13:_res3=create(unsafeRes,GetParsedNoneModeBlockRpcResult);if(!("error"in _res3)){_context64.next=16;break}throw _res3.error;case 16:return _context64.abrupt("return",_res3.result);case 17:_res4=create(unsafeRes,GetParsedBlockRpcResult);if(!("error"in _res4)){_context64.next=20;break}throw _res4.error;case 20:return _context64.abrupt("return",_res4.result);case 21:_context64.next=26;break;case 23:_context64.prev=23;_context64.t1=_context64["catch"](5);throw new SolanaJSONRPCError(_context64.t1,"failed to get block");case 26:case"end":return _context64.stop()}}),_callee63,this,[[5,23]])})));function getParsedBlock(_x81,_x82){return _getParsedBlock.apply(this,arguments)}return getParsedBlock}()},{key:"getBlockProduction",value:function(){var _getBlockProduction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee64(configOrCommitment){var extra,commitment,c,rest,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee64$(_context65){while(1)switch(_context65.prev=_context65.next){case 0:if(typeof configOrCommitment==="string"){commitment=configOrCommitment}else if(configOrCommitment){c=configOrCommitment.commitment,rest=_objectWithoutProperties(configOrCommitment,_excluded3);commitment=c;extra=rest}args=this._buildArgs([],commitment,"base64",extra);_context65.next=4;return this._rpcRequest("getBlockProduction",args);case 4:unsafeRes=_context65.sent;res=create(unsafeRes,BlockProductionResponseStruct);if(!("error"in res)){_context65.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get block production information");case 8:return _context65.abrupt("return",res.result);case 9:case"end":return _context65.stop()}}),_callee64,this)})));function getBlockProduction(_x83){return _getBlockProduction.apply(this,arguments)}return getBlockProduction}()},{key:"getTransaction",value:function(){var _getTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee65(signature,rawConfig){var _extractCommitmentFro20,commitment,config,args,unsafeRes,res,result;return _regeneratorRuntime().wrap((function _callee65$(_context66){while(1)switch(_context66.prev=_context66.next){case 0:_extractCommitmentFro20=extractCommitmentFromConfig(rawConfig),commitment=_extractCommitmentFro20.commitment,config=_extractCommitmentFro20.config;args=this._buildArgsAtLeastConfirmed([signature],commitment,undefined,config);_context66.next=4;return this._rpcRequest("getTransaction",args);case 4:unsafeRes=_context66.sent;res=create(unsafeRes,GetTransactionRpcResult);if(!("error"in res)){_context66.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get transaction");case 8:result=res.result;if(result){_context66.next=11;break}return _context66.abrupt("return",result);case 11:return _context66.abrupt("return",_objectSpread2(_objectSpread2({},result),{},{transaction:_objectSpread2(_objectSpread2({},result.transaction),{},{message:versionedMessageFromResponse(result.version,result.transaction.message)})}));case 12:case"end":return _context66.stop()}}),_callee65,this)})));function getTransaction(_x84,_x85){return _getTransaction.apply(this,arguments)}return getTransaction}()},{key:"getParsedTransaction",value:function(){var _getParsedTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee66(signature,commitmentOrConfig){var _extractCommitmentFro21,commitment,config,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee66$(_context67){while(1)switch(_context67.prev=_context67.next){case 0:_extractCommitmentFro21=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro21.commitment,config=_extractCommitmentFro21.config;args=this._buildArgsAtLeastConfirmed([signature],commitment,"jsonParsed",config);_context67.next=4;return this._rpcRequest("getTransaction",args);case 4:unsafeRes=_context67.sent;res=create(unsafeRes,GetParsedTransactionRpcResult);if(!("error"in res)){_context67.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get transaction");case 8:return _context67.abrupt("return",res.result);case 9:case"end":return _context67.stop()}}),_callee66,this)})));function getParsedTransaction(_x86,_x87){return _getParsedTransaction.apply(this,arguments)}return getParsedTransaction}()},{key:"getParsedTransactions",value:function(){var _getParsedTransactions=_asyncToGenerator(_regeneratorRuntime().mark((function _callee67(signatures,commitmentOrConfig){var _this6=this;var _extractCommitmentFro22,commitment,config,batch,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee67$(_context68){while(1)switch(_context68.prev=_context68.next){case 0:_extractCommitmentFro22=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro22.commitment,config=_extractCommitmentFro22.config;batch=signatures.map((function(signature){var args=_this6._buildArgsAtLeastConfirmed([signature],commitment,"jsonParsed",config);return{methodName:"getTransaction",args:args}}));_context68.next=4;return this._rpcBatchRequest(batch);case 4:unsafeRes=_context68.sent;res=unsafeRes.map((function(unsafeRes){var res=create(unsafeRes,GetParsedTransactionRpcResult);if("error"in res){throw new SolanaJSONRPCError(res.error,"failed to get transactions")}return res.result}));return _context68.abrupt("return",res);case 7:case"end":return _context68.stop()}}),_callee67,this)})));function getParsedTransactions(_x88,_x89){return _getParsedTransactions.apply(this,arguments)}return getParsedTransactions}()},{key:"getTransactions",value:function(){var _getTransactions=_asyncToGenerator(_regeneratorRuntime().mark((function _callee68(signatures,commitmentOrConfig){var _this7=this;var _extractCommitmentFro23,commitment,config,batch,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee68$(_context69){while(1)switch(_context69.prev=_context69.next){case 0:_extractCommitmentFro23=extractCommitmentFromConfig(commitmentOrConfig),commitment=_extractCommitmentFro23.commitment,config=_extractCommitmentFro23.config;batch=signatures.map((function(signature){var args=_this7._buildArgsAtLeastConfirmed([signature],commitment,undefined,config);return{methodName:"getTransaction",args:args}}));_context69.next=4;return this._rpcBatchRequest(batch);case 4:unsafeRes=_context69.sent;res=unsafeRes.map((function(unsafeRes){var res=create(unsafeRes,GetTransactionRpcResult);if("error"in res){throw new SolanaJSONRPCError(res.error,"failed to get transactions")}var result=res.result;if(!result)return result;return _objectSpread2(_objectSpread2({},result),{},{transaction:_objectSpread2(_objectSpread2({},result.transaction),{},{message:versionedMessageFromResponse(result.version,result.transaction.message)})})}));return _context69.abrupt("return",res);case 7:case"end":return _context69.stop()}}),_callee68,this)})));function getTransactions(_x90,_x91){return _getTransactions.apply(this,arguments)}return getTransactions}()},{key:"getConfirmedBlock",value:function(){var _getConfirmedBlock=_asyncToGenerator(_regeneratorRuntime().mark((function _callee69(slot,commitment){var args,unsafeRes,res,result,block;return _regeneratorRuntime().wrap((function _callee69$(_context70){while(1)switch(_context70.prev=_context70.next){case 0:args=this._buildArgsAtLeastConfirmed([slot],commitment);_context70.next=3;return this._rpcRequest("getConfirmedBlock",args);case 3:unsafeRes=_context70.sent;res=create(unsafeRes,GetConfirmedBlockRpcResult);if(!("error"in res)){_context70.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get confirmed block");case 7:result=res.result;if(result){_context70.next=10;break}throw new Error("Confirmed block "+slot+" not found");case 10:block=_objectSpread2(_objectSpread2({},result),{},{transactions:result.transactions.map((function(_ref16){var transaction=_ref16.transaction,meta=_ref16.meta;var message=new Message(transaction.message);return{meta:meta,transaction:_objectSpread2(_objectSpread2({},transaction),{},{message:message})}}))});return _context70.abrupt("return",_objectSpread2(_objectSpread2({},block),{},{transactions:block.transactions.map((function(_ref17){var transaction=_ref17.transaction,meta=_ref17.meta;return{meta:meta,transaction:Transaction.populate(transaction.message,transaction.signatures)}}))}));case 12:case"end":return _context70.stop()}}),_callee69,this)})));function getConfirmedBlock(_x92,_x93){return _getConfirmedBlock.apply(this,arguments)}return getConfirmedBlock}()},{key:"getBlocks",value:function(){var _getBlocks=_asyncToGenerator(_regeneratorRuntime().mark((function _callee70(startSlot,endSlot,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee70$(_context71){while(1)switch(_context71.prev=_context71.next){case 0:args=this._buildArgsAtLeastConfirmed(endSlot!==undefined?[startSlot,endSlot]:[startSlot],commitment);_context71.next=3;return this._rpcRequest("getBlocks",args);case 3:unsafeRes=_context71.sent;res=create(unsafeRes,jsonRpcResult(array(number())));if(!("error"in res)){_context71.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get blocks");case 7:return _context71.abrupt("return",res.result);case 8:case"end":return _context71.stop()}}),_callee70,this)})));function getBlocks(_x94,_x95,_x96){return _getBlocks.apply(this,arguments)}return getBlocks}()},{key:"getBlockSignatures",value:function(){var _getBlockSignatures=_asyncToGenerator(_regeneratorRuntime().mark((function _callee71(slot,commitment){var args,unsafeRes,res,result;return _regeneratorRuntime().wrap((function _callee71$(_context72){while(1)switch(_context72.prev=_context72.next){case 0:args=this._buildArgsAtLeastConfirmed([slot],commitment,undefined,{transactionDetails:"signatures",rewards:false});_context72.next=3;return this._rpcRequest("getBlock",args);case 3:unsafeRes=_context72.sent;res=create(unsafeRes,GetBlockSignaturesRpcResult);if(!("error"in res)){_context72.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get block");case 7:result=res.result;if(result){_context72.next=10;break}throw new Error("Block "+slot+" not found");case 10:return _context72.abrupt("return",result);case 11:case"end":return _context72.stop()}}),_callee71,this)})));function getBlockSignatures(_x97,_x98){return _getBlockSignatures.apply(this,arguments)}return getBlockSignatures}()},{key:"getConfirmedBlockSignatures",value:function(){var _getConfirmedBlockSignatures=_asyncToGenerator(_regeneratorRuntime().mark((function _callee72(slot,commitment){var args,unsafeRes,res,result;return _regeneratorRuntime().wrap((function _callee72$(_context73){while(1)switch(_context73.prev=_context73.next){case 0:args=this._buildArgsAtLeastConfirmed([slot],commitment,undefined,{transactionDetails:"signatures",rewards:false});_context73.next=3;return this._rpcRequest("getConfirmedBlock",args);case 3:unsafeRes=_context73.sent;res=create(unsafeRes,GetBlockSignaturesRpcResult);if(!("error"in res)){_context73.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get confirmed block");case 7:result=res.result;if(result){_context73.next=10;break}throw new Error("Confirmed block "+slot+" not found");case 10:return _context73.abrupt("return",result);case 11:case"end":return _context73.stop()}}),_callee72,this)})));function getConfirmedBlockSignatures(_x99,_x100){return _getConfirmedBlockSignatures.apply(this,arguments)}return getConfirmedBlockSignatures}()},{key:"getConfirmedTransaction",value:function(){var _getConfirmedTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee73(signature,commitment){var args,unsafeRes,res,result,message,signatures;return _regeneratorRuntime().wrap((function _callee73$(_context74){while(1)switch(_context74.prev=_context74.next){case 0:args=this._buildArgsAtLeastConfirmed([signature],commitment);_context74.next=3;return this._rpcRequest("getConfirmedTransaction",args);case 3:unsafeRes=_context74.sent;res=create(unsafeRes,GetTransactionRpcResult);if(!("error"in res)){_context74.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get transaction");case 7:result=res.result;if(result){_context74.next=10;break}return _context74.abrupt("return",result);case 10:message=new Message(result.transaction.message);signatures=result.transaction.signatures;return _context74.abrupt("return",_objectSpread2(_objectSpread2({},result),{},{transaction:Transaction.populate(message,signatures)}));case 13:case"end":return _context74.stop()}}),_callee73,this)})));function getConfirmedTransaction(_x101,_x102){return _getConfirmedTransaction.apply(this,arguments)}return getConfirmedTransaction}()},{key:"getParsedConfirmedTransaction",value:function(){var _getParsedConfirmedTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee74(signature,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee74$(_context75){while(1)switch(_context75.prev=_context75.next){case 0:args=this._buildArgsAtLeastConfirmed([signature],commitment,"jsonParsed");_context75.next=3;return this._rpcRequest("getConfirmedTransaction",args);case 3:unsafeRes=_context75.sent;res=create(unsafeRes,GetParsedTransactionRpcResult);if(!("error"in res)){_context75.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get confirmed transaction");case 7:return _context75.abrupt("return",res.result);case 8:case"end":return _context75.stop()}}),_callee74,this)})));function getParsedConfirmedTransaction(_x103,_x104){return _getParsedConfirmedTransaction.apply(this,arguments)}return getParsedConfirmedTransaction}()},{key:"getParsedConfirmedTransactions",value:function(){var _getParsedConfirmedTransactions=_asyncToGenerator(_regeneratorRuntime().mark((function _callee75(signatures,commitment){var _this8=this;var batch,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee75$(_context76){while(1)switch(_context76.prev=_context76.next){case 0:batch=signatures.map((function(signature){var args=_this8._buildArgsAtLeastConfirmed([signature],commitment,"jsonParsed");return{methodName:"getConfirmedTransaction",args:args}}));_context76.next=3;return this._rpcBatchRequest(batch);case 3:unsafeRes=_context76.sent;res=unsafeRes.map((function(unsafeRes){var res=create(unsafeRes,GetParsedTransactionRpcResult);if("error"in res){throw new SolanaJSONRPCError(res.error,"failed to get confirmed transactions")}return res.result}));return _context76.abrupt("return",res);case 6:case"end":return _context76.stop()}}),_callee75,this)})));function getParsedConfirmedTransactions(_x105,_x106){return _getParsedConfirmedTransactions.apply(this,arguments)}return getParsedConfirmedTransactions}()},{key:"getConfirmedSignaturesForAddress",value:function(){var _getConfirmedSignaturesForAddress=_asyncToGenerator(_regeneratorRuntime().mark((function _callee76(address,startSlot,endSlot){var options,firstAvailableBlock,block,highestConfirmedRoot,_block,confirmedSignatureInfo;return _regeneratorRuntime().wrap((function _callee76$(_context77){while(1)switch(_context77.prev=_context77.next){case 0:options={};_context77.next=3;return this.getFirstAvailableBlock();case 3:firstAvailableBlock=_context77.sent;case 4:if("until"in options){_context77.next=24;break}startSlot--;if(!(startSlot<=0||startSlot0){options.until=block.signatures[block.signatures.length-1].toString()}_context77.next=22;break;case 15:_context77.prev=15;_context77.t0=_context77["catch"](8);if(!(_context77.t0 instanceof Error&&_context77.t0.message.includes("skipped"))){_context77.next=21;break}return _context77.abrupt("continue",4);case 21:throw _context77.t0;case 22:_context77.next=4;break;case 24:_context77.next=26;return this.getSlot("finalized");case 26:highestConfirmedRoot=_context77.sent;case 27:if("before"in options){_context77.next=47;break}endSlot++;if(!(endSlot>highestConfirmedRoot)){_context77.next=31;break}return _context77.abrupt("break",47);case 31:_context77.prev=31;_context77.next=34;return this.getConfirmedBlockSignatures(endSlot);case 34:_block=_context77.sent;if(_block.signatures.length>0){options.before=_block.signatures[_block.signatures.length-1].toString()}_context77.next=45;break;case 38:_context77.prev=38;_context77.t1=_context77["catch"](31);if(!(_context77.t1 instanceof Error&&_context77.t1.message.includes("skipped"))){_context77.next=44;break}return _context77.abrupt("continue",27);case 44:throw _context77.t1;case 45:_context77.next=27;break;case 47:_context77.next=49;return this.getConfirmedSignaturesForAddress2(address,options);case 49:confirmedSignatureInfo=_context77.sent;return _context77.abrupt("return",confirmedSignatureInfo.map((function(info){return info.signature})));case 51:case"end":return _context77.stop()}}),_callee76,this,[[8,15],[31,38]])})));function getConfirmedSignaturesForAddress(_x107,_x108,_x109){return _getConfirmedSignaturesForAddress.apply(this,arguments)}return getConfirmedSignaturesForAddress}()},{key:"getConfirmedSignaturesForAddress2",value:function(){var _getConfirmedSignaturesForAddress2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee77(address,options,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee77$(_context78){while(1)switch(_context78.prev=_context78.next){case 0:args=this._buildArgsAtLeastConfirmed([address.toBase58()],commitment,undefined,options);_context78.next=3;return this._rpcRequest("getConfirmedSignaturesForAddress2",args);case 3:unsafeRes=_context78.sent;res=create(unsafeRes,GetConfirmedSignaturesForAddress2RpcResult);if(!("error"in res)){_context78.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get confirmed signatures for address");case 7:return _context78.abrupt("return",res.result);case 8:case"end":return _context78.stop()}}),_callee77,this)})));function getConfirmedSignaturesForAddress2(_x110,_x111,_x112){return _getConfirmedSignaturesForAddress2.apply(this,arguments)}return getConfirmedSignaturesForAddress2}()},{key:"getSignaturesForAddress",value:function(){var _getSignaturesForAddress=_asyncToGenerator(_regeneratorRuntime().mark((function _callee78(address,options,commitment){var args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee78$(_context79){while(1)switch(_context79.prev=_context79.next){case 0:args=this._buildArgsAtLeastConfirmed([address.toBase58()],commitment,undefined,options);_context79.next=3;return this._rpcRequest("getSignaturesForAddress",args);case 3:unsafeRes=_context79.sent;res=create(unsafeRes,GetSignaturesForAddressRpcResult);if(!("error"in res)){_context79.next=7;break}throw new SolanaJSONRPCError(res.error,"failed to get signatures for address");case 7:return _context79.abrupt("return",res.result);case 8:case"end":return _context79.stop()}}),_callee78,this)})));function getSignaturesForAddress(_x113,_x114,_x115){return _getSignaturesForAddress.apply(this,arguments)}return getSignaturesForAddress}()},{key:"getAddressLookupTable",value:function(){var _getAddressLookupTable=_asyncToGenerator(_regeneratorRuntime().mark((function _callee79(accountKey,config){var _yield$this$getAccoun,context,accountInfo,value;return _regeneratorRuntime().wrap((function _callee79$(_context80){while(1)switch(_context80.prev=_context80.next){case 0:_context80.next=2;return this.getAccountInfoAndContext(accountKey,config);case 2:_yield$this$getAccoun=_context80.sent;context=_yield$this$getAccoun.context;accountInfo=_yield$this$getAccoun.value;value=null;if(accountInfo!==null){value=new AddressLookupTableAccount({key:accountKey,state:AddressLookupTableAccount.deserialize(accountInfo.data)})}return _context80.abrupt("return",{context:context,value:value});case 8:case"end":return _context80.stop()}}),_callee79,this)})));function getAddressLookupTable(_x116,_x117){return _getAddressLookupTable.apply(this,arguments)}return getAddressLookupTable}()},{key:"getNonceAndContext",value:function(){var _getNonceAndContext=_asyncToGenerator(_regeneratorRuntime().mark((function _callee80(nonceAccount,commitmentOrConfig){var _yield$this$getAccoun2,context,accountInfo,value;return _regeneratorRuntime().wrap((function _callee80$(_context81){while(1)switch(_context81.prev=_context81.next){case 0:_context81.next=2;return this.getAccountInfoAndContext(nonceAccount,commitmentOrConfig);case 2:_yield$this$getAccoun2=_context81.sent;context=_yield$this$getAccoun2.context;accountInfo=_yield$this$getAccoun2.value;value=null;if(accountInfo!==null){value=NonceAccount.fromAccountData(accountInfo.data)}return _context81.abrupt("return",{context:context,value:value});case 8:case"end":return _context81.stop()}}),_callee80,this)})));function getNonceAndContext(_x118,_x119){return _getNonceAndContext.apply(this,arguments)}return getNonceAndContext}()},{key:"getNonce",value:function(){var _getNonce=_asyncToGenerator(_regeneratorRuntime().mark((function _callee81(nonceAccount,commitmentOrConfig){return _regeneratorRuntime().wrap((function _callee81$(_context82){while(1)switch(_context82.prev=_context82.next){case 0:_context82.next=2;return this.getNonceAndContext(nonceAccount,commitmentOrConfig).then((function(x){return x.value}))["catch"]((function(e){throw new Error("failed to get nonce for account "+nonceAccount.toBase58()+": "+e)}));case 2:return _context82.abrupt("return",_context82.sent);case 3:case"end":return _context82.stop()}}),_callee81,this)})));function getNonce(_x120,_x121){return _getNonce.apply(this,arguments)}return getNonce}()},{key:"requestAirdrop",value:function(){var _requestAirdrop=_asyncToGenerator(_regeneratorRuntime().mark((function _callee82(to,lamports){var unsafeRes,res;return _regeneratorRuntime().wrap((function _callee82$(_context83){while(1)switch(_context83.prev=_context83.next){case 0:_context83.next=2;return this._rpcRequest("requestAirdrop",[to.toBase58(),lamports]);case 2:unsafeRes=_context83.sent;res=create(unsafeRes,RequestAirdropRpcResult);if(!("error"in res)){_context83.next=6;break}throw new SolanaJSONRPCError(res.error,"airdrop to ".concat(to.toBase58()," failed"));case 6:return _context83.abrupt("return",res.result);case 7:case"end":return _context83.stop()}}),_callee82,this)})));function requestAirdrop(_x122,_x123){return _requestAirdrop.apply(this,arguments)}return requestAirdrop}()},{key:"_blockhashWithExpiryBlockHeight",value:function(){var _blockhashWithExpiryBlockHeight2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee83(disableCache){var timeSinceFetch,expired;return _regeneratorRuntime().wrap((function _callee83$(_context84){while(1)switch(_context84.prev=_context84.next){case 0:if(disableCache){_context84.next=10;break}case 1:if(!this._pollingBlockhash){_context84.next=6;break}_context84.next=4;return sleep(100);case 4:_context84.next=1;break;case 6:timeSinceFetch=Date.now()-this._blockhashInfo.lastFetch;expired=timeSinceFetch>=BLOCKHASH_CACHE_TIMEOUT_MS;if(!(this._blockhashInfo.latestBlockhash!==null&&!expired)){_context84.next=10;break}return _context84.abrupt("return",this._blockhashInfo.latestBlockhash);case 10:_context84.next=12;return this._pollNewBlockhash();case 12:return _context84.abrupt("return",_context84.sent);case 13:case"end":return _context84.stop()}}),_callee83,this)})));function _blockhashWithExpiryBlockHeight(_x124){return _blockhashWithExpiryBlockHeight2.apply(this,arguments)}return _blockhashWithExpiryBlockHeight}()},{key:"_pollNewBlockhash",value:function(){var _pollNewBlockhash2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee84(){var startTime,cachedLatestBlockhash,cachedBlockhash,i,latestBlockhash;return _regeneratorRuntime().wrap((function _callee84$(_context85){while(1)switch(_context85.prev=_context85.next){case 0:this._pollingBlockhash=true;_context85.prev=1;startTime=Date.now();cachedLatestBlockhash=this._blockhashInfo.latestBlockhash;cachedBlockhash=cachedLatestBlockhash?cachedLatestBlockhash.blockhash:null;i=0;case 6:if(!(i<50)){_context85.next=18;break}_context85.next=9;return this.getLatestBlockhash("finalized");case 9:latestBlockhash=_context85.sent;if(!(cachedBlockhash!==latestBlockhash.blockhash)){_context85.next=13;break}this._blockhashInfo={latestBlockhash:latestBlockhash,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]};return _context85.abrupt("return",latestBlockhash);case 13:_context85.next=15;return sleep(MS_PER_SLOT/2);case 15:i++;_context85.next=6;break;case 18:throw new Error("Unable to obtain a new blockhash after ".concat(Date.now()-startTime,"ms"));case 19:_context85.prev=19;this._pollingBlockhash=false;return _context85.finish(19);case 22:case"end":return _context85.stop()}}),_callee84,this,[[1,,19,22]])})));function _pollNewBlockhash(){return _pollNewBlockhash2.apply(this,arguments)}return _pollNewBlockhash}()},{key:"getStakeMinimumDelegation",value:function(){var _getStakeMinimumDelegation=_asyncToGenerator(_regeneratorRuntime().mark((function _callee85(config){var _extractCommitmentFro24,commitment,configArg,args,unsafeRes,res;return _regeneratorRuntime().wrap((function _callee85$(_context86){while(1)switch(_context86.prev=_context86.next){case 0:_extractCommitmentFro24=extractCommitmentFromConfig(config),commitment=_extractCommitmentFro24.commitment,configArg=_extractCommitmentFro24.config;args=this._buildArgs([],commitment,"base64",configArg);_context86.next=4;return this._rpcRequest("getStakeMinimumDelegation",args);case 4:unsafeRes=_context86.sent;res=create(unsafeRes,jsonRpcResultAndContext(number()));if(!("error"in res)){_context86.next=8;break}throw new SolanaJSONRPCError(res.error,"failed to get stake minimum delegation");case 8:return _context86.abrupt("return",res.result);case 9:case"end":return _context86.stop()}}),_callee85,this)})));function getStakeMinimumDelegation(_x125){return _getStakeMinimumDelegation.apply(this,arguments)}return getStakeMinimumDelegation}()},{key:"simulateTransaction",value:function(){var _simulateTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee86(transactionOrMessage,configOrSigners,includeAccounts){var versionedTx,_wireTransaction,_encodedTransaction,_config2,_args87,_unsafeRes,_res5,transaction,originalTx,signers,_transaction,disableCache,_transaction2,latestBlockhash,_signature,message,signData,wireTransaction,encodedTransaction,config,addresses,args,unsafeRes,res,_logs,traceIndent,logTrace;return _regeneratorRuntime().wrap((function _callee86$(_context87){while(1)switch(_context87.prev=_context87.next){case 0:if(!("message"in transactionOrMessage)){_context87.next=17;break}versionedTx=transactionOrMessage;_wireTransaction=versionedTx.serialize();_encodedTransaction=buffer.Buffer.from(_wireTransaction).toString("base64");if(!(Array.isArray(configOrSigners)||includeAccounts!==undefined)){_context87.next=6;break}throw new Error("Invalid arguments");case 6:_config2=configOrSigners||{};_config2.encoding="base64";if(!("commitment"in _config2)){_config2.commitment=this.commitment}_args87=[_encodedTransaction,_config2];_context87.next=12;return this._rpcRequest("simulateTransaction",_args87);case 12:_unsafeRes=_context87.sent;_res5=create(_unsafeRes,SimulatedTransactionResponseStruct);if(!("error"in _res5)){_context87.next=16;break}throw new Error("failed to simulate transaction: "+_res5.error.message);case 16:return _context87.abrupt("return",_res5.result);case 17:if(transactionOrMessage instanceof Transaction){originalTx=transactionOrMessage;transaction=new Transaction;transaction.feePayer=originalTx.feePayer;transaction.instructions=transactionOrMessage.instructions;transaction.nonceInfo=originalTx.nonceInfo;transaction.signatures=originalTx.signatures}else{transaction=Transaction.populate(transactionOrMessage);transaction._message=transaction._json=undefined}if(!(configOrSigners!==undefined&&!Array.isArray(configOrSigners))){_context87.next=20;break}throw new Error("Invalid arguments");case 20:signers=configOrSigners;if(!(transaction.nonceInfo&&signers)){_context87.next=25;break}(_transaction=transaction).sign.apply(_transaction,_toConsumableArray(signers));_context87.next=45;break;case 25:disableCache=this._disableBlockhashCaching;case 26:_context87.next=28;return this._blockhashWithExpiryBlockHeight(disableCache);case 28:latestBlockhash=_context87.sent;transaction.lastValidBlockHeight=latestBlockhash.lastValidBlockHeight;transaction.recentBlockhash=latestBlockhash.blockhash;if(signers){_context87.next=33;break}return _context87.abrupt("break",45);case 33:(_transaction2=transaction).sign.apply(_transaction2,_toConsumableArray(signers));if(transaction.signature){_context87.next=36;break}throw new Error("!signature");case 36:_signature=transaction.signature.toString("base64");if(!(!this._blockhashInfo.simulatedSignatures.includes(_signature)&&!this._blockhashInfo.transactionSignatures.includes(_signature))){_context87.next=42;break}this._blockhashInfo.simulatedSignatures.push(_signature);return _context87.abrupt("break",45);case 42:disableCache=true;case 43:_context87.next=26;break;case 45:message=transaction._compile();signData=message.serialize();wireTransaction=transaction._serialize(signData);encodedTransaction=wireTransaction.toString("base64");config={encoding:"base64",commitment:this.commitment};if(includeAccounts){addresses=(Array.isArray(includeAccounts)?includeAccounts:message.nonProgramIds()).map((function(key){return key.toBase58()}));config["accounts"]={encoding:"base64",addresses:addresses}}if(signers){config.sigVerify=true}args=[encodedTransaction,config];_context87.next=55;return this._rpcRequest("simulateTransaction",args);case 55:unsafeRes=_context87.sent;res=create(unsafeRes,SimulatedTransactionResponseStruct);if(!("error"in res)){_context87.next=60;break}if("data"in res.error){_logs=res.error.data.logs;if(_logs&&Array.isArray(_logs)){traceIndent="\n ";logTrace=traceIndent+_logs.join(traceIndent);console.error(res.error.message,logTrace)}}throw new SendTransactionError("failed to simulate transaction: "+res.error.message,_logs);case 60:return _context87.abrupt("return",res.result);case 61:case"end":return _context87.stop()}}),_callee86,this)})));function simulateTransaction(_x126,_x127,_x128){return _simulateTransaction.apply(this,arguments)}return simulateTransaction}()},{key:"sendTransaction",value:function(){var _sendTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee87(transaction,signersOrOptions,options){var _wireTransaction2,signers,disableCache,latestBlockhash,_signature2,wireTransaction;return _regeneratorRuntime().wrap((function _callee87$(_context88){while(1)switch(_context88.prev=_context88.next){case 0:if(!("version"in transaction)){_context88.next=7;break}if(!(signersOrOptions&&Array.isArray(signersOrOptions))){_context88.next=3;break}throw new Error("Invalid arguments");case 3:_wireTransaction2=transaction.serialize();_context88.next=6;return this.sendRawTransaction(_wireTransaction2,signersOrOptions);case 6:return _context88.abrupt("return",_context88.sent);case 7:if(!(signersOrOptions===undefined||!Array.isArray(signersOrOptions))){_context88.next=9;break}throw new Error("Invalid arguments");case 9:signers=signersOrOptions;if(!transaction.nonceInfo){_context88.next=14;break}transaction.sign.apply(transaction,_toConsumableArray(signers));_context88.next=32;break;case 14:disableCache=this._disableBlockhashCaching;case 15:_context88.next=17;return this._blockhashWithExpiryBlockHeight(disableCache);case 17:latestBlockhash=_context88.sent;transaction.lastValidBlockHeight=latestBlockhash.lastValidBlockHeight;transaction.recentBlockhash=latestBlockhash.blockhash;transaction.sign.apply(transaction,_toConsumableArray(signers));if(transaction.signature){_context88.next=23;break}throw new Error("!signature");case 23:_signature2=transaction.signature.toString("base64");if(this._blockhashInfo.transactionSignatures.includes(_signature2)){_context88.next=29;break}this._blockhashInfo.transactionSignatures.push(_signature2);return _context88.abrupt("break",32);case 29:disableCache=true;case 30:_context88.next=15;break;case 32:wireTransaction=transaction.serialize();_context88.next=35;return this.sendRawTransaction(wireTransaction,options);case 35:return _context88.abrupt("return",_context88.sent);case 36:case"end":return _context88.stop()}}),_callee87,this)})));function sendTransaction(_x129,_x130,_x131){return _sendTransaction.apply(this,arguments)}return sendTransaction}()},{key:"sendRawTransaction",value:function(){var _sendRawTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee88(rawTransaction,options){var encodedTransaction,result;return _regeneratorRuntime().wrap((function _callee88$(_context89){while(1)switch(_context89.prev=_context89.next){case 0:encodedTransaction=toBuffer(rawTransaction).toString("base64");_context89.next=3;return this.sendEncodedTransaction(encodedTransaction,options);case 3:result=_context89.sent;return _context89.abrupt("return",result);case 5:case"end":return _context89.stop()}}),_callee88,this)})));function sendRawTransaction(_x132,_x133){return _sendRawTransaction.apply(this,arguments)}return sendRawTransaction}()},{key:"sendEncodedTransaction",value:function(){var _sendEncodedTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee89(encodedTransaction,options){var config,skipPreflight,preflightCommitment,args,unsafeRes,res,_logs2;return _regeneratorRuntime().wrap((function _callee89$(_context90){while(1)switch(_context90.prev=_context90.next){case 0:config={encoding:"base64"};skipPreflight=options&&options.skipPreflight;preflightCommitment=options&&options.preflightCommitment||this.commitment;if(options&&options.maxRetries!=null){config.maxRetries=options.maxRetries}if(options&&options.minContextSlot!=null){config.minContextSlot=options.minContextSlot}if(skipPreflight){config.skipPreflight=skipPreflight}if(preflightCommitment){config.preflightCommitment=preflightCommitment}args=[encodedTransaction,config];_context90.next=10;return this._rpcRequest("sendTransaction",args);case 10:unsafeRes=_context90.sent;res=create(unsafeRes,SendTransactionRpcResult);if(!("error"in res)){_context90.next=15;break}if("data"in res.error){_logs2=res.error.data.logs}throw new SendTransactionError("failed to send transaction: "+res.error.message,_logs2);case 15:return _context90.abrupt("return",res.result);case 16:case"end":return _context90.stop()}}),_callee89,this)})));function sendEncodedTransaction(_x134,_x135){return _sendEncodedTransaction.apply(this,arguments)}return sendEncodedTransaction}()},{key:"_wsOnOpen",value:function _wsOnOpen(){var _this9=this;this._rpcWebSocketConnected=true;this._rpcWebSocketHeartbeat=setInterval((function(){_asyncToGenerator(_regeneratorRuntime().mark((function _callee90(){return _regeneratorRuntime().wrap((function _callee90$(_context91){while(1)switch(_context91.prev=_context91.next){case 0:_context91.prev=0;_context91.next=3;return _this9._rpcWebSocket.notify("ping");case 3:_context91.next=7;break;case 5:_context91.prev=5;_context91.t0=_context91["catch"](0);case 7:case"end":return _context91.stop()}}),_callee90,null,[[0,5]])})))()}),5e3);this._updateSubscriptions()}},{key:"_wsOnError",value:function _wsOnError(err){this._rpcWebSocketConnected=false;console.error("ws error:",err.message)}},{key:"_wsOnClose",value:function _wsOnClose(code){var _this10=this;this._rpcWebSocketConnected=false;this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER;if(this._rpcWebSocketIdleTimeout){clearTimeout(this._rpcWebSocketIdleTimeout);this._rpcWebSocketIdleTimeout=null}if(this._rpcWebSocketHeartbeat){clearInterval(this._rpcWebSocketHeartbeat);this._rpcWebSocketHeartbeat=null}if(code===1e3){this._updateSubscriptions();return}this._subscriptionCallbacksByServerSubscriptionId={};Object.entries(this._subscriptionsByHash).forEach((function(_ref19){var _ref20=_slicedToArray(_ref19,2),hash=_ref20[0],subscription=_ref20[1];_this10._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"pending"}))}))}},{key:"_setSubscription",value:function _setSubscription(hash,nextSubscription){var _this$_subscriptionsB;var prevState=(_this$_subscriptionsB=this._subscriptionsByHash[hash])===null||_this$_subscriptionsB===void 0?void 0:_this$_subscriptionsB.state;this._subscriptionsByHash[hash]=nextSubscription;if(prevState!==nextSubscription.state){var stateChangeCallbacks=this._subscriptionStateChangeCallbacksByHash[hash];if(stateChangeCallbacks){stateChangeCallbacks.forEach((function(cb){try{cb(nextSubscription.state)}catch(_unused2){}}))}}}},{key:"_onSubscriptionStateChange",value:function _onSubscriptionStateChange(clientSubscriptionId,callback){var _this$_subscriptionSt,_this11=this;var hash=this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];if(hash==null){return function(){}}var stateChangeCallbacks=(_this$_subscriptionSt=this._subscriptionStateChangeCallbacksByHash)[hash]||(_this$_subscriptionSt[hash]=new Set);stateChangeCallbacks.add(callback);return function(){stateChangeCallbacks["delete"](callback);if(stateChangeCallbacks.size===0){delete _this11._subscriptionStateChangeCallbacksByHash[hash]}}}},{key:"_updateSubscriptions",value:function(){var _updateSubscriptions2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee94(){var _this12=this;var activeWebSocketGeneration,isCurrentConnectionStillActive;return _regeneratorRuntime().wrap((function _callee94$(_context95){while(1)switch(_context95.prev=_context95.next){case 0:if(!(Object.keys(this._subscriptionsByHash).length===0)){_context95.next=3;break}if(this._rpcWebSocketConnected){this._rpcWebSocketConnected=false;this._rpcWebSocketIdleTimeout=setTimeout((function(){_this12._rpcWebSocketIdleTimeout=null;try{_this12._rpcWebSocket.close()}catch(err){if(err instanceof Error){console.log("Error when closing socket connection: ".concat(err.message))}}}),500)}return _context95.abrupt("return");case 3:if(this._rpcWebSocketIdleTimeout!==null){clearTimeout(this._rpcWebSocketIdleTimeout);this._rpcWebSocketIdleTimeout=null;this._rpcWebSocketConnected=true}if(this._rpcWebSocketConnected){_context95.next=7;break}this._rpcWebSocket.connect();return _context95.abrupt("return");case 7:activeWebSocketGeneration=this._rpcWebSocketGeneration;isCurrentConnectionStillActive=function isCurrentConnectionStillActive(){return activeWebSocketGeneration===_this12._rpcWebSocketGeneration};_context95.next=11;return Promise.all(Object.keys(this._subscriptionsByHash).map(function(){var _ref21=_asyncToGenerator(_regeneratorRuntime().mark((function _callee93(hash){var subscription;return _regeneratorRuntime().wrap((function _callee93$(_context94){while(1)switch(_context94.prev=_context94.next){case 0:subscription=_this12._subscriptionsByHash[hash];if(!(subscription===undefined)){_context94.next=3;break}return _context94.abrupt("return");case 3:_context94.t0=subscription.state;_context94.next=_context94.t0==="pending"?6:_context94.t0==="unsubscribed"?6:_context94.t0==="subscribed"?15:_context94.t0==="subscribing"?19:_context94.t0==="unsubscribing"?19:20;break;case 6:if(!(subscription.callbacks.size===0)){_context94.next=12;break}delete _this12._subscriptionsByHash[hash];if(subscription.state==="unsubscribed"){delete _this12._subscriptionCallbacksByServerSubscriptionId[subscription.serverSubscriptionId]}_context94.next=11;return _this12._updateSubscriptions();case 11:return _context94.abrupt("return");case 12:_context94.next=14;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee91(){var args,method,_serverSubscriptionId;return _regeneratorRuntime().wrap((function _callee91$(_context92){while(1)switch(_context92.prev=_context92.next){case 0:args=subscription.args,method=subscription.method;_context92.prev=1;_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"subscribing"}));_context92.next=5;return _this12._rpcWebSocket.call(method,args);case 5:_serverSubscriptionId=_context92.sent;_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{serverSubscriptionId:_serverSubscriptionId,state:"subscribed"}));_this12._subscriptionCallbacksByServerSubscriptionId[_serverSubscriptionId]=subscription.callbacks;_context92.next=10;return _this12._updateSubscriptions();case 10:_context92.next=20;break;case 12:_context92.prev=12;_context92.t0=_context92["catch"](1);if(_context92.t0 instanceof Error){console.error("".concat(method," error for argument"),args,_context92.t0.message)}if(isCurrentConnectionStillActive()){_context92.next=17;break}return _context92.abrupt("return");case 17:_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"pending"}));_context92.next=20;return _this12._updateSubscriptions();case 20:case"end":return _context92.stop()}}),_callee91,null,[[1,12]])})))();case 14:return _context94.abrupt("break",20);case 15:if(!(subscription.callbacks.size===0)){_context94.next=18;break}_context94.next=18;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee92(){var serverSubscriptionId,unsubscribeMethod;return _regeneratorRuntime().wrap((function _callee92$(_context93){while(1)switch(_context93.prev=_context93.next){case 0:serverSubscriptionId=subscription.serverSubscriptionId,unsubscribeMethod=subscription.unsubscribeMethod;if(!_this12._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)){_context93.next=5;break}_this12._subscriptionsAutoDisposedByRpc["delete"](serverSubscriptionId);_context93.next=21;break;case 5:_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"unsubscribing"}));_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"unsubscribing"}));_context93.prev=7;_context93.next=10;return _this12._rpcWebSocket.call(unsubscribeMethod,[serverSubscriptionId]);case 10:_context93.next=21;break;case 12:_context93.prev=12;_context93.t0=_context93["catch"](7);if(_context93.t0 instanceof Error){console.error("".concat(unsubscribeMethod," error:"),_context93.t0.message)}if(isCurrentConnectionStillActive()){_context93.next=17;break}return _context93.abrupt("return");case 17:_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"subscribed"}));_context93.next=20;return _this12._updateSubscriptions();case 20:return _context93.abrupt("return");case 21:_this12._setSubscription(hash,_objectSpread2(_objectSpread2({},subscription),{},{state:"unsubscribed"}));_context93.next=24;return _this12._updateSubscriptions();case 24:case"end":return _context93.stop()}}),_callee92,null,[[7,12]])})))();case 18:return _context94.abrupt("break",20);case 19:return _context94.abrupt("break",20);case 20:case"end":return _context94.stop()}}),_callee93)})));return function(_x136){return _ref21.apply(this,arguments)}}()));case 11:case"end":return _context95.stop()}}),_callee94,this)})));function _updateSubscriptions(){return _updateSubscriptions2.apply(this,arguments)}return _updateSubscriptions}()},{key:"_handleServerNotification",value:function _handleServerNotification(serverSubscriptionId,callbackArgs){var callbacks=this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];if(callbacks===undefined){return}callbacks.forEach((function(cb){try{cb.apply(void 0,_toConsumableArray(callbackArgs))}catch(e){console.error(e)}}))}},{key:"_wsOnAccountNotification",value:function _wsOnAccountNotification(notification){var _create=create(notification,AccountNotificationResult),result=_create.result,subscription=_create.subscription;this._handleServerNotification(subscription,[result.value,result.context])}},{key:"_makeSubscription",value:function _makeSubscription(subscriptionConfig,args){var _this13=this;var clientSubscriptionId=this._nextClientSubscriptionId++;var hash=fastStableStringify$1([subscriptionConfig.method,args],true);var existingSubscription=this._subscriptionsByHash[hash];if(existingSubscription===undefined){this._subscriptionsByHash[hash]=_objectSpread2(_objectSpread2({},subscriptionConfig),{},{args:args,callbacks:new Set([subscriptionConfig.callback]),state:"pending"})}else{existingSubscription.callbacks.add(subscriptionConfig.callback)}this._subscriptionHashByClientSubscriptionId[clientSubscriptionId]=hash;this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId]=_asyncToGenerator(_regeneratorRuntime().mark((function _callee95(){var subscription;return _regeneratorRuntime().wrap((function _callee95$(_context96){while(1)switch(_context96.prev=_context96.next){case 0:delete _this13._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];delete _this13._subscriptionHashByClientSubscriptionId[clientSubscriptionId];subscription=_this13._subscriptionsByHash[hash];assert$1(subscription!==undefined,"Could not find a `Subscription` when tearing down client subscription #".concat(clientSubscriptionId));subscription.callbacks["delete"](subscriptionConfig.callback);_context96.next=7;return _this13._updateSubscriptions();case 7:case"end":return _context96.stop()}}),_callee95)})));this._updateSubscriptions();return clientSubscriptionId}},{key:"onAccountChange",value:function onAccountChange(publicKey,callback,commitment){var args=this._buildArgs([publicKey.toBase58()],commitment||this._commitment||"finalized","base64");return this._makeSubscription({callback:callback,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},args)}},{key:"removeAccountChangeListener",value:function(){var _removeAccountChangeListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee96(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee96$(_context97){while(1)switch(_context97.prev=_context97.next){case 0:_context97.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"account change");case 2:case"end":return _context97.stop()}}),_callee96,this)})));function removeAccountChangeListener(_x137){return _removeAccountChangeListener.apply(this,arguments)}return removeAccountChangeListener}()},{key:"_wsOnProgramAccountNotification",value:function _wsOnProgramAccountNotification(notification){var _create2=create(notification,ProgramAccountNotificationResult),result=_create2.result,subscription=_create2.subscription;this._handleServerNotification(subscription,[{accountId:result.value.pubkey,accountInfo:result.value.account},result.context])}},{key:"onProgramAccountChange",value:function onProgramAccountChange(programId,callback,commitment,filters){var args=this._buildArgs([programId.toBase58()],commitment||this._commitment||"finalized","base64",filters?{filters:filters}:undefined);return this._makeSubscription({callback:callback,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},args)}},{key:"removeProgramAccountChangeListener",value:function(){var _removeProgramAccountChangeListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee97(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee97$(_context98){while(1)switch(_context98.prev=_context98.next){case 0:_context98.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"program account change");case 2:case"end":return _context98.stop()}}),_callee97,this)})));function removeProgramAccountChangeListener(_x138){return _removeProgramAccountChangeListener.apply(this,arguments)}return removeProgramAccountChangeListener}()},{key:"onLogs",value:function onLogs(filter,callback,commitment){var args=this._buildArgs([_typeof$1(filter)==="object"?{mentions:[filter.toString()]}:filter],commitment||this._commitment||"finalized");return this._makeSubscription({callback:callback,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},args)}},{key:"removeOnLogsListener",value:function(){var _removeOnLogsListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee98(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee98$(_context99){while(1)switch(_context99.prev=_context99.next){case 0:_context99.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"logs");case 2:case"end":return _context99.stop()}}),_callee98,this)})));function removeOnLogsListener(_x139){return _removeOnLogsListener.apply(this,arguments)}return removeOnLogsListener}()},{key:"_wsOnLogsNotification",value:function _wsOnLogsNotification(notification){var _create3=create(notification,LogsNotificationResult),result=_create3.result,subscription=_create3.subscription;this._handleServerNotification(subscription,[result.value,result.context])}},{key:"_wsOnSlotNotification",value:function _wsOnSlotNotification(notification){var _create4=create(notification,SlotNotificationResult),result=_create4.result,subscription=_create4.subscription;this._handleServerNotification(subscription,[result])}},{key:"onSlotChange",value:function onSlotChange(callback){return this._makeSubscription({callback:callback,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}},{key:"removeSlotChangeListener",value:function(){var _removeSlotChangeListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee99(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee99$(_context100){while(1)switch(_context100.prev=_context100.next){case 0:_context100.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"slot change");case 2:case"end":return _context100.stop()}}),_callee99,this)})));function removeSlotChangeListener(_x140){return _removeSlotChangeListener.apply(this,arguments)}return removeSlotChangeListener}()},{key:"_wsOnSlotUpdatesNotification",value:function _wsOnSlotUpdatesNotification(notification){var _create5=create(notification,SlotUpdateNotificationResult),result=_create5.result,subscription=_create5.subscription;this._handleServerNotification(subscription,[result])}},{key:"onSlotUpdate",value:function onSlotUpdate(callback){return this._makeSubscription({callback:callback,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}},{key:"removeSlotUpdateListener",value:function(){var _removeSlotUpdateListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee100(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee100$(_context101){while(1)switch(_context101.prev=_context101.next){case 0:_context101.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"slot update");case 2:case"end":return _context101.stop()}}),_callee100,this)})));function removeSlotUpdateListener(_x141){return _removeSlotUpdateListener.apply(this,arguments)}return removeSlotUpdateListener}()},{key:"_unsubscribeClientSubscription",value:function(){var _unsubscribeClientSubscription2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee101(clientSubscriptionId,subscriptionName){var dispose;return _regeneratorRuntime().wrap((function _callee101$(_context102){while(1)switch(_context102.prev=_context102.next){case 0:dispose=this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];if(!dispose){_context102.next=6;break}_context102.next=4;return dispose();case 4:_context102.next=7;break;case 6:console.warn("Ignored unsubscribe request because an active subscription with id "+"`".concat(clientSubscriptionId,"` for '").concat(subscriptionName,"' events ")+"could not be found.");case 7:case"end":return _context102.stop()}}),_callee101,this)})));function _unsubscribeClientSubscription(_x142,_x143){return _unsubscribeClientSubscription2.apply(this,arguments)}return _unsubscribeClientSubscription}()},{key:"_buildArgs",value:function _buildArgs(args,override,encoding,extra){var commitment=override||this._commitment;if(commitment||encoding||extra){var _options={};if(encoding){_options.encoding=encoding}if(commitment){_options.commitment=commitment}if(extra){_options=Object.assign(_options,extra)}args.push(_options)}return args}},{key:"_buildArgsAtLeastConfirmed",value:function _buildArgsAtLeastConfirmed(args,override,encoding,extra){var commitment=override||this._commitment;if(commitment&&!["confirmed","finalized"].includes(commitment)){throw new Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`")}return this._buildArgs(args,override,encoding,extra)}},{key:"_wsOnSignatureNotification",value:function _wsOnSignatureNotification(notification){var _create6=create(notification,SignatureNotificationResult),result=_create6.result,subscription=_create6.subscription;if(result.value!=="receivedSignature"){this._subscriptionsAutoDisposedByRpc.add(subscription)}this._handleServerNotification(subscription,result.value==="receivedSignature"?[{type:"received"},result.context]:[{type:"status",result:result.value},result.context])}},{key:"onSignature",value:function onSignature(signature,_callback,commitment){var _this14=this;var args=this._buildArgs([signature],commitment||this._commitment||"finalized");var clientSubscriptionId=this._makeSubscription({callback:function callback(notification,context){if(notification.type==="status"){_callback(notification.result,context);try{_this14.removeSignatureListener(clientSubscriptionId)}catch(_err){}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},args);return clientSubscriptionId}},{key:"onSignatureWithOptions",value:function onSignatureWithOptions(signature,_callback2,options){var _this15=this;var _options$commitment=_objectSpread2(_objectSpread2({},options),{},{commitment:options&&options.commitment||this._commitment||"finalized"}),commitment=_options$commitment.commitment,extra=_objectWithoutProperties(_options$commitment,_excluded4);var args=this._buildArgs([signature],commitment,undefined,extra);var clientSubscriptionId=this._makeSubscription({callback:function callback(notification,context){_callback2(notification,context);try{_this15.removeSignatureListener(clientSubscriptionId)}catch(_err){}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},args);return clientSubscriptionId}},{key:"removeSignatureListener",value:function(){var _removeSignatureListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee102(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee102$(_context103){while(1)switch(_context103.prev=_context103.next){case 0:_context103.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"signature result");case 2:case"end":return _context103.stop()}}),_callee102,this)})));function removeSignatureListener(_x144){return _removeSignatureListener.apply(this,arguments)}return removeSignatureListener}()},{key:"_wsOnRootNotification",value:function _wsOnRootNotification(notification){var _create7=create(notification,RootNotificationResult),result=_create7.result,subscription=_create7.subscription;this._handleServerNotification(subscription,[result])}},{key:"onRootChange",value:function onRootChange(callback){return this._makeSubscription({callback:callback,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}},{key:"removeRootChangeListener",value:function(){var _removeRootChangeListener=_asyncToGenerator(_regeneratorRuntime().mark((function _callee103(clientSubscriptionId){return _regeneratorRuntime().wrap((function _callee103$(_context104){while(1)switch(_context104.prev=_context104.next){case 0:_context104.next=2;return this._unsubscribeClientSubscription(clientSubscriptionId,"root change");case 2:case"end":return _context104.stop()}}),_callee103,this)})));function removeRootChangeListener(_x145){return _removeRootChangeListener.apply(this,arguments)}return removeRootChangeListener}()}]);return Connection}();var Keypair=function(){function Keypair(keypair){_classCallCheck(this,Keypair);this._keypair=void 0;this._keypair=keypair!==null&&keypair!==void 0?keypair:generateKeypair()}_createClass(Keypair,[{key:"publicKey",get:function get(){return new PublicKey(this._keypair.publicKey)}},{key:"secretKey",get:function get(){return new Uint8Array(this._keypair.secretKey)}}],[{key:"generate",value:function generate(){return new Keypair(generateKeypair())}},{key:"fromSecretKey",value:function fromSecretKey(secretKey,options){if(secretKey.byteLength!==64){throw new Error("bad secret key size")}var publicKey=secretKey.slice(32,64);if(!options||!options.skipValidation){var privateScalar=secretKey.slice(0,32);var computedPublicKey=getPublicKey(privateScalar);for(var ii=0;ii<32;ii++){if(publicKey[ii]!==computedPublicKey[ii]){throw new Error("provided secretKey is invalid")}}}return new Keypair({publicKey:publicKey,secretKey:secretKey})}},{key:"fromSeed",value:function fromSeed(seed){var publicKey=getPublicKey(seed);var secretKey=new Uint8Array(64);secretKey.set(seed);secretKey.set(publicKey,32);return new Keypair({publicKey:publicKey,secretKey:secretKey})}}]);return Keypair}();var LOOKUP_TABLE_INSTRUCTION_LAYOUTS=Object.freeze({CreateLookupTable:{index:0,layout:struct([u32("instruction"),u64$2("recentSlot"),u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:struct([u32("instruction")])},ExtendLookupTable:{index:2,layout:struct([u32("instruction"),u64$2(),seq(publicKey(),offset(u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:struct([u32("instruction")])},CloseLookupTable:{index:4,layout:struct([u32("instruction")])}});var AddressLookupTableInstruction=function(){function AddressLookupTableInstruction(){_classCallCheck(this,AddressLookupTableInstruction)}_createClass(AddressLookupTableInstruction,null,[{key:"decodeInstructionType",value:function decodeInstructionType(instruction){this.checkProgramId(instruction.programId);var instructionTypeLayout=u32("instruction");var index=instructionTypeLayout.decode(instruction.data);var type;for(var _i=0,_Object$entries=Object.entries(LOOKUP_TABLE_INSTRUCTION_LAYOUTS);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),layoutType=_Object$entries$_i[0],layout=_Object$entries$_i[1];if(layout.index==index){type=layoutType;break}}if(!type){throw new Error("Invalid Instruction. Should be a LookupTable Instruction")}return type}},{key:"decodeCreateLookupTable",value:function decodeCreateLookupTable(instruction){this.checkProgramId(instruction.programId);this.checkKeysLength(instruction.keys,4);var _decodeData=decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,instruction.data),recentSlot=_decodeData.recentSlot;return{authority:instruction.keys[1].pubkey,payer:instruction.keys[2].pubkey,recentSlot:Number(recentSlot)}}},{key:"decodeExtendLookupTable",value:function decodeExtendLookupTable(instruction){this.checkProgramId(instruction.programId);if(instruction.keys.length<2){throw new Error("invalid instruction; found ".concat(instruction.keys.length," keys, expected at least 2"))}var _decodeData2=decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,instruction.data),addresses=_decodeData2.addresses;return{lookupTable:instruction.keys[0].pubkey,authority:instruction.keys[1].pubkey,payer:instruction.keys.length>2?instruction.keys[2].pubkey:undefined,addresses:addresses.map((function(buffer){return new PublicKey(buffer)}))}}},{key:"decodeCloseLookupTable",value:function decodeCloseLookupTable(instruction){this.checkProgramId(instruction.programId);this.checkKeysLength(instruction.keys,3);return{lookupTable:instruction.keys[0].pubkey,authority:instruction.keys[1].pubkey,recipient:instruction.keys[2].pubkey}}},{key:"decodeFreezeLookupTable",value:function decodeFreezeLookupTable(instruction){this.checkProgramId(instruction.programId);this.checkKeysLength(instruction.keys,2);return{lookupTable:instruction.keys[0].pubkey,authority:instruction.keys[1].pubkey}}},{key:"decodeDeactivateLookupTable",value:function decodeDeactivateLookupTable(instruction){this.checkProgramId(instruction.programId);this.checkKeysLength(instruction.keys,2);return{lookupTable:instruction.keys[0].pubkey,authority:instruction.keys[1].pubkey}}},{key:"checkProgramId",value:function checkProgramId(programId){if(!programId.equals(AddressLookupTableProgram.programId)){throw new Error("invalid instruction; programId is not AddressLookupTable Program")}}},{key:"checkKeysLength",value:function checkKeysLength(keys,expectedLength){if(keys.length>_32n&U32_MASK64)};return{h:Number(n>>_32n&U32_MASK64)|0,l:Number(n&U32_MASK64)|0}}function split(lst,le=false){let Ah=new Uint32Array(lst.length);let Al=new Uint32Array(lst.length);for(let i=0;iBigInt(h>>>0)<<_32n|BigInt(l>>>0);const shrSH=(h,l,s)=>h>>>s;const shrSL=(h,l,s)=>h<<32-s|l>>>s;const rotrSH=(h,l,s)=>h>>>s|l<<32-s;const rotrSL=(h,l,s)=>h<<32-s|l>>>s;const rotrBH=(h,l,s)=>h<<64-s|l>>>s-32;const rotrBL=(h,l,s)=>h>>>s-32|l<<64-s;const rotr32H=(h,l)=>l;const rotr32L=(h,l)=>h;const rotlSH=(h,l,s)=>h<>>32-s;const rotlSL=(h,l,s)=>l<>>32-s;const rotlBH=(h,l,s)=>l<>>64-s;const rotlBL=(h,l,s)=>h<>>64-s;function add(Ah,Al,Bh,Bl){const l=(Al>>>0)+(Bl>>>0);return{h:Ah+Bh+(l/2**32|0)|0,l:l|0}}const add3L=(Al,Bl,Cl)=>(Al>>>0)+(Bl>>>0)+(Cl>>>0);const add3H=(low,Ah,Bh,Ch)=>Ah+Bh+Ch+(low/2**32|0)|0;const add4L=(Al,Bl,Cl,Dl)=>(Al>>>0)+(Bl>>>0)+(Cl>>>0)+(Dl>>>0);const add4H=(low,Ah,Bh,Ch,Dh)=>Ah+Bh+Ch+Dh+(low/2**32|0)|0;const add5L=(Al,Bl,Cl,Dl,El)=>(Al>>>0)+(Bl>>>0)+(Cl>>>0)+(Dl>>>0)+(El>>>0);const add5H=(low,Ah,Bh,Ch,Dh,Eh)=>Ah+Bh+Ch+Dh+Eh+(low/2**32|0)|0;const u64={fromBig:fromBig,split:split,toBig:toBig,shrSH:shrSH,shrSL:shrSL,rotrSH:rotrSH,rotrSL:rotrSL,rotrBH:rotrBH,rotrBL:rotrBL,rotr32H:rotr32H,rotr32L:rotr32L,rotlSH:rotlSH,rotlSL:rotlSL,rotlBH:rotlBH,rotlBL:rotlBL,add:add,add3L:add3L,add3H:add3H,add4L:add4L,add4H:add4H,add5H:add5H,add5L:add5L};var u64$1=u64;const[SHA3_PI,SHA3_ROTL,_SHA3_IOTA]=[[],[],[]];const _0n$2=BigInt(0);const _1n$2=BigInt(1);const _2n$2=BigInt(2);const _7n=BigInt(7);const _256n=BigInt(256);const _0x71n=BigInt(113);for(let round=0,R=_1n$2,x=1,y=0;round<24;round++){[x,y]=[y,(2*x+3*y)%5];SHA3_PI.push(2*(5*y+x));SHA3_ROTL.push((round+1)*(round+2)/2%64);let t=_0n$2;for(let j=0;j<7;j++){R=(R<<_1n$2^(R>>_7n)*_0x71n)%_256n;if(R&_2n$2)t^=_1n$2<<(_1n$2<s>32?u64$1.rotlBH(h,l,s):u64$1.rotlSH(h,l,s);const rotlL=(h,l,s)=>s>32?u64$1.rotlBL(h,l,s):u64$1.rotlSL(h,l,s);function keccakP(s,rounds=24){const B=new Uint32Array(5*2);for(let round=24-rounds;round<24;round++){for(let x=0;x<10;x++)B[x]=s[x]^s[x+10]^s[x+20]^s[x+30]^s[x+40];for(let x=0;x<10;x+=2){const idx1=(x+8)%10;const idx0=(x+2)%10;const B0=B[idx0];const B1=B[idx0+1];const Th=rotlH(B0,B1,1)^B[idx1];const Tl=rotlL(B0,B1,1)^B[idx1+1];for(let y=0;y<50;y+=10){s[x+y]^=Th;s[x+y+1]^=Tl}}let curH=s[2];let curL=s[3];for(let t=0;t<24;t++){const shift=SHA3_ROTL[t];const Th=rotlH(curH,curL,shift);const Tl=rotlL(curH,curL,shift);const PI=SHA3_PI[t];curH=s[PI];curL=s[PI+1];s[PI]=Th;s[PI+1]=Tl}for(let y=0;y<50;y+=10){for(let x=0;x<10;x++)B[x]=s[y+x];for(let x=0;x<10;x++)s[y+x]^=~B[(x+2)%10]&B[(x+4)%10]}s[0]^=SHA3_IOTA_H[round];s[1]^=SHA3_IOTA_L[round]}B.fill(0)}class Keccak extends Hash{constructor(blockLen,suffix,outputLen,enableXOF=false,rounds=24){super();this.blockLen=blockLen;this.suffix=suffix;this.outputLen=outputLen;this.enableXOF=enableXOF;this.rounds=rounds;this.pos=0;this.posOut=0;this.finished=false;this.destroyed=false;assert$3.number(outputLen);if(0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200);this.state32=u32$1(this.state)}keccak(){keccakP(this.state32,this.rounds);this.posOut=0;this.pos=0}update(data){assert$3.exists(this);const{blockLen:blockLen,state:state}=this;data=toBytes(data);const len=data.length;for(let pos=0;pos=blockLen)this.keccak();const take=Math.min(blockLen-this.posOut,len-pos);out.set(bufferOut.subarray(this.posOut,this.posOut+take),pos);this.posOut+=take;pos+=take}return out}xofInto(out){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(out)}xof(bytes){assert$3.number(bytes);return this.xofInto(new Uint8Array(bytes))}digestInto(out){assert$3.output(out,this);if(this.finished)throw new Error("digest() was already called");this.writeInto(out);this.destroy();return out}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=true;this.state.fill(0)}_cloneInto(to){const{blockLen:blockLen,suffix:suffix,outputLen:outputLen,rounds:rounds,enableXOF:enableXOF}=this;to||(to=new Keccak(blockLen,suffix,outputLen,enableXOF,rounds));to.state32.set(this.state32);to.pos=this.pos;to.posOut=this.posOut;to.finished=this.finished;to.rounds=rounds;to.suffix=suffix;to.outputLen=outputLen;to.enableXOF=enableXOF;to.destroyed=this.destroyed;return to}}const gen=(suffix,blockLen,outputLen)=>wrapConstructor((()=>new Keccak(blockLen,suffix,outputLen)));gen(6,144,224/8);gen(6,136,256/8);gen(6,104,384/8);gen(6,72,512/8);gen(1,144,224/8);const keccak_256=gen(1,136,256/8);gen(1,104,384/8);gen(1,72,512/8);const genShake=(suffix,blockLen,outputLen)=>wrapXOFConstructorWithOpts(((opts={})=>new Keccak(blockLen,suffix,opts.dkLen===undefined?outputLen:opts.dkLen,true)));genShake(31,168,128/8);genShake(31,136,256/8);const Chi=(a,b,c)=>a&b^~a&c;const Maj=(a,b,c)=>a&b^a&c^b&c;const SHA256_K=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);const IV=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);const SHA256_W=new Uint32Array(64);class SHA256 extends SHA2$1{constructor(){super(64,32,8,false);this.A=IV[0]|0;this.B=IV[1]|0;this.C=IV[2]|0;this.D=IV[3]|0;this.E=IV[4]|0;this.F=IV[5]|0;this.G=IV[6]|0;this.H=IV[7]|0}get(){const{A:A,B:B,C:C,D:D,E:E,F:F,G:G,H:H}=this;return[A,B,C,D,E,F,G,H]}set(A,B,C,D,E,F,G,H){this.A=A|0;this.B=B|0;this.C=C|0;this.D=D|0;this.E=E|0;this.F=F|0;this.G=G|0;this.H=H|0}process(view,offset){for(let i=0;i<16;i++,offset+=4)SHA256_W[i]=view.getUint32(offset,false);for(let i=16;i<64;i++){const W15=SHA256_W[i-15];const W2=SHA256_W[i-2];const s0=rotr$1(W15,7)^rotr$1(W15,18)^W15>>>3;const s1=rotr$1(W2,17)^rotr$1(W2,19)^W2>>>10;SHA256_W[i]=s1+SHA256_W[i-7]+s0+SHA256_W[i-16]|0}let{A:A,B:B,C:C,D:D,E:E,F:F,G:G,H:H}=this;for(let i=0;i<64;i++){const sigma1=rotr$1(E,6)^rotr$1(E,11)^rotr$1(E,25);const T1=H+sigma1+Chi(E,F,G)+SHA256_K[i]+SHA256_W[i]|0;const sigma0=rotr$1(A,2)^rotr$1(A,13)^rotr$1(A,22);const T2=sigma0+Maj(A,B,C)|0;H=G;G=F;F=E;E=D+T1|0;D=C;C=B;B=A;A=T1+T2|0}A=A+this.A|0;B=B+this.B|0;C=C+this.C|0;D=D+this.D|0;E=E+this.E|0;F=F+this.F|0;G=G+this.G|0;H=H+this.H|0;this.set(A,B,C,D,E,F,G,H)}roundClean(){SHA256_W.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0);this.buffer.fill(0)}}class SHA224 extends SHA256{constructor(){super();this.A=3238371032|0;this.B=914150663|0;this.C=812702999|0;this.D=4144912697|0;this.E=4290775857|0;this.F=1750603025|0;this.G=1694076839|0;this.H=3204075428|0;this.outputLen=28}}const sha256=wrapConstructor$1((()=>new SHA256));wrapConstructor$1((()=>new SHA224)); - /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function validatePointOpts(curve){const opts=validateBasic(curve);validateObject(opts,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:endo,Fp:Fp,a:a}=opts;if(endo){if(!Fp.eql(a,Fp.ZERO)){throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0")}if(typeof endo!=="object"||typeof endo.beta!=="bigint"||typeof endo.splitScalar!=="function"){throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}}return Object.freeze({...opts})}const{bytesToNumberBE:b2n,hexToBytes:h2b}=ut;const DER={Err:class DERErr extends Error{constructor(m=""){super(m)}},_parseInt(data){const{Err:E}=DER;if(data.length<2||data[0]!==2)throw new E("Invalid signature integer tag");const len=data[1];const res=data.subarray(2,len+2);if(!len||res.length!==len)throw new E("Invalid signature integer: wrong length");if(res[0]&128)throw new E("Invalid signature integer: negative");if(res[0]===0&&!(res[1]&128))throw new E("Invalid signature integer: unnecessary leading zero");return{d:b2n(res),l:data.subarray(len+2)}},toSig(hex){const{Err:E}=DER;const data=typeof hex==="string"?h2b(hex):hex;if(!(data instanceof Uint8Array))throw new Error("ui8a expected");let l=data.length;if(l<2||data[0]!=48)throw new E("Invalid signature tag");if(data[1]!==l-2)throw new E("Invalid signature: incorrect length");const{d:r,l:sBytes}=DER._parseInt(data.subarray(2));const{d:s,l:rBytesLeft}=DER._parseInt(sBytes);if(rBytesLeft.length)throw new E("Invalid signature: left bytes after parsing");return{r:r,s:s}},hexFromSig(sig){const slice=s=>Number.parseInt(s[0],16)&8?"00"+s:s;const h=num=>{const hex=num.toString(16);return hex.length&1?`0${hex}`:hex};const s=slice(h(sig.s));const r=slice(h(sig.r));const shl=s.length/2;const rhl=r.length/2;const sl=h(shl);const rl=h(rhl);return`30${h(rhl+shl+4)}02${rl}${r}02${sl}${s}`}};const _0n$1=BigInt(0),_1n$1=BigInt(1),_2n$1=BigInt(2),_3n=BigInt(3),_4n=BigInt(4);function weierstrassPoints(opts){const CURVE=validatePointOpts(opts);const{Fp:Fp}=CURVE;const toBytes=CURVE.toBytes||((c,point,isCompressed)=>{const a=point.toAffine();return concatBytes(Uint8Array.from([4]),Fp.toBytes(a.x),Fp.toBytes(a.y))});const fromBytes=CURVE.fromBytes||(bytes=>{const tail=bytes.subarray(1);const x=Fp.fromBytes(tail.subarray(0,Fp.BYTES));const y=Fp.fromBytes(tail.subarray(Fp.BYTES,2*Fp.BYTES));return{x:x,y:y}});function weierstrassEquation(x){const{a:a,b:b}=CURVE;const x2=Fp.sqr(x);const x3=Fp.mul(x2,x);return Fp.add(Fp.add(x3,Fp.mul(x,a)),b)}if(!Fp.eql(Fp.sqr(CURVE.Gy),weierstrassEquation(CURVE.Gx)))throw new Error("bad generator point: equation left != right");function isWithinCurveOrder(num){return typeof num==="bigint"&&_0n$1Fp.eql(i,Fp.ZERO);if(is0(x)&&is0(y))return Point.ZERO;return new Point(x,y,Fp.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(points){const toInv=Fp.invertBatch(points.map((p=>p.pz)));return points.map(((p,i)=>p.toAffine(toInv[i]))).map(Point.fromAffine)}static fromHex(hex){const P=Point.fromAffine(fromBytes(ensureBytes("pointHex",hex)));P.assertValidity();return P}static fromPrivateKey(privateKey){return Point.BASE.multiply(normPrivateKeyToScalar(privateKey))}_setWindowSize(windowSize){this._WINDOW_SIZE=windowSize;pointPrecomputes.delete(this)}assertValidity(){if(this.is0()){if(CURVE.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:x,y:y}=this.toAffine();if(!Fp.isValid(x)||!Fp.isValid(y))throw new Error("bad point: x or y not FE");const left=Fp.sqr(y);const right=weierstrassEquation(x);if(!Fp.eql(left,right))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:y}=this.toAffine();if(Fp.isOdd)return!Fp.isOdd(y);throw new Error("Field doesn't support isOdd")}equals(other){assertPrjPoint(other);const{px:X1,py:Y1,pz:Z1}=this;const{px:X2,py:Y2,pz:Z2}=other;const U1=Fp.eql(Fp.mul(X1,Z2),Fp.mul(X2,Z1));const U2=Fp.eql(Fp.mul(Y1,Z2),Fp.mul(Y2,Z1));return U1&&U2}negate(){return new Point(this.px,Fp.neg(this.py),this.pz)}double(){const{a:a,b:b}=CURVE;const b3=Fp.mul(b,_3n);const{px:X1,py:Y1,pz:Z1}=this;let X3=Fp.ZERO,Y3=Fp.ZERO,Z3=Fp.ZERO;let t0=Fp.mul(X1,X1);let t1=Fp.mul(Y1,Y1);let t2=Fp.mul(Z1,Z1);let t3=Fp.mul(X1,Y1);t3=Fp.add(t3,t3);Z3=Fp.mul(X1,Z1);Z3=Fp.add(Z3,Z3);X3=Fp.mul(a,Z3);Y3=Fp.mul(b3,t2);Y3=Fp.add(X3,Y3);X3=Fp.sub(t1,Y3);Y3=Fp.add(t1,Y3);Y3=Fp.mul(X3,Y3);X3=Fp.mul(t3,X3);Z3=Fp.mul(b3,Z3);t2=Fp.mul(a,t2);t3=Fp.sub(t0,t2);t3=Fp.mul(a,t3);t3=Fp.add(t3,Z3);Z3=Fp.add(t0,t0);t0=Fp.add(Z3,t0);t0=Fp.add(t0,t2);t0=Fp.mul(t0,t3);Y3=Fp.add(Y3,t0);t2=Fp.mul(Y1,Z1);t2=Fp.add(t2,t2);t0=Fp.mul(t2,t3);X3=Fp.sub(X3,t0);Z3=Fp.mul(t2,t1);Z3=Fp.add(Z3,Z3);Z3=Fp.add(Z3,Z3);return new Point(X3,Y3,Z3)}add(other){assertPrjPoint(other);const{px:X1,py:Y1,pz:Z1}=this;const{px:X2,py:Y2,pz:Z2}=other;let X3=Fp.ZERO,Y3=Fp.ZERO,Z3=Fp.ZERO;const a=CURVE.a;const b3=Fp.mul(CURVE.b,_3n);let t0=Fp.mul(X1,X2);let t1=Fp.mul(Y1,Y2);let t2=Fp.mul(Z1,Z2);let t3=Fp.add(X1,Y1);let t4=Fp.add(X2,Y2);t3=Fp.mul(t3,t4);t4=Fp.add(t0,t1);t3=Fp.sub(t3,t4);t4=Fp.add(X1,Z1);let t5=Fp.add(X2,Z2);t4=Fp.mul(t4,t5);t5=Fp.add(t0,t2);t4=Fp.sub(t4,t5);t5=Fp.add(Y1,Z1);X3=Fp.add(Y2,Z2);t5=Fp.mul(t5,X3);X3=Fp.add(t1,t2);t5=Fp.sub(t5,X3);Z3=Fp.mul(a,t4);X3=Fp.mul(b3,t2);Z3=Fp.add(X3,Z3);X3=Fp.sub(t1,Z3);Z3=Fp.add(t1,Z3);Y3=Fp.mul(X3,Z3);t1=Fp.add(t0,t0);t1=Fp.add(t1,t0);t2=Fp.mul(a,t2);t4=Fp.mul(b3,t4);t1=Fp.add(t1,t2);t2=Fp.sub(t0,t2);t2=Fp.mul(a,t2);t4=Fp.add(t4,t2);t0=Fp.mul(t1,t4);Y3=Fp.add(Y3,t0);t0=Fp.mul(t5,t4);X3=Fp.mul(t3,X3);X3=Fp.sub(X3,t0);t0=Fp.mul(t3,t1);Z3=Fp.mul(t5,Z3);Z3=Fp.add(Z3,t0);return new Point(X3,Y3,Z3)}subtract(other){return this.add(other.negate())}is0(){return this.equals(Point.ZERO)}wNAF(n){return wnaf.wNAFCached(this,pointPrecomputes,n,(comp=>{const toInv=Fp.invertBatch(comp.map((p=>p.pz)));return comp.map(((p,i)=>p.toAffine(toInv[i]))).map(Point.fromAffine)}))}multiplyUnsafe(n){const I=Point.ZERO;if(n===_0n$1)return I;assertGE(n);if(n===_1n$1)return this;const{endo:endo}=CURVE;if(!endo)return wnaf.unsafeLadder(this,n);let{k1neg:k1neg,k1:k1,k2neg:k2neg,k2:k2}=endo.splitScalar(n);let k1p=I;let k2p=I;let d=this;while(k1>_0n$1||k2>_0n$1){if(k1&_1n$1)k1p=k1p.add(d);if(k2&_1n$1)k2p=k2p.add(d);d=d.double();k1>>=_1n$1;k2>>=_1n$1}if(k1neg)k1p=k1p.negate();if(k2neg)k2p=k2p.negate();k2p=new Point(Fp.mul(k2p.px,endo.beta),k2p.py,k2p.pz);return k1p.add(k2p)}multiply(scalar){assertGE(scalar);let n=scalar;let point,fake;const{endo:endo}=CURVE;if(endo){const{k1neg:k1neg,k1:k1,k2neg:k2neg,k2:k2}=endo.splitScalar(n);let{p:k1p,f:f1p}=this.wNAF(k1);let{p:k2p,f:f2p}=this.wNAF(k2);k1p=wnaf.constTimeNegate(k1neg,k1p);k2p=wnaf.constTimeNegate(k2neg,k2p);k2p=new Point(Fp.mul(k2p.px,endo.beta),k2p.py,k2p.pz);point=k1p.add(k2p);fake=f1p.add(f2p)}else{const{p:p,f:f}=this.wNAF(n);point=p;fake=f}return Point.normalizeZ([point,fake])[0]}multiplyAndAddUnsafe(Q,a,b){const G=Point.BASE;const mul=(P,a)=>a===_0n$1||a===_1n$1||!P.equals(G)?P.multiplyUnsafe(a):P.multiply(a);const sum=mul(this,a).add(mul(Q,b));return sum.is0()?undefined:sum}toAffine(iz){const{px:x,py:y,pz:z}=this;const is0=this.is0();if(iz==null)iz=is0?Fp.ONE:Fp.inv(z);const ax=Fp.mul(x,iz);const ay=Fp.mul(y,iz);const zz=Fp.mul(z,iz);if(is0)return{x:Fp.ZERO,y:Fp.ZERO};if(!Fp.eql(zz,Fp.ONE))throw new Error("invZ was invalid");return{x:ax,y:ay}}isTorsionFree(){const{h:cofactor,isTorsionFree:isTorsionFree}=CURVE;if(cofactor===_1n$1)return true;if(isTorsionFree)return isTorsionFree(Point,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:cofactor,clearCofactor:clearCofactor}=CURVE;if(cofactor===_1n$1)return this;if(clearCofactor)return clearCofactor(Point,this);return this.multiplyUnsafe(CURVE.h)}toRawBytes(isCompressed=true){this.assertValidity();return toBytes(Point,this,isCompressed)}toHex(isCompressed=true){return bytesToHex(this.toRawBytes(isCompressed))}}Point.BASE=new Point(CURVE.Gx,CURVE.Gy,Fp.ONE);Point.ZERO=new Point(Fp.ZERO,Fp.ONE,Fp.ZERO);const _bits=CURVE.nBitLength;const wnaf=wNAF(Point,CURVE.endo?Math.ceil(_bits/2):_bits);return{CURVE:CURVE,ProjectivePoint:Point,normPrivateKeyToScalar:normPrivateKeyToScalar,weierstrassEquation:weierstrassEquation,isWithinCurveOrder:isWithinCurveOrder}}function validateOpts(curve){const opts=validateBasic(curve);validateObject(opts,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"});return Object.freeze({lowS:true,...opts})}function weierstrass(curveDef){const CURVE=validateOpts(curveDef);const{Fp:Fp,n:CURVE_ORDER}=CURVE;const compressedLen=Fp.BYTES+1;const uncompressedLen=2*Fp.BYTES+1;function isValidFieldElement(num){return _0n$1bytesToHex(numberToBytesBE(num,CURVE.nByteLength));function isBiggerThanHalfOrder(number){const HALF=CURVE_ORDER>>_1n$1;return number>HALF}function normalizeS(s){return isBiggerThanHalfOrder(s)?modN(-s):s}const slcNum=(b,from,to)=>bytesToNumberBE(b.slice(from,to));class Signature{constructor(r,s,recovery){this.r=r;this.s=s;this.recovery=recovery;this.assertValidity()}static fromCompact(hex){const l=CURVE.nByteLength;hex=ensureBytes("compactSignature",hex,l*2);return new Signature(slcNum(hex,0,l),slcNum(hex,l,2*l))}static fromDER(hex){const{r:r,s:s}=DER.toSig(ensureBytes("DER",hex));return new Signature(r,s)}assertValidity(){if(!isWithinCurveOrder(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!isWithinCurveOrder(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(recovery){return new Signature(this.r,this.s,recovery)}recoverPublicKey(msgHash){const{r:r,s:s,recovery:rec}=this;const h=bits2int_modN(ensureBytes("msgHash",msgHash));if(rec==null||![0,1,2,3].includes(rec))throw new Error("recovery id invalid");const radj=rec===2||rec===3?r+CURVE.n:r;if(radj>=Fp.ORDER)throw new Error("recovery id 2 or 3 invalid");const prefix=(rec&1)===0?"02":"03";const R=Point.fromHex(prefix+numToNByteStr(radj));const ir=invN(radj);const u1=modN(-h*ir);const u2=modN(s*ir);const Q=Point.BASE.multiplyAndAddUnsafe(R,u1,u2);if(!Q)throw new Error("point at infinify");Q.assertValidity();return Q}hasHighS(){return isBiggerThanHalfOrder(this.s)}normalizeS(){return this.hasHighS()?new Signature(this.r,modN(-this.s),this.recovery):this}toDERRawBytes(){return hexToBytes(this.toDERHex())}toDERHex(){return DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return hexToBytes(this.toCompactHex())}toCompactHex(){return numToNByteStr(this.r)+numToNByteStr(this.s)}}const utils={isValidPrivateKey(privateKey){try{normPrivateKeyToScalar(privateKey);return true}catch(error){return false}},normPrivateKeyToScalar:normPrivateKeyToScalar,randomPrivateKey:()=>{const rand=CURVE.randomBytes(Fp.BYTES+8);const num=hashToPrivateScalar(rand,CURVE_ORDER);return numberToBytesBE(num,CURVE.nByteLength)},precompute(windowSize=8,point=Point.BASE){point._setWindowSize(windowSize);point.multiply(BigInt(3));return point}};function getPublicKey(privateKey,isCompressed=true){return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed)}function isProbPub(item){const arr=item instanceof Uint8Array;const str=typeof item==="string";const len=(arr||str)&&item.length;if(arr)return len===compressedLen||len===uncompressedLen;if(str)return len===2*compressedLen||len===2*uncompressedLen;if(item instanceof Point)return true;return false}function getSharedSecret(privateA,publicB,isCompressed=true){if(isProbPub(privateA))throw new Error("first arg must be private key");if(!isProbPub(publicB))throw new Error("second arg must be public key");const b=Point.fromHex(publicB);return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed)}const bits2int=CURVE.bits2int||function(bytes){const num=bytesToNumberBE(bytes);const delta=bytes.length*8-CURVE.nBitLength;return delta>0?num>>BigInt(delta):num};const bits2int_modN=CURVE.bits2int_modN||function(bytes){return modN(bits2int(bytes))};const ORDER_MASK=bitMask(CURVE.nBitLength);function int2octets(num){if(typeof num!=="bigint")throw new Error("bigint expected");if(!(_0n$1<=num&&numk in opts)))throw new Error("sign() legacy options not supported");const{hash:hash,randomBytes:randomBytes}=CURVE;let{lowS:lowS,prehash:prehash,extraEntropy:ent}=opts;if(lowS==null)lowS=true;msgHash=ensureBytes("msgHash",msgHash);if(prehash)msgHash=ensureBytes("prehashed msgHash",hash(msgHash));const h1int=bits2int_modN(msgHash);const d=normPrivateKeyToScalar(privateKey);const seedArgs=[int2octets(d),int2octets(h1int)];if(ent!=null){const e=ent===true?randomBytes(Fp.BYTES):ent;seedArgs.push(ensureBytes("extraEntropy",e,Fp.BYTES))}const seed=concatBytes(...seedArgs);const m=h1int;function k2sig(kBytes){const k=bits2int(kBytes);if(!isWithinCurveOrder(k))return;const ik=invN(k);const q=Point.BASE.multiply(k).toAffine();const r=modN(q.x);if(r===_0n$1)return;const s=modN(ik*modN(m+r*d));if(s===_0n$1)return;let recovery=(q.x===r?0:2)|Number(q.y&_1n$1);let normS=s;if(lowS&&isBiggerThanHalfOrder(s)){normS=normalizeS(s);recovery^=1}return new Signature(r,normS,recovery)}return{seed:seed,k2sig:k2sig}}const defaultSigOpts={lowS:CURVE.lowS,prehash:false};const defaultVerOpts={lowS:CURVE.lowS,prehash:false};function sign(msgHash,privKey,opts=defaultSigOpts){const{seed:seed,k2sig:k2sig}=prepSig(msgHash,privKey,opts);const drbg=createHmacDrbg(CURVE.hash.outputLen,CURVE.nByteLength,CURVE.hmac);return drbg(seed,k2sig)}Point.BASE._setWindowSize(8);function verify(signature,msgHash,publicKey,opts=defaultVerOpts){const sg=signature;msgHash=ensureBytes("msgHash",msgHash);publicKey=ensureBytes("publicKey",publicKey);if("strict"in opts)throw new Error("options.strict was renamed to lowS");const{lowS:lowS,prehash:prehash}=opts;let _sig=undefined;let P;try{if(typeof sg==="string"||sg instanceof Uint8Array){try{_sig=Signature.fromDER(sg)}catch(derError){if(!(derError instanceof DER.Err))throw derError;_sig=Signature.fromCompact(sg)}}else if(typeof sg==="object"&&typeof sg.r==="bigint"&&typeof sg.s==="bigint"){const{r:r,s:s}=sg;_sig=new Signature(r,s)}else{throw new Error("PARSE")}P=Point.fromHex(publicKey)}catch(error){if(error.message==="PARSE")throw new Error(`signature must be Signature instance, Uint8Array or hex string`);return false}if(lowS&&_sig.hasHighS())return false;if(prehash)msgHash=CURVE.hash(msgHash);const{r:r,s:s}=_sig;const h=bits2int_modN(msgHash);const is=invN(s);const u1=modN(h*is);const u2=modN(r*is);const R=Point.BASE.multiplyAndAddUnsafe(P,u1,u2)?.toAffine();if(!R)return false;const v=modN(R.x);return v===r}return{CURVE:CURVE,getPublicKey:getPublicKey,getSharedSecret:getSharedSecret,sign:sign,verify:verify,ProjectivePoint:Point,Signature:Signature,utils:utils}}function SWUFpSqrtRatio(Fp,Z){const q=Fp.ORDER;let l=_0n$1;for(let o=q-_1n$1;o%_2n$1===_0n$1;o/=_2n$1)l+=_1n$1;const c1=l;const c2=(q-_1n$1)/_2n$1**c1;const c3=(c2-_1n$1)/_2n$1;const c4=_2n$1**c1-_1n$1;const c5=_2n$1**(c1-_1n$1);const c6=Fp.pow(Z,c2);const c7=Fp.pow(Z,(c2+_1n$1)/_2n$1);let sqrtRatio=(u,v)=>{let tv1=c6;let tv2=Fp.pow(v,c4);let tv3=Fp.sqr(tv2);tv3=Fp.mul(tv3,v);let tv5=Fp.mul(u,tv3);tv5=Fp.pow(tv5,c3);tv5=Fp.mul(tv5,tv2);tv2=Fp.mul(tv5,v);tv3=Fp.mul(tv5,u);let tv4=Fp.mul(tv3,tv2);tv5=Fp.pow(tv4,c5);let isQR=Fp.eql(tv5,Fp.ONE);tv2=Fp.mul(tv3,c7);tv5=Fp.mul(tv4,tv1);tv3=Fp.cmov(tv2,tv3,isQR);tv4=Fp.cmov(tv5,tv4,isQR);for(let i=c1;i>_1n$1;i--){let tv5=_2n$1**(i-_2n$1);let tvv5=Fp.pow(tv4,tv5);const e1=Fp.eql(tvv5,Fp.ONE);tv2=Fp.mul(tv3,tv1);tv1=Fp.mul(tv1,tv1);tvv5=Fp.mul(tv4,tv1);tv3=Fp.cmov(tv2,tv3,e1);tv4=Fp.cmov(tvv5,tv4,e1)}return{isValid:isQR,value:tv3}};if(Fp.ORDER%_4n===_3n){const c1=(Fp.ORDER-_3n)/_4n;const c2=Fp.sqrt(Fp.neg(Z));sqrtRatio=(u,v)=>{let tv1=Fp.sqr(v);const tv2=Fp.mul(u,v);tv1=Fp.mul(tv1,tv2);let y1=Fp.pow(tv1,c1);y1=Fp.mul(y1,tv2);const y2=Fp.mul(y1,c2);const tv3=Fp.mul(Fp.sqr(y1),v);const isQR=Fp.eql(tv3,u);let y=Fp.cmov(y2,y1,isQR);return{isValid:isQR,value:y}}}return sqrtRatio}function mapToCurveSimpleSWU(Fp,opts){validateField(Fp);if(!Fp.isValid(opts.A)||!Fp.isValid(opts.B)||!Fp.isValid(opts.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const sqrtRatio=SWUFpSqrtRatio(Fp,opts.Z);if(!Fp.isOdd)throw new Error("Fp.isOdd is not implemented!");return u=>{let tv1,tv2,tv3,tv4,tv5,tv6,x,y;tv1=Fp.sqr(u);tv1=Fp.mul(tv1,opts.Z);tv2=Fp.sqr(tv1);tv2=Fp.add(tv2,tv1);tv3=Fp.add(tv2,Fp.ONE);tv3=Fp.mul(tv3,opts.B);tv4=Fp.cmov(opts.Z,Fp.neg(tv2),!Fp.eql(tv2,Fp.ZERO));tv4=Fp.mul(tv4,opts.A);tv2=Fp.sqr(tv3);tv6=Fp.sqr(tv4);tv5=Fp.mul(tv6,opts.A);tv2=Fp.add(tv2,tv5);tv2=Fp.mul(tv2,tv3);tv6=Fp.mul(tv6,tv4);tv5=Fp.mul(tv6,opts.B);tv2=Fp.add(tv2,tv5);x=Fp.mul(tv1,tv3);const{isValid:isValid,value:value}=sqrtRatio(tv2,tv6);y=Fp.mul(tv1,u);y=Fp.mul(y,value);x=Fp.cmov(x,tv3,isValid);y=Fp.cmov(y,value,isValid);const e1=Fp.isOdd(u)===Fp.isOdd(y);y=Fp.cmov(Fp.neg(y),y,e1);x=Fp.div(x,tv4);return{x:x,y:y}}}class HMAC extends Hash$1{constructor(hash,_key){super();this.finished=false;this.destroyed=false;assert$5.hash(hash);const key=toBytes$1(_key);this.iHash=hash.create();if(typeof this.iHash.update!=="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen;this.outputLen=this.iHash.outputLen;const blockLen=this.blockLen;const pad=new Uint8Array(blockLen);pad.set(key.length>blockLen?hash.create().update(key).digest():key);for(let i=0;inew HMAC(hash,key).update(message).digest();hmac.create=(hash,key)=>new HMAC(hash,key) - /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */;function getHash(hash){return{hash:hash,hmac:(key,...msgs)=>hmac(hash,key,concatBytes$1(...msgs)),randomBytes:randomBytes}}function createCurve(curveDef,defHash){const create=hash=>weierstrass({...curveDef,...getHash(hash)});return Object.freeze({...create(defHash),create:create})} --/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const secp256k1P=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f");const secp256k1N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");const _1n=BigInt(1);const _2n=BigInt(2);const divNearest=(a,b)=>(a+b/_2n)/b;function sqrtMod(y){const P=secp256k1P;const _3n=BigInt(3),_6n=BigInt(6),_11n=BigInt(11),_22n=BigInt(22);const _23n=BigInt(23),_44n=BigInt(44),_88n=BigInt(88);const b2=y*y*y%P;const b3=b2*b2*y%P;const b6=pow2(b3,_3n,P)*b3%P;const b9=pow2(b6,_3n,P)*b3%P;const b11=pow2(b9,_2n,P)*b2%P;const b22=pow2(b11,_11n,P)*b11%P;const b44=pow2(b22,_22n,P)*b22%P;const b88=pow2(b44,_44n,P)*b44%P;const b176=pow2(b88,_88n,P)*b88%P;const b220=pow2(b176,_44n,P)*b44%P;const b223=pow2(b220,_3n,P)*b3%P;const t1=pow2(b223,_23n,P)*b22%P;const t2=pow2(t1,_6n,P)*b2%P;const root=pow2(t2,_2n,P);if(!Fp.eql(Fp.sqr(root),y))throw new Error("Cannot find square root");return root}const Fp=Field(secp256k1P,undefined,undefined,{sqrt:sqrtMod});const secp256k1=createCurve({a:BigInt(0),b:BigInt(7),Fp:Fp,n:secp256k1N,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:true,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:k=>{const n=secp256k1N;const a1=BigInt("0x3086d221a7d46bcde86c90e49284eb15");const b1=-_1n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3");const a2=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8");const b2=a1;const POW_2_128=BigInt("0x100000000000000000000000000000000");const c1=divNearest(b2*k,n);const c2=divNearest(-b1*k,n);let k1=mod(k-c1*a1-c2*a2,n);let k2=mod(-c1*b1-c2*b2,n);const k1neg=k1>POW_2_128;const k2neg=k2>POW_2_128;if(k1neg)k1=n-k1;if(k2neg)k2=n-k2;if(k1>POW_2_128||k2>POW_2_128){throw new Error("splitScalar: Endomorphism failed, k="+k)}return{k1neg:k1neg,k1:k1,k2neg:k2neg,k2:k2}}}},sha256);const _0n=BigInt(0);const fe=x=>typeof x==="bigint"&&_0ntypeof x==="bigint"&&_0nc.charCodeAt(0))));tagP=concatBytes(tagH,tagH);TAGGED_HASH_PREFIXES[tag]=tagP}return sha256(concatBytes(tagP,...messages))}const pointToBytes=point=>point.toRawBytes(true).slice(1);const numTo32b=n=>numberToBytesBE(n,32);const modP=x=>mod(x,secp256k1P);const modN=x=>mod(x,secp256k1N);const Point=secp256k1.ProjectivePoint;const GmulAdd=(Q,a,b)=>Point.BASE.multiplyAndAddUnsafe(Q,a,b);function schnorrGetExtPubKey(priv){let d_=secp256k1.utils.normPrivateKeyToScalar(priv);let p=Point.fromPrivateKey(d_);const scalar=p.hasEvenY()?d_:modN(-d_);return{scalar:scalar,bytes:pointToBytes(p)}}function lift_x(x){if(!fe(x))throw new Error("bad x: need 0 < x < p");const xx=modP(x*x);const c=modP(xx*x+BigInt(7));let y=sqrtMod(c);if(y%_2n!==_0n)y=modP(-y);const p=new Point(x,y,_1n);p.assertValidity();return p}function challenge(...args){return modN(bytesToNumberBE(taggedHash("BIP0340/challenge",...args)))}function schnorrGetPublicKey(privateKey){return schnorrGetExtPubKey(privateKey).bytes}function schnorrSign(message,privateKey,auxRand=randomBytes(32)){const m=ensureBytes("message",message);const{bytes:px,scalar:d}=schnorrGetExtPubKey(privateKey);const a=ensureBytes("auxRand",auxRand,32);const t=numTo32b(d^bytesToNumberBE(taggedHash("BIP0340/aux",a)));const rand=taggedHash("BIP0340/nonce",t,px,m);const k_=modN(bytesToNumberBE(rand));if(k_===_0n)throw new Error("sign failed: k is zero");const{bytes:rx,scalar:k}=schnorrGetExtPubKey(k_);const e=challenge(rx,px,m);const sig=new Uint8Array(64);sig.set(rx,0);sig.set(numTo32b(modN(k+e*d)),32);if(!schnorrVerify(sig,m,px))throw new Error("sign: Invalid signature produced");return sig}function schnorrVerify(signature,message,publicKey){const sig=ensureBytes("signature",signature,64);const m=ensureBytes("message",message);const pub=ensureBytes("publicKey",publicKey,32);try{const P=lift_x(bytesToNumberBE(pub));const r=bytesToNumberBE(sig.subarray(0,32));if(!fe(r))return false;const s=bytesToNumberBE(sig.subarray(32,64));if(!ge(s))return false;const e=challenge(numTo32b(r),pointToBytes(P),m);const R=GmulAdd(P,s,modN(-e));if(!R||!R.hasEvenY()||R.toAffine().x!==r)return false;return true}catch(error){return false}}({getPublicKey:schnorrGetPublicKey,sign:schnorrSign,verify:schnorrVerify,utils:{randomPrivateKey:secp256k1.utils.randomPrivateKey,lift_x:lift_x,pointToBytes:pointToBytes,numberToBytesBE:numberToBytesBE,bytesToNumberBE:bytesToNumberBE,taggedHash:taggedHash,mod:mod}});const isoMap=isogenyMap(Fp,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((i=>i.map((j=>BigInt(j))))));const mapSWU=mapToCurveSimpleSWU(Fp,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:Fp.create(BigInt("-11"))});createHasher(secp256k1.ProjectivePoint,(scalars=>{const{x:x,y:y}=mapSWU(Fp.create(scalars[0]));return isoMap(x,y)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:Fp.ORDER,m:1,k:128,expand:"xmd",hash:sha256});var ecdsaSign=function ecdsaSign(msgHash,privKey){var signature=secp256k1.sign(msgHash,privKey);return[signature.toCompactRawBytes(),signature.recovery]};secp256k1.utils.isValidPrivateKey;var publicKeyCreate=secp256k1.getPublicKey;var PRIVATE_KEY_BYTES=32;var ETHEREUM_ADDRESS_BYTES=20;var PUBLIC_KEY_BYTES=64;var SIGNATURE_OFFSETS_SERIALIZED_SIZE=11;var SECP256K1_INSTRUCTION_LAYOUT=struct([u8("numSignatures"),u16("signatureOffset"),u8("signatureInstructionIndex"),u16("ethAddressOffset"),u8("ethAddressInstructionIndex"),u16("messageDataOffset"),u16("messageDataSize"),u8("messageInstructionIndex"),blob(20,"ethAddress"),blob(64,"signature"),u8("recoveryId")]);var Secp256k1Program=function(){function Secp256k1Program(){_classCallCheck(this,Secp256k1Program)}_createClass(Secp256k1Program,null,[{key:"publicKeyToEthAddress",value:function publicKeyToEthAddress(publicKey){assert$1(publicKey.length===PUBLIC_KEY_BYTES,"Public key must be ".concat(PUBLIC_KEY_BYTES," bytes but received ").concat(publicKey.length," bytes"));try{return buffer.Buffer.from(keccak_256(toBuffer(publicKey))).slice(-ETHEREUM_ADDRESS_BYTES)}catch(error){throw new Error("Error constructing Ethereum address: ".concat(error))}}},{key:"createInstructionWithPublicKey",value:function createInstructionWithPublicKey(params){var publicKey=params.publicKey,message=params.message,signature=params.signature,recoveryId=params.recoveryId,instructionIndex=params.instructionIndex;return Secp256k1Program.createInstructionWithEthAddress({ethAddress:Secp256k1Program.publicKeyToEthAddress(publicKey),message:message,signature:signature,recoveryId:recoveryId,instructionIndex:instructionIndex})}},{key:"createInstructionWithEthAddress",value:function createInstructionWithEthAddress(params){var rawAddress=params.ethAddress,message=params.message,signature=params.signature,recoveryId=params.recoveryId,_params$instructionIn=params.instructionIndex,instructionIndex=_params$instructionIn===void 0?0:_params$instructionIn;var ethAddress;if(typeof rawAddress==="string"){if(rawAddress.startsWith("0x")){ethAddress=buffer.Buffer.from(rawAddress.substr(2),"hex")}else{ethAddress=buffer.Buffer.from(rawAddress,"hex")}}else{ethAddress=rawAddress}assert$1(ethAddress.length===ETHEREUM_ADDRESS_BYTES,"Address must be ".concat(ETHEREUM_ADDRESS_BYTES," bytes but received ").concat(ethAddress.length," bytes"));var dataStart=1+SIGNATURE_OFFSETS_SERIALIZED_SIZE;var ethAddressOffset=dataStart;var signatureOffset=dataStart+ethAddress.length;var messageDataOffset=signatureOffset+signature.length+1;var numSignatures=1;var instructionData=buffer.Buffer.alloc(SECP256K1_INSTRUCTION_LAYOUT.span+message.length);SECP256K1_INSTRUCTION_LAYOUT.encode({numSignatures:numSignatures,signatureOffset:signatureOffset,signatureInstructionIndex:instructionIndex,ethAddressOffset:ethAddressOffset,ethAddressInstructionIndex:instructionIndex,messageDataOffset:messageDataOffset,messageDataSize:message.length,messageInstructionIndex:instructionIndex,signature:toBuffer(signature),ethAddress:toBuffer(ethAddress),recoveryId:recoveryId},instructionData);instructionData.fill(toBuffer(message),SECP256K1_INSTRUCTION_LAYOUT.span);return new TransactionInstruction({keys:[],programId:Secp256k1Program.programId,data:instructionData})}},{key:"createInstructionWithPrivateKey",value:function createInstructionWithPrivateKey(params){var pkey=params.privateKey,message=params.message,instructionIndex=params.instructionIndex;assert$1(pkey.length===PRIVATE_KEY_BYTES,"Private key must be ".concat(PRIVATE_KEY_BYTES," bytes but received ").concat(pkey.length," bytes"));try{var privateKey=toBuffer(pkey);var publicKey=publicKeyCreate(privateKey,false).slice(1);var messageHash=buffer.Buffer.from(keccak_256(toBuffer(message)));var _ecdsaSign=ecdsaSign(messageHash,privateKey),_ecdsaSign2=_slicedToArray(_ecdsaSign,2),signature=_ecdsaSign2[0],recoveryId=_ecdsaSign2[1];return this.createInstructionWithPublicKey({publicKey:publicKey,message:message,signature:signature,recoveryId:recoveryId,instructionIndex:instructionIndex})}catch(error){throw new Error("Error creating instruction; ".concat(error))}}}]);return Secp256k1Program}();Secp256k1Program.programId=new PublicKey("KeccakSecp256k11111111111111111111111111111");var STAKE_CONFIG_ID=new PublicKey("StakeConfig11111111111111111111111111111111");var Authorized=_createClass((function Authorized(staker,withdrawer){_classCallCheck(this,Authorized);this.staker=void 0;this.withdrawer=void 0;this.staker=staker;this.withdrawer=withdrawer}));var Lockup=_createClass((function Lockup(unixTimestamp,epoch,custodian){_classCallCheck(this,Lockup);this.unixTimestamp=void 0;this.epoch=void 0;this.custodian=void 0;this.unixTimestamp=unixTimestamp;this.epoch=epoch;this.custodian=custodian}));Lockup["default"]=new Lockup(0,0,PublicKey["default"]);var StakeInstruction=function(){function StakeInstruction(){_classCallCheck(this,StakeInstruction)}_createClass(StakeInstruction,null,[{key:"decodeInstructionType",value:function decodeInstructionType(instruction){this.checkProgramId(instruction.programId);var instructionTypeLayout=u32("instruction");var typeIndex=instructionTypeLayout.decode(instruction.data);var type;for(var _i=0,_Object$entries=Object.entries(STAKE_INSTRUCTION_LAYOUTS);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),ixType=_Object$entries$_i[0],layout=_Object$entries$_i[1];if(layout.index==typeIndex){type=ixType;break}}if(!type){throw new Error("Instruction type incorrect; not a StakeInstruction")}return type}},{key:"decodeInitialize",value:function decodeInitialize(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData=decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Initialize,instruction.data),authorized=_decodeData.authorized,lockup=_decodeData.lockup;return{stakePubkey:instruction.keys[0].pubkey,authorized:new Authorized(new PublicKey(authorized.staker),new PublicKey(authorized.withdrawer)),lockup:new Lockup(lockup.unixTimestamp,lockup.epoch,new PublicKey(lockup.custodian))}}},{key:"decodeDelegate",value:function decodeDelegate(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,6);decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Delegate,instruction.data);return{stakePubkey:instruction.keys[0].pubkey,votePubkey:instruction.keys[1].pubkey,authorizedPubkey:instruction.keys[5].pubkey}}},{key:"decodeAuthorize",value:function decodeAuthorize(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);var _decodeData2=decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Authorize,instruction.data),newAuthorized=_decodeData2.newAuthorized,stakeAuthorizationType=_decodeData2.stakeAuthorizationType;var o={stakePubkey:instruction.keys[0].pubkey,authorizedPubkey:instruction.keys[2].pubkey,newAuthorizedPubkey:new PublicKey(newAuthorized),stakeAuthorizationType:{index:stakeAuthorizationType}};if(instruction.keys.length>3){o.custodianPubkey=instruction.keys[3].pubkey}return o}},{key:"decodeAuthorizeWithSeed",value:function decodeAuthorizeWithSeed(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData3=decodeData$1(STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,instruction.data),newAuthorized=_decodeData3.newAuthorized,stakeAuthorizationType=_decodeData3.stakeAuthorizationType,authoritySeed=_decodeData3.authoritySeed,authorityOwner=_decodeData3.authorityOwner;var o={stakePubkey:instruction.keys[0].pubkey,authorityBase:instruction.keys[1].pubkey,authoritySeed:authoritySeed,authorityOwner:new PublicKey(authorityOwner),newAuthorizedPubkey:new PublicKey(newAuthorized),stakeAuthorizationType:{index:stakeAuthorizationType}};if(instruction.keys.length>3){o.custodianPubkey=instruction.keys[3].pubkey}return o}},{key:"decodeSplit",value:function decodeSplit(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);var _decodeData4=decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Split,instruction.data),lamports=_decodeData4.lamports;return{stakePubkey:instruction.keys[0].pubkey,splitStakePubkey:instruction.keys[1].pubkey,authorizedPubkey:instruction.keys[2].pubkey,lamports:lamports}}},{key:"decodeMerge",value:function decodeMerge(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Merge,instruction.data);return{stakePubkey:instruction.keys[0].pubkey,sourceStakePubKey:instruction.keys[1].pubkey,authorizedPubkey:instruction.keys[4].pubkey}}},{key:"decodeWithdraw",value:function decodeWithdraw(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,5);var _decodeData5=decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Withdraw,instruction.data),lamports=_decodeData5.lamports;var o={stakePubkey:instruction.keys[0].pubkey,toPubkey:instruction.keys[1].pubkey,authorizedPubkey:instruction.keys[4].pubkey,lamports:lamports};if(instruction.keys.length>5){o.custodianPubkey=instruction.keys[5].pubkey}return o}},{key:"decodeDeactivate",value:function decodeDeactivate(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Deactivate,instruction.data);return{stakePubkey:instruction.keys[0].pubkey,authorizedPubkey:instruction.keys[2].pubkey}}},{key:"checkProgramId",value:function checkProgramId(programId){if(!programId.equals(StakeProgram.programId)){throw new Error("invalid instruction; programId is not StakeProgram")}}},{key:"checkKeyLength",value:function checkKeyLength(keys,expectedLength){if(keys.lengthcurrentVoteAccountBalance-rentExemptMinimum){throw new Error("Withdraw will leave vote account with insuffcient funds.")}return VoteProgram.withdraw(params)}}]);return VoteProgram}();VoteProgram.programId=new PublicKey("Vote111111111111111111111111111111111111111");VoteProgram.space=3731;var VALIDATOR_INFO_KEY=new PublicKey("Va1idator1nfo111111111111111111111111111111");var InfoString=type({name:string(),website:optional(string()),details:optional(string()),keybaseUsername:optional(string())});var ValidatorInfo=function(){function ValidatorInfo(key,info){_classCallCheck(this,ValidatorInfo);this.key=void 0;this.info=void 0;this.key=key;this.info=info}_createClass(ValidatorInfo,null,[{key:"fromConfigData",value:function fromConfigData(buffer$1){var byteArray=_toConsumableArray(buffer$1);var configKeyCount=decodeLength(byteArray);if(configKeyCount!==2)return null;var configKeys=[];for(var i=0;i<2;i++){var publicKey=new PublicKey(byteArray.slice(0,PUBLIC_KEY_LENGTH));byteArray=byteArray.slice(PUBLIC_KEY_LENGTH);var isSigner=byteArray.slice(0,1)[0]===1;byteArray=byteArray.slice(1);configKeys.push({publicKey:publicKey,isSigner:isSigner})}if(configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)){if(configKeys[1].isSigner){var rawInfo=rustString().decode(buffer.Buffer.from(byteArray));var info=JSON.parse(rawInfo);assert(info,InfoString);return new ValidatorInfo(configKeys[1].publicKey,info)}}return null}}]);return ValidatorInfo}();var VOTE_PROGRAM_ID=new PublicKey("Vote111111111111111111111111111111111111111");var VoteAccountLayout=struct([publicKey("nodePubkey"),publicKey("authorizedWithdrawer"),u8("commission"),nu64(),seq(struct([nu64("slot"),u32("confirmationCount")]),offset(u32(),-8),"votes"),u8("rootSlotValid"),nu64("rootSlot"),nu64(),seq(struct([nu64("epoch"),publicKey("authorizedVoter")]),offset(u32(),-8),"authorizedVoters"),struct([seq(struct([publicKey("authorizedPubkey"),nu64("epochOfLastAuthorizedSwitch"),nu64("targetEpoch")]),32,"buf"),nu64("idx"),u8("isEmpty")],"priorVoters"),nu64(),seq(struct([nu64("epoch"),nu64("credits"),nu64("prevCredits")]),offset(u32(),-8),"epochCredits"),struct([nu64("slot"),nu64("timestamp")],"lastTimestamp")]);var VoteAccount=function(){function VoteAccount(args){_classCallCheck(this,VoteAccount);this.nodePubkey=void 0;this.authorizedWithdrawer=void 0;this.commission=void 0;this.rootSlot=void 0;this.votes=void 0;this.authorizedVoters=void 0;this.priorVoters=void 0;this.epochCredits=void 0;this.lastTimestamp=void 0;this.nodePubkey=args.nodePubkey;this.authorizedWithdrawer=args.authorizedWithdrawer;this.commission=args.commission;this.rootSlot=args.rootSlot;this.votes=args.votes;this.authorizedVoters=args.authorizedVoters;this.priorVoters=args.priorVoters;this.epochCredits=args.epochCredits;this.lastTimestamp=args.lastTimestamp}_createClass(VoteAccount,null,[{key:"fromAccountData",value:function fromAccountData(buffer){var versionOffset=4;var va=VoteAccountLayout.decode(toBuffer(buffer),versionOffset);var rootSlot=va.rootSlot;if(!va.rootSlotValid){rootSlot=null}return new VoteAccount({nodePubkey:new PublicKey(va.nodePubkey),authorizedWithdrawer:new PublicKey(va.authorizedWithdrawer),commission:va.commission,votes:va.votes,rootSlot:rootSlot,authorizedVoters:va.authorizedVoters.map(parseAuthorizedVoter),priorVoters:getPriorVoters(va.priorVoters),epochCredits:va.epochCredits,lastTimestamp:va.lastTimestamp})}}]);return VoteAccount}();function parseAuthorizedVoter(_ref){var authorizedVoter=_ref.authorizedVoter,epoch=_ref.epoch;return{epoch:epoch,authorizedVoter:new PublicKey(authorizedVoter)}}function parsePriorVoters(_ref2){var authorizedPubkey=_ref2.authorizedPubkey,epochOfLastAuthorizedSwitch=_ref2.epochOfLastAuthorizedSwitch,targetEpoch=_ref2.targetEpoch;return{authorizedPubkey:new PublicKey(authorizedPubkey),epochOfLastAuthorizedSwitch:epochOfLastAuthorizedSwitch,targetEpoch:targetEpoch}}function getPriorVoters(_ref3){var buf=_ref3.buf,idx=_ref3.idx,isEmpty=_ref3.isEmpty;if(isEmpty){return[]}return[].concat(_toConsumableArray(buf.slice(idx+1).map(parsePriorVoters)),_toConsumableArray(buf.slice(0,idx).map(parsePriorVoters)))}var endpoint={http:{devnet:"http://api.devnet.solana.com",testnet:"http://api.testnet.solana.com","mainnet-beta":"http://api.mainnet-beta.solana.com/"},https:{devnet:"https://api.devnet.solana.com",testnet:"https://api.testnet.solana.com","mainnet-beta":"https://api.mainnet-beta.solana.com/"}};function clusterApiUrl(cluster,tls){var key=tls===false?"http":"https";if(!cluster){return endpoint[key]["devnet"]}var url=endpoint[key][cluster];if(!url){throw new Error("Unknown ".concat(key," cluster: ").concat(cluster))}return url}function sendAndConfirmRawTransaction(_x,_x2,_x3,_x4){return _sendAndConfirmRawTransaction.apply(this,arguments)}function _sendAndConfirmRawTransaction(){_sendAndConfirmRawTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(connection,rawTransaction,confirmationStrategyOrConfirmOptions,maybeConfirmOptions){var confirmationStrategy,options,sendOptions,signature,commitment,confirmationPromise,status;return _regeneratorRuntime().wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(confirmationStrategyOrConfirmOptions&&Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions,"lastValidBlockHeight")){confirmationStrategy=confirmationStrategyOrConfirmOptions;options=maybeConfirmOptions}else if(confirmationStrategyOrConfirmOptions&&Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions,"nonceValue")){confirmationStrategy=confirmationStrategyOrConfirmOptions;options=maybeConfirmOptions}else{options=confirmationStrategyOrConfirmOptions}sendOptions=options&&{skipPreflight:options.skipPreflight,preflightCommitment:options.preflightCommitment||options.commitment,minContextSlot:options.minContextSlot};_context.next=4;return connection.sendRawTransaction(rawTransaction,sendOptions);case 4:signature=_context.sent;commitment=options&&options.commitment;confirmationPromise=confirmationStrategy?connection.confirmTransaction(confirmationStrategy,commitment):connection.confirmTransaction(signature,commitment);_context.next=9;return confirmationPromise;case 9:status=_context.sent.value;if(!status.err){_context.next=12;break}throw new Error("Raw transaction ".concat(signature," failed (").concat(JSON.stringify(status),")"));case 12:return _context.abrupt("return",signature);case 13:case"end":return _context.stop()}}),_callee)})));return _sendAndConfirmRawTransaction.apply(this,arguments)}var LAMPORTS_PER_SOL=1e9;exports.Account=Account;exports.AddressLookupTableAccount=AddressLookupTableAccount;exports.AddressLookupTableInstruction=AddressLookupTableInstruction;exports.AddressLookupTableProgram=AddressLookupTableProgram;exports.Authorized=Authorized;exports.BLOCKHASH_CACHE_TIMEOUT_MS=BLOCKHASH_CACHE_TIMEOUT_MS;exports.BPF_LOADER_DEPRECATED_PROGRAM_ID=BPF_LOADER_DEPRECATED_PROGRAM_ID;exports.BPF_LOADER_PROGRAM_ID=BPF_LOADER_PROGRAM_ID;exports.BpfLoader=BpfLoader;exports.COMPUTE_BUDGET_INSTRUCTION_LAYOUTS=COMPUTE_BUDGET_INSTRUCTION_LAYOUTS;exports.ComputeBudgetInstruction=ComputeBudgetInstruction;exports.ComputeBudgetProgram=ComputeBudgetProgram;exports.Connection=Connection;exports.Ed25519Program=Ed25519Program;exports.Enum=Enum;exports.EpochSchedule=EpochSchedule;exports.FeeCalculatorLayout=FeeCalculatorLayout;exports.Keypair=Keypair;exports.LAMPORTS_PER_SOL=LAMPORTS_PER_SOL;exports.LOOKUP_TABLE_INSTRUCTION_LAYOUTS=LOOKUP_TABLE_INSTRUCTION_LAYOUTS;exports.Loader=Loader;exports.Lockup=Lockup;exports.MAX_SEED_LENGTH=MAX_SEED_LENGTH;exports.Message=Message;exports.MessageAccountKeys=MessageAccountKeys;exports.MessageV0=MessageV0;exports.NONCE_ACCOUNT_LENGTH=NONCE_ACCOUNT_LENGTH;exports.NonceAccount=NonceAccount;exports.PACKET_DATA_SIZE=PACKET_DATA_SIZE;exports.PUBLIC_KEY_LENGTH=PUBLIC_KEY_LENGTH;exports.PublicKey=PublicKey;exports.SIGNATURE_LENGTH_IN_BYTES=SIGNATURE_LENGTH_IN_BYTES;exports.SOLANA_SCHEMA=SOLANA_SCHEMA;exports.STAKE_CONFIG_ID=STAKE_CONFIG_ID;exports.STAKE_INSTRUCTION_LAYOUTS=STAKE_INSTRUCTION_LAYOUTS;exports.SYSTEM_INSTRUCTION_LAYOUTS=SYSTEM_INSTRUCTION_LAYOUTS;exports.SYSVAR_CLOCK_PUBKEY=SYSVAR_CLOCK_PUBKEY;exports.SYSVAR_EPOCH_SCHEDULE_PUBKEY=SYSVAR_EPOCH_SCHEDULE_PUBKEY;exports.SYSVAR_INSTRUCTIONS_PUBKEY=SYSVAR_INSTRUCTIONS_PUBKEY;exports.SYSVAR_RECENT_BLOCKHASHES_PUBKEY=SYSVAR_RECENT_BLOCKHASHES_PUBKEY;exports.SYSVAR_RENT_PUBKEY=SYSVAR_RENT_PUBKEY;exports.SYSVAR_REWARDS_PUBKEY=SYSVAR_REWARDS_PUBKEY;exports.SYSVAR_SLOT_HASHES_PUBKEY=SYSVAR_SLOT_HASHES_PUBKEY;exports.SYSVAR_SLOT_HISTORY_PUBKEY=SYSVAR_SLOT_HISTORY_PUBKEY;exports.SYSVAR_STAKE_HISTORY_PUBKEY=SYSVAR_STAKE_HISTORY_PUBKEY;exports.Secp256k1Program=Secp256k1Program;exports.SendTransactionError=SendTransactionError;exports.SolanaJSONRPCError=SolanaJSONRPCError;exports.SolanaJSONRPCErrorCode=SolanaJSONRPCErrorCode;exports.StakeAuthorizationLayout=StakeAuthorizationLayout;exports.StakeInstruction=StakeInstruction;exports.StakeProgram=StakeProgram;exports.Struct=Struct$1;exports.SystemInstruction=SystemInstruction;exports.SystemProgram=SystemProgram;exports.Transaction=Transaction;exports.TransactionExpiredBlockheightExceededError=TransactionExpiredBlockheightExceededError;exports.TransactionExpiredNonceInvalidError=TransactionExpiredNonceInvalidError;exports.TransactionExpiredTimeoutError=TransactionExpiredTimeoutError;exports.TransactionInstruction=TransactionInstruction;exports.TransactionMessage=TransactionMessage;exports.TransactionStatus=TransactionStatus;exports.VALIDATOR_INFO_KEY=VALIDATOR_INFO_KEY;exports.VERSION_PREFIX_MASK=VERSION_PREFIX_MASK;exports.VOTE_PROGRAM_ID=VOTE_PROGRAM_ID;exports.ValidatorInfo=ValidatorInfo;exports.VersionedMessage=VersionedMessage;exports.VersionedTransaction=VersionedTransaction;exports.VoteAccount=VoteAccount;exports.VoteAuthorizationLayout=VoteAuthorizationLayout;exports.VoteInit=VoteInit;exports.VoteInstruction=VoteInstruction;exports.VoteProgram=VoteProgram;exports.clusterApiUrl=clusterApiUrl;exports.sendAndConfirmRawTransaction=sendAndConfirmRawTransaction;exports.sendAndConfirmTransaction=sendAndConfirmTransaction;return exports}({}); -+/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const secp256k1P=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f");const secp256k1N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");const _1n=BigInt(1);const _2n=BigInt(2);const divNearest=(a,b)=>(a+b/_2n)/b;function sqrtMod(y){const P=secp256k1P;const _3n=BigInt(3),_6n=BigInt(6),_11n=BigInt(11),_22n=BigInt(22);const _23n=BigInt(23),_44n=BigInt(44),_88n=BigInt(88);const b2=y*y*y%P;const b3=b2*b2*y%P;const b6=pow2(b3,_3n,P)*b3%P;const b9=pow2(b6,_3n,P)*b3%P;const b11=pow2(b9,_2n,P)*b2%P;const b22=pow2(b11,_11n,P)*b11%P;const b44=pow2(b22,_22n,P)*b22%P;const b88=pow2(b44,_44n,P)*b44%P;const b176=pow2(b88,_88n,P)*b88%P;const b220=pow2(b176,_44n,P)*b44%P;const b223=pow2(b220,_3n,P)*b3%P;const t1=pow2(b223,_23n,P)*b22%P;const t2=pow2(t1,_6n,P)*b2%P;const root=pow2(t2,_2n,P);if(!Fp.eql(Fp.sqr(root),y))throw new Error("Cannot find square root");return root}const Fp=Field(secp256k1P,undefined,undefined,{sqrt:sqrtMod});const secp256k1=createCurve({a:BigInt(0),b:BigInt(7),Fp:Fp,n:secp256k1N,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:true,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:k=>{const n=secp256k1N;const a1=BigInt("0x3086d221a7d46bcde86c90e49284eb15");const b1=-_1n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3");const a2=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8");const b2=a1;const POW_2_128=BigInt("0x100000000000000000000000000000000");const c1=divNearest(b2*k,n);const c2=divNearest(-b1*k,n);let k1=mod(k-c1*a1-c2*a2,n);let k2=mod(-c1*b1-c2*b2,n);const k1neg=k1>POW_2_128;const k2neg=k2>POW_2_128;if(k1neg)k1=n-k1;if(k2neg)k2=n-k2;if(k1>POW_2_128||k2>POW_2_128){throw new Error("splitScalar: Endomorphism failed, k="+k)}return{k1neg:k1neg,k1:k1,k2neg:k2neg,k2:k2}}}},sha256);const _0n=BigInt(0);const fe=x=>typeof x==="bigint"&&_0ntypeof x==="bigint"&&_0nc.charCodeAt(0))));tagP=concatBytes(tagH,tagH);TAGGED_HASH_PREFIXES[tag]=tagP}return sha256(concatBytes(tagP,...messages))}const pointToBytes=point=>point.toRawBytes(true).slice(1);const numTo32b=n=>numberToBytesBE(n,32);const modP=x=>mod(x,secp256k1P);const modN=x=>mod(x,secp256k1N);const Point=secp256k1.ProjectivePoint;const GmulAdd=(Q,a,b)=>Point.BASE.multiplyAndAddUnsafe(Q,a,b);function schnorrGetExtPubKey(priv){let d_=secp256k1.utils.normPrivateKeyToScalar(priv);let p=Point.fromPrivateKey(d_);const scalar=p.hasEvenY()?d_:modN(-d_);return{scalar:scalar,bytes:pointToBytes(p)}}function lift_x(x){if(!fe(x))throw new Error("bad x: need 0 < x < p");const xx=modP(x*x);const c=modP(xx*x+BigInt(7));let y=sqrtMod(c);if(y%_2n!==_0n)y=modP(-y);const p=new Point(x,y,_1n);p.assertValidity();return p}function challenge(...args){return modN(bytesToNumberBE(taggedHash("BIP0340/challenge",...args)))}function schnorrGetPublicKey(privateKey){return schnorrGetExtPubKey(privateKey).bytes}function schnorrSign(message,privateKey,auxRand=randomBytes(32)){const m=ensureBytes("message",message);const{bytes:px,scalar:d}=schnorrGetExtPubKey(privateKey);const a=ensureBytes("auxRand",auxRand,32);const t=numTo32b(d^bytesToNumberBE(taggedHash("BIP0340/aux",a)));const rand=taggedHash("BIP0340/nonce",t,px,m);const k_=modN(bytesToNumberBE(rand));if(k_===_0n)throw new Error("sign failed: k is zero");const{bytes:rx,scalar:k}=schnorrGetExtPubKey(k_);const e=challenge(rx,px,m);const sig=new Uint8Array(64);sig.set(rx,0);sig.set(numTo32b(modN(k+e*d)),32);if(!schnorrVerify(sig,m,px))throw new Error("sign: Invalid signature produced");return sig}function schnorrVerify(signature,message,publicKey){const sig=ensureBytes("signature",signature,64);const m=ensureBytes("message",message);const pub=ensureBytes("publicKey",publicKey,32);try{const P=lift_x(bytesToNumberBE(pub));const r=bytesToNumberBE(sig.subarray(0,32));if(!fe(r))return false;const s=bytesToNumberBE(sig.subarray(32,64));if(!ge(s))return false;const e=challenge(numTo32b(r),pointToBytes(P),m);const R=GmulAdd(P,s,modN(-e));if(!R||!R.hasEvenY()||R.toAffine().x!==r)return false;return true}catch(error){return false}}({getPublicKey:schnorrGetPublicKey,sign:schnorrSign,verify:schnorrVerify,utils:{randomPrivateKey:secp256k1.utils.randomPrivateKey,lift_x:lift_x,pointToBytes:pointToBytes,numberToBytesBE:numberToBytesBE,bytesToNumberBE:bytesToNumberBE,taggedHash:taggedHash,mod:mod}});const isoMap=isogenyMap(Fp,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((i=>i.map((j=>BigInt(j))))));const mapSWU=mapToCurveSimpleSWU(Fp,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:Fp.create(BigInt("-11"))});createHasher(secp256k1.ProjectivePoint,(scalars=>{const{x:x,y:y}=mapSWU(Fp.create(scalars[0]));return isoMap(x,y)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:Fp.ORDER,m:1,k:128,expand:"xmd",hash:sha256});var ecdsaSign=function ecdsaSign(msgHash,privKey){var signature=secp256k1.sign(msgHash,privKey);return[signature.toCompactRawBytes(),signature.recovery]};secp256k1.utils.isValidPrivateKey;var publicKeyCreate=secp256k1.getPublicKey;var PRIVATE_KEY_BYTES=32;var ETHEREUM_ADDRESS_BYTES=20;var PUBLIC_KEY_BYTES=64;var SIGNATURE_OFFSETS_SERIALIZED_SIZE=11;var SECP256K1_INSTRUCTION_LAYOUT=struct([u8("numSignatures"),u16("signatureOffset"),u8("signatureInstructionIndex"),u16("ethAddressOffset"),u8("ethAddressInstructionIndex"),u16("messageDataOffset"),u16("messageDataSize"),u8("messageInstructionIndex"),blob(20,"ethAddress"),blob(64,"signature"),u8("recoveryId")]);var Secp256k1Program=function(){function Secp256k1Program(){_classCallCheck(this,Secp256k1Program)}_createClass(Secp256k1Program,null,[{key:"publicKeyToEthAddress",value:function publicKeyToEthAddress(publicKey){assert$1(publicKey.length===PUBLIC_KEY_BYTES,"Public key must be ".concat(PUBLIC_KEY_BYTES," bytes but received ").concat(publicKey.length," bytes"));try{return buffer.Buffer.from(keccak_256(toBuffer(publicKey))).slice(-ETHEREUM_ADDRESS_BYTES)}catch(error){throw new Error("Error constructing Ethereum address: ".concat(error))}}},{key:"createInstructionWithPublicKey",value:function createInstructionWithPublicKey(params){var publicKey=params.publicKey,message=params.message,signature=params.signature,recoveryId=params.recoveryId,instructionIndex=params.instructionIndex;return Secp256k1Program.createInstructionWithEthAddress({ethAddress:Secp256k1Program.publicKeyToEthAddress(publicKey),message:message,signature:signature,recoveryId:recoveryId,instructionIndex:instructionIndex})}},{key:"createInstructionWithEthAddress",value:function createInstructionWithEthAddress(params){var rawAddress=params.ethAddress,message=params.message,signature=params.signature,recoveryId=params.recoveryId,_params$instructionIn=params.instructionIndex,instructionIndex=_params$instructionIn===void 0?0:_params$instructionIn;var ethAddress;if(typeof rawAddress==="string"){if(rawAddress.startsWith("0x")){ethAddress=buffer.Buffer.from(rawAddress.substr(2),"hex")}else{ethAddress=buffer.Buffer.from(rawAddress,"hex")}}else{ethAddress=rawAddress}assert$1(ethAddress.length===ETHEREUM_ADDRESS_BYTES,"Address must be ".concat(ETHEREUM_ADDRESS_BYTES," bytes but received ").concat(ethAddress.length," bytes"));var dataStart=1+SIGNATURE_OFFSETS_SERIALIZED_SIZE;var ethAddressOffset=dataStart;var signatureOffset=dataStart+ethAddress.length;var messageDataOffset=signatureOffset+signature.length+1;var numSignatures=1;var instructionData=buffer.Buffer.alloc(SECP256K1_INSTRUCTION_LAYOUT.span+message.length);SECP256K1_INSTRUCTION_LAYOUT.encode({numSignatures:numSignatures,signatureOffset:signatureOffset,signatureInstructionIndex:instructionIndex,ethAddressOffset:ethAddressOffset,ethAddressInstructionIndex:instructionIndex,messageDataOffset:messageDataOffset,messageDataSize:message.length,messageInstructionIndex:instructionIndex,signature:toBuffer(signature),ethAddress:toBuffer(ethAddress),recoveryId:recoveryId},instructionData);instructionData.fill(toBuffer(message),SECP256K1_INSTRUCTION_LAYOUT.span);return new TransactionInstruction({keys:[],programId:Secp256k1Program.programId,data:instructionData})}},{key:"createInstructionWithPrivateKey",value:function createInstructionWithPrivateKey(params){var pkey=params.privateKey,message=params.message,instructionIndex=params.instructionIndex;assert$1(pkey.length===PRIVATE_KEY_BYTES,"Private key must be ".concat(PRIVATE_KEY_BYTES," bytes but received ").concat(pkey.length," bytes"));try{var privateKey=toBuffer(pkey);var publicKey=publicKeyCreate(privateKey,false).slice(1);var messageHash=buffer.Buffer.from(keccak_256(toBuffer(message)));var _ecdsaSign=ecdsaSign(messageHash,privateKey),_ecdsaSign2=_slicedToArray(_ecdsaSign,2),signature=_ecdsaSign2[0],recoveryId=_ecdsaSign2[1];return this.createInstructionWithPublicKey({publicKey:publicKey,message:message,signature:signature,recoveryId:recoveryId,instructionIndex:instructionIndex})}catch(error){throw new Error("Error creating instruction; ".concat(error))}}}]);return Secp256k1Program}();Secp256k1Program.programId=new PublicKey("KeccakSecp256k11111111111111111111111111111");var STAKE_CONFIG_ID=new PublicKey("StakeConfig11111111111111111111111111111111");var Authorized=_createClass((function Authorized(staker,withdrawer){_classCallCheck(this,Authorized);this.staker=void 0;this.withdrawer=void 0;this.staker=staker;this.withdrawer=withdrawer}));var Lockup=_createClass((function Lockup(unixTimestamp,epoch,custodian){_classCallCheck(this,Lockup);this.unixTimestamp=void 0;this.epoch=void 0;this.custodian=void 0;this.unixTimestamp=unixTimestamp;this.epoch=epoch;this.custodian=custodian}));Lockup["default"]=new Lockup(0,0,PublicKey["default"]);var StakeInstruction=function(){function StakeInstruction(){_classCallCheck(this,StakeInstruction)}_createClass(StakeInstruction,null,[{key:"decodeInstructionType",value:function decodeInstructionType(instruction){this.checkProgramId(instruction.programId);var instructionTypeLayout=u32("instruction");var typeIndex=instructionTypeLayout.decode(instruction.data);var type;for(var _i=0,_Object$entries=Object.entries(STAKE_INSTRUCTION_LAYOUTS);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),ixType=_Object$entries$_i[0],layout=_Object$entries$_i[1];if(layout.index==typeIndex){type=ixType;break}}if(!type){throw new Error("Instruction type incorrect; not a StakeInstruction")}return type}},{key:"decodeInitialize",value:function decodeInitialize(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData=decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Initialize,instruction.data),authorized=_decodeData.authorized,lockup=_decodeData.lockup;return{stakePubkey:instruction.keys[0].pubkey,authorized:new Authorized(new PublicKey(authorized.staker),new PublicKey(authorized.withdrawer)),lockup:new Lockup(lockup.unixTimestamp,lockup.epoch,new PublicKey(lockup.custodian))}}},{key:"decodeDelegate",value:function decodeDelegate(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,6);decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Delegate,instruction.data);return{stakePubkey:instruction.keys[0].pubkey,votePubkey:instruction.keys[1].pubkey,authorizedPubkey:instruction.keys[5].pubkey}}},{key:"decodeAuthorize",value:function decodeAuthorize(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);var _decodeData2=decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Authorize,instruction.data),newAuthorized=_decodeData2.newAuthorized,stakeAuthorizationType=_decodeData2.stakeAuthorizationType;var o={stakePubkey:instruction.keys[0].pubkey,authorizedPubkey:instruction.keys[2].pubkey,newAuthorizedPubkey:new PublicKey(newAuthorized),stakeAuthorizationType:{index:stakeAuthorizationType}};if(instruction.keys.length>3){o.custodianPubkey=instruction.keys[3].pubkey}return o}},{key:"decodeAuthorizeWithSeed",value:function decodeAuthorizeWithSeed(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,2);var _decodeData3=decodeData$1(STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,instruction.data),newAuthorized=_decodeData3.newAuthorized,stakeAuthorizationType=_decodeData3.stakeAuthorizationType,authoritySeed=_decodeData3.authoritySeed,authorityOwner=_decodeData3.authorityOwner;var o={stakePubkey:instruction.keys[0].pubkey,authorityBase:instruction.keys[1].pubkey,authoritySeed:authoritySeed,authorityOwner:new PublicKey(authorityOwner),newAuthorizedPubkey:new PublicKey(newAuthorized),stakeAuthorizationType:{index:stakeAuthorizationType}};if(instruction.keys.length>3){o.custodianPubkey=instruction.keys[3].pubkey}return o}},{key:"decodeSplit",value:function decodeSplit(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);var _decodeData4=decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Split,instruction.data),lamports=_decodeData4.lamports;return{stakePubkey:instruction.keys[0].pubkey,splitStakePubkey:instruction.keys[1].pubkey,authorizedPubkey:instruction.keys[2].pubkey,lamports:lamports}}},{key:"decodeMerge",value:function decodeMerge(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Merge,instruction.data);return{stakePubkey:instruction.keys[0].pubkey,sourceStakePubKey:instruction.keys[1].pubkey,authorizedPubkey:instruction.keys[4].pubkey}}},{key:"decodeWithdraw",value:function decodeWithdraw(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,5);var _decodeData5=decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Withdraw,instruction.data),lamports=_decodeData5.lamports;var o={stakePubkey:instruction.keys[0].pubkey,toPubkey:instruction.keys[1].pubkey,authorizedPubkey:instruction.keys[4].pubkey,lamports:lamports};if(instruction.keys.length>5){o.custodianPubkey=instruction.keys[5].pubkey}return o}},{key:"decodeDeactivate",value:function decodeDeactivate(instruction){this.checkProgramId(instruction.programId);this.checkKeyLength(instruction.keys,3);decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Deactivate,instruction.data);return{stakePubkey:instruction.keys[0].pubkey,authorizedPubkey:instruction.keys[2].pubkey}}},{key:"checkProgramId",value:function checkProgramId(programId){if(!programId.equals(StakeProgram.programId)){throw new Error("invalid instruction; programId is not StakeProgram")}}},{key:"checkKeyLength",value:function checkKeyLength(keys,expectedLength){if(keys.lengthcurrentVoteAccountBalance-rentExemptMinimum){throw new Error("Withdraw will leave vote account with insuffcient funds.")}return VoteProgram.withdraw(params)}}]);return VoteProgram}();VoteProgram.programId=new PublicKey("Vote111111111111111111111111111111111111111");VoteProgram.space=3731;var VALIDATOR_INFO_KEY=new PublicKey("Va1idator1nfo111111111111111111111111111111");var InfoString=type({name:string(),website:optional(string()),details:optional(string()),keybaseUsername:optional(string())});var ValidatorInfo=function(){function ValidatorInfo(key,info){_classCallCheck(this,ValidatorInfo);this.key=void 0;this.info=void 0;this.key=key;this.info=info}_createClass(ValidatorInfo,null,[{key:"fromConfigData",value:function fromConfigData(buffer$1){var byteArray=_toConsumableArray(buffer$1);var configKeyCount=decodeLength(byteArray);if(configKeyCount!==2)return null;var configKeys=[];for(var i=0;i<2;i++){var publicKey=new PublicKey(guardedSplice(byteArray,0,PUBLIC_KEY_LENGTH));var isSigner=guardedShift(byteArray)===1;configKeys.push({publicKey:publicKey,isSigner:isSigner})}if(configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)){if(configKeys[1].isSigner){var rawInfo=rustString().decode(buffer.Buffer.from(byteArray));var info=JSON.parse(rawInfo);assert(info,InfoString);return new ValidatorInfo(configKeys[1].publicKey,info)}}return null}}]);return ValidatorInfo}();var VOTE_PROGRAM_ID=new PublicKey("Vote111111111111111111111111111111111111111");var VoteAccountLayout=struct([publicKey("nodePubkey"),publicKey("authorizedWithdrawer"),u8("commission"),nu64(),seq(struct([nu64("slot"),u32("confirmationCount")]),offset(u32(),-8),"votes"),u8("rootSlotValid"),nu64("rootSlot"),nu64(),seq(struct([nu64("epoch"),publicKey("authorizedVoter")]),offset(u32(),-8),"authorizedVoters"),struct([seq(struct([publicKey("authorizedPubkey"),nu64("epochOfLastAuthorizedSwitch"),nu64("targetEpoch")]),32,"buf"),nu64("idx"),u8("isEmpty")],"priorVoters"),nu64(),seq(struct([nu64("epoch"),nu64("credits"),nu64("prevCredits")]),offset(u32(),-8),"epochCredits"),struct([nu64("slot"),nu64("timestamp")],"lastTimestamp")]);var VoteAccount=function(){function VoteAccount(args){_classCallCheck(this,VoteAccount);this.nodePubkey=void 0;this.authorizedWithdrawer=void 0;this.commission=void 0;this.rootSlot=void 0;this.votes=void 0;this.authorizedVoters=void 0;this.priorVoters=void 0;this.epochCredits=void 0;this.lastTimestamp=void 0;this.nodePubkey=args.nodePubkey;this.authorizedWithdrawer=args.authorizedWithdrawer;this.commission=args.commission;this.rootSlot=args.rootSlot;this.votes=args.votes;this.authorizedVoters=args.authorizedVoters;this.priorVoters=args.priorVoters;this.epochCredits=args.epochCredits;this.lastTimestamp=args.lastTimestamp}_createClass(VoteAccount,null,[{key:"fromAccountData",value:function fromAccountData(buffer){var versionOffset=4;var va=VoteAccountLayout.decode(toBuffer(buffer),versionOffset);var rootSlot=va.rootSlot;if(!va.rootSlotValid){rootSlot=null}return new VoteAccount({nodePubkey:new PublicKey(va.nodePubkey),authorizedWithdrawer:new PublicKey(va.authorizedWithdrawer),commission:va.commission,votes:va.votes,rootSlot:rootSlot,authorizedVoters:va.authorizedVoters.map(parseAuthorizedVoter),priorVoters:getPriorVoters(va.priorVoters),epochCredits:va.epochCredits,lastTimestamp:va.lastTimestamp})}}]);return VoteAccount}();function parseAuthorizedVoter(_ref){var authorizedVoter=_ref.authorizedVoter,epoch=_ref.epoch;return{epoch:epoch,authorizedVoter:new PublicKey(authorizedVoter)}}function parsePriorVoters(_ref2){var authorizedPubkey=_ref2.authorizedPubkey,epochOfLastAuthorizedSwitch=_ref2.epochOfLastAuthorizedSwitch,targetEpoch=_ref2.targetEpoch;return{authorizedPubkey:new PublicKey(authorizedPubkey),epochOfLastAuthorizedSwitch:epochOfLastAuthorizedSwitch,targetEpoch:targetEpoch}}function getPriorVoters(_ref3){var buf=_ref3.buf,idx=_ref3.idx,isEmpty=_ref3.isEmpty;if(isEmpty){return[]}return[].concat(_toConsumableArray(buf.slice(idx+1).map(parsePriorVoters)),_toConsumableArray(buf.slice(0,idx).map(parsePriorVoters)))}var endpoint={http:{devnet:"http://api.devnet.solana.com",testnet:"http://api.testnet.solana.com","mainnet-beta":"http://api.mainnet-beta.solana.com/"},https:{devnet:"https://api.devnet.solana.com",testnet:"https://api.testnet.solana.com","mainnet-beta":"https://api.mainnet-beta.solana.com/"}};function clusterApiUrl(cluster,tls){var key=tls===false?"http":"https";if(!cluster){return endpoint[key]["devnet"]}var url=endpoint[key][cluster];if(!url){throw new Error("Unknown ".concat(key," cluster: ").concat(cluster))}return url}function sendAndConfirmRawTransaction(_x,_x2,_x3,_x4){return _sendAndConfirmRawTransaction.apply(this,arguments)}function _sendAndConfirmRawTransaction(){_sendAndConfirmRawTransaction=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(connection,rawTransaction,confirmationStrategyOrConfirmOptions,maybeConfirmOptions){var confirmationStrategy,options,sendOptions,signature,commitment,confirmationPromise,status;return _regeneratorRuntime().wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(confirmationStrategyOrConfirmOptions&&Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions,"lastValidBlockHeight")){confirmationStrategy=confirmationStrategyOrConfirmOptions;options=maybeConfirmOptions}else if(confirmationStrategyOrConfirmOptions&&Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions,"nonceValue")){confirmationStrategy=confirmationStrategyOrConfirmOptions;options=maybeConfirmOptions}else{options=confirmationStrategyOrConfirmOptions}sendOptions=options&&{skipPreflight:options.skipPreflight,preflightCommitment:options.preflightCommitment||options.commitment,minContextSlot:options.minContextSlot};_context.next=4;return connection.sendRawTransaction(rawTransaction,sendOptions);case 4:signature=_context.sent;commitment=options&&options.commitment;confirmationPromise=confirmationStrategy?connection.confirmTransaction(confirmationStrategy,commitment):connection.confirmTransaction(signature,commitment);_context.next=9;return confirmationPromise;case 9:status=_context.sent.value;if(!status.err){_context.next=12;break}throw new Error("Raw transaction ".concat(signature," failed (").concat(JSON.stringify(status),")"));case 12:return _context.abrupt("return",signature);case 13:case"end":return _context.stop()}}),_callee)})));return _sendAndConfirmRawTransaction.apply(this,arguments)}var LAMPORTS_PER_SOL=1e9;exports.Account=Account;exports.AddressLookupTableAccount=AddressLookupTableAccount;exports.AddressLookupTableInstruction=AddressLookupTableInstruction;exports.AddressLookupTableProgram=AddressLookupTableProgram;exports.Authorized=Authorized;exports.BLOCKHASH_CACHE_TIMEOUT_MS=BLOCKHASH_CACHE_TIMEOUT_MS;exports.BPF_LOADER_DEPRECATED_PROGRAM_ID=BPF_LOADER_DEPRECATED_PROGRAM_ID;exports.BPF_LOADER_PROGRAM_ID=BPF_LOADER_PROGRAM_ID;exports.BpfLoader=BpfLoader;exports.COMPUTE_BUDGET_INSTRUCTION_LAYOUTS=COMPUTE_BUDGET_INSTRUCTION_LAYOUTS;exports.ComputeBudgetInstruction=ComputeBudgetInstruction;exports.ComputeBudgetProgram=ComputeBudgetProgram;exports.Connection=Connection;exports.Ed25519Program=Ed25519Program;exports.Enum=Enum;exports.EpochSchedule=EpochSchedule;exports.FeeCalculatorLayout=FeeCalculatorLayout;exports.Keypair=Keypair;exports.LAMPORTS_PER_SOL=LAMPORTS_PER_SOL;exports.LOOKUP_TABLE_INSTRUCTION_LAYOUTS=LOOKUP_TABLE_INSTRUCTION_LAYOUTS;exports.Loader=Loader;exports.Lockup=Lockup;exports.MAX_SEED_LENGTH=MAX_SEED_LENGTH;exports.Message=Message;exports.MessageAccountKeys=MessageAccountKeys;exports.MessageV0=MessageV0;exports.NONCE_ACCOUNT_LENGTH=NONCE_ACCOUNT_LENGTH;exports.NonceAccount=NonceAccount;exports.PACKET_DATA_SIZE=PACKET_DATA_SIZE;exports.PUBLIC_KEY_LENGTH=PUBLIC_KEY_LENGTH;exports.PublicKey=PublicKey;exports.SIGNATURE_LENGTH_IN_BYTES=SIGNATURE_LENGTH_IN_BYTES;exports.SOLANA_SCHEMA=SOLANA_SCHEMA;exports.STAKE_CONFIG_ID=STAKE_CONFIG_ID;exports.STAKE_INSTRUCTION_LAYOUTS=STAKE_INSTRUCTION_LAYOUTS;exports.SYSTEM_INSTRUCTION_LAYOUTS=SYSTEM_INSTRUCTION_LAYOUTS;exports.SYSVAR_CLOCK_PUBKEY=SYSVAR_CLOCK_PUBKEY;exports.SYSVAR_EPOCH_SCHEDULE_PUBKEY=SYSVAR_EPOCH_SCHEDULE_PUBKEY;exports.SYSVAR_INSTRUCTIONS_PUBKEY=SYSVAR_INSTRUCTIONS_PUBKEY;exports.SYSVAR_RECENT_BLOCKHASHES_PUBKEY=SYSVAR_RECENT_BLOCKHASHES_PUBKEY;exports.SYSVAR_RENT_PUBKEY=SYSVAR_RENT_PUBKEY;exports.SYSVAR_REWARDS_PUBKEY=SYSVAR_REWARDS_PUBKEY;exports.SYSVAR_SLOT_HASHES_PUBKEY=SYSVAR_SLOT_HASHES_PUBKEY;exports.SYSVAR_SLOT_HISTORY_PUBKEY=SYSVAR_SLOT_HISTORY_PUBKEY;exports.SYSVAR_STAKE_HISTORY_PUBKEY=SYSVAR_STAKE_HISTORY_PUBKEY;exports.Secp256k1Program=Secp256k1Program;exports.SendTransactionError=SendTransactionError;exports.SolanaJSONRPCError=SolanaJSONRPCError;exports.SolanaJSONRPCErrorCode=SolanaJSONRPCErrorCode;exports.StakeAuthorizationLayout=StakeAuthorizationLayout;exports.StakeInstruction=StakeInstruction;exports.StakeProgram=StakeProgram;exports.Struct=Struct$1;exports.SystemInstruction=SystemInstruction;exports.SystemProgram=SystemProgram;exports.Transaction=Transaction;exports.TransactionExpiredBlockheightExceededError=TransactionExpiredBlockheightExceededError;exports.TransactionExpiredNonceInvalidError=TransactionExpiredNonceInvalidError;exports.TransactionExpiredTimeoutError=TransactionExpiredTimeoutError;exports.TransactionInstruction=TransactionInstruction;exports.TransactionMessage=TransactionMessage;exports.TransactionStatus=TransactionStatus;exports.VALIDATOR_INFO_KEY=VALIDATOR_INFO_KEY;exports.VERSION_PREFIX_MASK=VERSION_PREFIX_MASK;exports.VOTE_PROGRAM_ID=VOTE_PROGRAM_ID;exports.ValidatorInfo=ValidatorInfo;exports.VersionedMessage=VersionedMessage;exports.VersionedTransaction=VersionedTransaction;exports.VoteAccount=VoteAccount;exports.VoteAuthorizationLayout=VoteAuthorizationLayout;exports.VoteInit=VoteInit;exports.VoteInstruction=VoteInstruction;exports.VoteProgram=VoteProgram;exports.clusterApiUrl=clusterApiUrl;exports.sendAndConfirmRawTransaction=sendAndConfirmRawTransaction;exports.sendAndConfirmTransaction=sendAndConfirmTransaction;return exports}({}); - //# sourceMappingURL=index.iife.min.js.map -diff --git a/lib/index.iife.min.js.map b/lib/index.iife.min.js.map -index 86cac8102a340cd4f6bbc33af8389c81865fbcc1..f708ddcb0c203640f00a58edb5a9f997d724d048 100644 ---- a/lib/index.iife.min.js.map -+++ b/lib/index.iife.min.js.map -@@ -1 +1 @@ --{"version":3,"file":"index.iife.min.js","sources":["../../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js","../../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js","../../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/utils.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_sha2.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_u64.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/sha512.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/edwards.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/montgomery.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/hash-to-curve.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/ed25519.js","../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js","../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js","../../../node_modules/.pnpm/base-x@3.0.9/node_modules/base-x/src/index.js","../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/utils.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.js","../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js","../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../../../node_modules/.pnpm/@solana+buffer-layout@4.0.0/node_modules/@solana/buffer-layout/lib/Layout.js","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../../../node_modules/.pnpm/bigint-buffer@1.1.5/node_modules/bigint-buffer/dist/browser.js","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../../../node_modules/.pnpm/superstruct@0.14.2/node_modules/superstruct/lib/index.es.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js","../../../node_modules/.pnpm/jayson@4.1.0/node_modules/jayson/lib/generateRequest.js","../../../node_modules/.pnpm/jayson@4.1.0/node_modules/jayson/lib/client/browser/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/__forks__/browser/fetch-impl.ts","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/typeof.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/regeneratorRuntime.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/regenerator/index.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/asyncToGenerator.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/classCallCheck.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/toPrimitive.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/toPropertyKey.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/createClass.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/setPrototypeOf.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/inherits.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/assertThisInitialized.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/getPrototypeOf.js","../../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js","../../../node_modules/.pnpm/rpc-websockets@7.5.1/node_modules/rpc-websockets/dist/lib/client.js","../../../node_modules/.pnpm/rpc-websockets@7.5.1/node_modules/rpc-websockets/dist/lib/client/websocket.browser.js","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_u64.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/sha3.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/sha256.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/secp256k1.js","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new TypeError('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new TypeError(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map","export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use `globalThis.crypto`, but node.js versions earlier than v19 don't\n// declare it in global scope. For node.js, package.json#exports field mapping\n// rewrites import from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xde, 0xad, 0xbe, 0xef])) // 'deadbeef'\n */\nexport function bytesToHex(uint8a) {\n // pre-caching improves the speed 6x\n if (!(uint8a instanceof Uint8Array))\n throw new Error('Uint8Array expected');\n let hex = '';\n for (let i = 0; i < uint8a.length; i++) {\n hex += hexes[uint8a[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('deadbeef') // Uint8Array.from([0xde, 0xad, 0xbe, 0xef])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string') {\n throw new TypeError('hexToBytes: expected string, got ' + typeof hex);\n }\n if (hex.length % 2)\n throw new Error('hexToBytes: received invalid unpadded hex');\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string') {\n throw new TypeError(`utf8ToBytes expected string, got ${typeof str}`);\n }\n return new TextEncoder().encode(str);\n}\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!(data instanceof Uint8Array))\n throw new TypeError(`Expected input type is Uint8Array (got ${typeof data})`);\n return data;\n}\n/**\n * Concats Uint8Array-s into one; like `Buffer.concat([buf1, buf2])`\n * @example concatBytes(buf1, buf2)\n */\nexport function concatBytes(...arrays) {\n if (!arrays.every((a) => a instanceof Uint8Array))\n throw new Error('Uint8Array list expected');\n if (arrays.length === 1)\n return arrays[0];\n const length = arrays.reduce((a, arr) => a + arr.length, 0);\n const result = new Uint8Array(length);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const arr = arrays[i];\n result.set(arr, pad);\n pad += arr.length;\n }\n return result;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))\n throw new TypeError('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashConstructor) {\n const hashC = (message) => hashConstructor().update(toBytes(message)).digest();\n const tmp = hashConstructor();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashConstructor();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `globalThis.crypto` or node.js crypto module.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import assert from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n assert.exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map","const U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nexport function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nexport function split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nexport const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (h, l) => l;\nconst rotr32L = (h, l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\n// Removing \"export\" has 5% perf penalty -_-\nexport function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import { SHA2 } from './_sha2.js';\nimport u64 from './_u64.js';\nimport { wrapConstructor } from './utils.js';\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n)));\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = new Uint32Array(80);\nconst SHA512_W_L = new Uint32Array(80);\nexport class SHA512 extends SHA2 {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x1f83d9ab | 0;\n this.Gl = 0xfb41bd6b | 0;\n this.Hh = 0x5be0cd19 | 0;\n this.Hl = 0x137e2179 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H.fill(0);\n SHA512_W_L.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\nclass SHA512_224 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x8c3d37c8 | 0;\n this.Al = 0x19544da2 | 0;\n this.Bh = 0x73e19966 | 0;\n this.Bl = 0x89dcd4d6 | 0;\n this.Ch = 0x1dfab7ae | 0;\n this.Cl = 0x32ff9c82 | 0;\n this.Dh = 0x679dd514 | 0;\n this.Dl = 0x582f9fcf | 0;\n this.Eh = 0x0f6d2b69 | 0;\n this.El = 0x7bd44da8 | 0;\n this.Fh = 0x77e36f73 | 0;\n this.Fl = 0x04c48942 | 0;\n this.Gh = 0x3f9d85a8 | 0;\n this.Gl = 0x6a1d36c8 | 0;\n this.Hh = 0x1112e6ad | 0;\n this.Hl = 0x91d692a1 | 0;\n this.outputLen = 28;\n }\n}\nclass SHA512_256 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x22312194 | 0;\n this.Al = 0xfc2bf72c | 0;\n this.Bh = 0x9f555fa3 | 0;\n this.Bl = 0xc84c64c2 | 0;\n this.Ch = 0x2393b86b | 0;\n this.Cl = 0x6f53b151 | 0;\n this.Dh = 0x96387719 | 0;\n this.Dl = 0x5940eabd | 0;\n this.Eh = 0x96283ee2 | 0;\n this.El = 0xa88effe3 | 0;\n this.Fh = 0xbe5e1e25 | 0;\n this.Fl = 0x53863992 | 0;\n this.Gh = 0x2b0199fc | 0;\n this.Gl = 0x2c85b8aa | 0;\n this.Hh = 0x0eb72ddc | 0;\n this.Hl = 0x81c52ca2 | 0;\n this.outputLen = 32;\n }\n}\nclass SHA384 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0xcbbb9d5d | 0;\n this.Al = 0xc1059ed8 | 0;\n this.Bh = 0x629a292a | 0;\n this.Bl = 0x367cd507 | 0;\n this.Ch = 0x9159015a | 0;\n this.Cl = 0x3070dd17 | 0;\n this.Dh = 0x152fecd8 | 0;\n this.Dl = 0xf70e5939 | 0;\n this.Eh = 0x67332667 | 0;\n this.El = 0xffc00b31 | 0;\n this.Fh = 0x8eb44a87 | 0;\n this.Fl = 0x68581511 | 0;\n this.Gh = 0xdb0c2e0d | 0;\n this.Gl = 0x64f98fa7 | 0;\n this.Hh = 0x47b5481d | 0;\n this.Hl = 0xbefa4fa4 | 0;\n this.outputLen = 48;\n }\n}\nexport const sha512 = wrapConstructor(() => new SHA512());\nexport const sha512_224 = wrapConstructor(() => new SHA512_224());\nexport const sha512_256 = wrapConstructor(() => new SHA512_256());\nexport const sha384 = wrapConstructor(() => new SHA384());\n//# sourceMappingURL=sha512.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst u8a = (a) => a instanceof Uint8Array;\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // Big Endian\n return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n// Caching slows it down 2-3x\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n if (hex.length % 2)\n throw new Error('hex string is invalid: unpadded ' + hex.length);\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// Big Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport const numberToBytesBE = (n, len) => hexToBytes(n.toString(16).padStart(len * 2, '0'));\nexport const numberToBytesLE = (n, len) => numberToBytesBE(n, len).reverse();\n// Returns variable number bytes (minimal bigint encoding?)\nexport const numberToVarBytesBE = (n) => hexToBytes(numberToHexUnpadded(n));\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n }\n }\n else if (u8a(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(`${title} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n return res;\n}\n// Copies several Uint8Arrays into one.\nexport function concatBytes(...arrs) {\n const r = new Uint8Array(arrs.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrs.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\nexport function equalBytes(b1, b2) {\n // We don't care about timing attacks here\n if (b1.length !== b2.length)\n return false;\n for (let i = 0; i < b1.length; i++)\n if (b1[i] !== b2[i])\n return false;\n return true;\n}\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string') {\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n }\n return new TextEncoder().encode(str);\n}\n// Bit operations\n// Amount of bits inside bigint (Same as n.toString(2).length)\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n// Gets single bit at position. NOTE: first bit position is 0 (same as arrays)\n// Same as !!+Array.from(n.toString(2)).reverse()[pos]\nexport const bitGet = (n, pos) => (n >> BigInt(pos)) & _1n;\n// Sets single bit at position\nexport const bitSet = (n, pos, value) => n | ((value ? _1n : _0n) << BigInt(pos));\n// Return mask for N bits (Same as BigInt(`0b${Array(i).fill('1').join('')}`))\n// Not using ** operator with bigints for old engines.\nexport const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n()) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\nimport { bitMask, numberToBytesBE, numberToBytesLE, bytesToNumberBE, bytesToNumberLE, ensureBytes, validateObject, } from './utils.js';\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently exponentiate num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * powMod(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nexport function pow(num, power, modulo) {\n if (modulo <= _0n || power < _0n)\n throw new Error('Expected power/modulo > 0');\n if (modulo === _1n)\n return _0n;\n let res = _1n;\n while (power > _0n) {\n if (power & _1n)\n res = (res * num) % modulo;\n num = (num * num) % modulo;\n power >>= _1n;\n }\n return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nexport function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= modulo;\n }\n return res;\n}\n// Inverses number over modulo\nexport function invert(number, modulo) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n // Eucledian GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n let a = mod(number, modulo);\n let b = modulo;\n // prettier-ignore\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n // JIT applies optimization if those two lines follow each other\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n // prettier-ignore\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\n// Tonelli-Shanks algorithm\n// Paper 1: https://eprint.iacr.org/2012/685.pdf (page 12)\n// Paper 2: Square Roots from 1; 24, 51, 10 to Dan Shanks\nexport function tonelliShanks(P) {\n // Legendre constant: used to calculate Legendre symbol (a | p),\n // which denotes the value of a^((p-1)/2) (mod p).\n // (a | p) ≡ 1 if a is a square (mod p)\n // (a | p) ≡ -1 if a is not a square (mod p)\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreC = (P - _1n) / _2n;\n let Q, S, Z;\n // Step 1: By factoring out powers of 2 from p - 1,\n // find q and s such that p - 1 = q*(2^s) with q odd\n for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++)\n ;\n // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++)\n ;\n // Fast-path\n if (S === 1) {\n const p1div4 = (P + _1n) / _4n;\n return function tonelliFast(Fp, n) {\n const root = Fp.pow(n, p1div4);\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Slow-path\n const Q1div2 = (Q + _1n) / _2n;\n return function tonelliSlow(Fp, n) {\n // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n throw new Error('Cannot find square root');\n let r = S;\n // TODO: will fail at Fp2/etc\n let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n let x = Fp.pow(n, Q1div2); // first guess at the square root\n let b = Fp.pow(n, Q); // first guess at the fudge factor\n while (!Fp.eql(b, Fp.ONE)) {\n if (Fp.eql(b, Fp.ZERO))\n return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n // Find m such b^(2^m)==1\n let m = 1;\n for (let t2 = Fp.sqr(b); m < r; m++) {\n if (Fp.eql(t2, Fp.ONE))\n break;\n t2 = Fp.sqr(t2); // t2 *= t2\n }\n // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n const ge = Fp.pow(g, _1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n g = Fp.sqr(ge); // g = ge * ge\n x = Fp.mul(x, ge); // x *= ge\n b = Fp.mul(b, g); // b *= g\n r = m;\n }\n return x;\n };\n}\nexport function FpSqrt(P) {\n // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n // P ≡ 3 (mod 4)\n // √n = n^((P+1)/4)\n if (P % _4n === _3n) {\n // Not all roots possible!\n // const ORDER =\n // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n // const NUM = 72057594037927816n;\n const p1div4 = (P + _1n) / _4n;\n return function sqrt3mod4(Fp, n) {\n const root = Fp.pow(n, p1div4);\n // Throw if root**2 != n\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n if (P % _8n === _5n) {\n const c1 = (P - _5n) / _8n;\n return function sqrt5mod8(Fp, n) {\n const n2 = Fp.mul(n, _2n);\n const v = Fp.pow(n2, c1);\n const nv = Fp.mul(n, v);\n const i = Fp.mul(Fp.mul(nv, _2n), v);\n const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // P ≡ 9 (mod 16)\n if (P % _16n === _9n) {\n // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n // Means we cannot use sqrt for constants at all!\n //\n // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n // const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n // const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n // const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic\n // sqrt = (x) => {\n // let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4\n // let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1\n // const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1\n // let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1\n // const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x\n // const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x\n // tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x\n // tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x\n // const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x\n // return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2\n // }\n }\n // Other cases: Tonelli-Shanks algorithm\n return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n 'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n 'eql', 'add', 'sub', 'mul', 'pow', 'div',\n 'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n const initial = {\n ORDER: 'bigint',\n MASK: 'bigint',\n BYTES: 'isSafeInteger',\n BITS: 'isSafeInteger',\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = 'function';\n return map;\n }, initial);\n return validateObject(field, opts);\n}\n// Generic field functions\nexport function FpPow(f, num, power) {\n // Should have same speed as pow for bigints\n // TODO: benchmark!\n if (power < _0n)\n throw new Error('Expected power > 0');\n if (power === _0n)\n return f.ONE;\n if (power === _1n)\n return num;\n let p = f.ONE;\n let d = num;\n while (power > _0n) {\n if (power & _1n)\n p = f.mul(p, d);\n d = f.sqr(d);\n power >>= _1n;\n }\n return p;\n}\n// 0 is non-invertible: non-batched version will throw on 0\nexport function FpInvertBatch(f, nums) {\n const tmp = new Array(nums.length);\n // Walk from first to last, multiply them by each other MOD p\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = acc;\n return f.mul(acc, num);\n }, f.ONE);\n // Invert last element\n const inverted = f.inv(lastMultiplied);\n // Walk from last to first, multiply them by inverted each other MOD p\n nums.reduceRight((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = f.mul(acc, tmp[i]);\n return f.mul(acc, num);\n }, inverted);\n return tmp;\n}\nexport function FpDiv(f, lhs, rhs) {\n return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n const legendreConst = (f.ORDER - _1n) / _2n; // Integer arithmetic\n return (x) => {\n const p = f.pow(x, legendreConst);\n return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n };\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n // Bit size, byte size of CURVE.n\n const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a galois field over prime. Non-primes are not supported for now.\n * Do not init in loop: slow. Very fragile: always run a benchmark on change.\n * Major performance gains:\n * a) non-normalized operations like mulN instead of mul\n * b) `Object.freeze`\n * c) Same object shape: never add or remove keys\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLen, isLE = false, redef = {}) {\n if (ORDER <= _0n)\n throw new Error(`Expected Fp ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('Field lengths over 2048 bytes are not supported');\n const sqrtP = FpSqrt(ORDER);\n const f = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n,\n ONE: _1n,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== 'bigint')\n throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n },\n is0: (num) => num === _0n,\n isOdd: (num) => (num & _1n) === _1n,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n invertBatch: (lst) => FpInvertBatch(f, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a, b, c) => (c ? b : a),\n toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n });\n return Object.freeze(f);\n}\nexport function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * FIPS 186 B.4.1-compliant \"constant-time\" private key generation utility.\n * Can take (n+8) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being neglible.\n * Needs at least 40 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * @param hash hash output from SHA3 or a similar function\n * @returns valid private scalar\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n hash = ensureBytes('privateHash', hash);\n const hashLen = hash.length;\n const minLen = nLength(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n return mod(num, groupOrder - _1n) + _1n;\n}\n//# sourceMappingURL=modular.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nexport function wNAF(c, bits) {\n const constTimeNegate = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1; // +1, because\n const windowSize = 2 ** (W - 1); // -1 because we skip zero\n return { windows, windowSize };\n };\n return {\n constTimeNegate,\n // non-const time multiplication ladder\n unsafeLadder(elm, n) {\n let p = c.ZERO;\n let d = elm;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p = elm;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n // =1, because we skip zero\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n // But need to carefully remove other checks before wNAF. ORDER == bits here\n const { windows, windowSize } = opts(W);\n let p = c.ZERO;\n let f = c.BASE;\n const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n // Extract W bits.\n let wbits = Number(n & mask);\n // Shift number by W bits.\n n >>= shiftBy;\n // If the bits are bigger than max size, we'll split those.\n // +224 => 256 - 32\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n // there is negate now: it is possible that negated element from low value\n // would be the same as high element, which will create carry into next window.\n // It's not obvious how this can fail, but still worth investigating later.\n // Check if we're onto Zero point.\n // Add random point inside current window to f.\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n // The most important part for const-time getPublicKey\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n // Even if the variable is still unused, there are some checks which will\n // throw an exception, so compiler needs to prove they won't happen, which is hard.\n // At this point there is a way to F be infinity-point even if p is not,\n // which makes it less const-time: around 1 bigint multiply.\n return { p, f };\n },\n wNAFCached(P, precomputesMap, n, transform) {\n // @ts-ignore\n const W = P._WINDOW_SIZE || 1;\n // Calculate precomputes on a first run, reuse them after\n let comp = precomputesMap.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1) {\n precomputesMap.set(P, transform(comp));\n }\n }\n return this.wNAF(W, comp, n);\n },\n };\n}\nexport function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: 'bigint',\n h: 'bigint',\n Gx: 'field',\n Gy: 'field',\n }, {\n nBitLength: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n });\n // Set defaults\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER },\n });\n}\n//# sourceMappingURL=curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y²\nimport { mod } from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _8n = BigInt(8);\n// verification rule is either zip215 or rfc8032 / nist186-5. Consult fromHex:\nconst VERIFY_DEFAULT = { zip215: true };\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(curve, {\n hash: 'function',\n a: 'bigint',\n d: 'bigint',\n randomBytes: 'function',\n }, {\n adjustScalarBytes: 'function',\n domain: 'function',\n uvRatio: 'function',\n mapToCurve: 'function',\n });\n // Set defaults\n return Object.freeze({ ...opts });\n}\n// It is not generic twisted curve for now, but ed25519/ed448 generic implementation\nexport function twistedEdwards(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, prehash: prehash, hash: cHash, randomBytes, nByteLength, h: cofactor, } = CURVE;\n const MASK = _2n ** BigInt(nByteLength * 8);\n const modP = Fp.create; // Function overrides\n // sqrt(u/v)\n const uvRatio = CURVE.uvRatio ||\n ((u, v) => {\n try {\n return { isValid: true, value: Fp.sqrt(u * Fp.inv(v)) };\n }\n catch (e) {\n return { isValid: false, value: _0n };\n }\n });\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes); // NOOP\n const domain = CURVE.domain ||\n ((data, ctx, phflag) => {\n if (ctx.length || phflag)\n throw new Error('Contexts/pre-hash are not supported');\n return data;\n }); // NOOP\n const inBig = (n) => typeof n === 'bigint' && _0n < n; // n in [1..]\n const inRange = (n, max) => inBig(n) && inBig(max) && n < max; // n in [1..max-1]\n const in0MaskRange = (n) => n === _0n || inRange(n, MASK); // n in [0..MASK-1]\n function assertInRange(n, max) {\n // n in [1..max-1]\n if (inRange(n, max))\n return n;\n throw new Error(`Expected valid scalar < ${max}, got ${typeof n} ${n}`);\n }\n function assertGE0(n) {\n // n in [0..CURVE_ORDER-1]\n return n === _0n ? n : assertInRange(n, CURVE_ORDER); // GE = prime subgroup, not full group\n }\n const pointPrecomputes = new Map();\n function isPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ExtendedPoint expected');\n }\n // Extended Point works in extended coordinates: (x, y, z, t) ∋ (x=x/z, y=y/z, t=xy).\n // https://en.wikipedia.org/wiki/Twisted_Edwards_curve#Extended_coordinates\n class Point {\n constructor(ex, ey, ez, et) {\n this.ex = ex;\n this.ey = ey;\n this.ez = ez;\n this.et = et;\n if (!in0MaskRange(ex))\n throw new Error('x required');\n if (!in0MaskRange(ey))\n throw new Error('y required');\n if (!in0MaskRange(ez))\n throw new Error('z required');\n if (!in0MaskRange(et))\n throw new Error('t required');\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error('extended point not allowed');\n const { x, y } = p || {};\n if (!in0MaskRange(x) || !in0MaskRange(y))\n throw new Error('invalid affine point');\n return new Point(x, y, _1n, modP(x * y));\n }\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.ez));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // Not required for fromHex(), which always creates valid points.\n // Could be useful for fromAffine().\n assertValidity() {\n const { a, d } = CURVE;\n if (this.is0())\n throw new Error('bad point: ZERO'); // TODO: optimize, with vars below?\n // Equation in affine coordinates: ax² + y² = 1 + dx²y²\n // Equation in projective coordinates (X/Z, Y/Z, Z): (aX² + Y²)Z² = Z⁴ + dX²Y²\n const { ex: X, ey: Y, ez: Z, et: T } = this;\n const X2 = modP(X * X); // X²\n const Y2 = modP(Y * Y); // Y²\n const Z2 = modP(Z * Z); // Z²\n const Z4 = modP(Z2 * Z2); // Z⁴\n const aX2 = modP(X2 * a); // aX²\n const left = modP(Z2 * modP(aX2 + Y2)); // (aX² + Y²)Z²\n const right = modP(Z4 + modP(d * modP(X2 * Y2))); // Z⁴ + dX²Y²\n if (left !== right)\n throw new Error('bad point: equation left != right (1)');\n // In Extended coordinates we also have T, which is x*y=T/Z: check X*Y == Z*T\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error('bad point: equation left != right (2)');\n }\n // Compare one point to another.\n equals(other) {\n isPoint(other);\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const { ex: X2, ey: Y2, ez: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n // Flips point sign to a negative one (-x, y in affine coords)\n return new Point(modP(-this.ex), this.ey, this.ez, modP(-this.et));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const A = modP(X1 * X1); // A = X12\n const B = modP(Y1 * Y1); // B = Y12\n const C = modP(_2n * modP(Z1 * Z1)); // C = 2*Z12\n const D = modP(a * A); // D = a*A\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B); // E = (X1+Y1)2-A-B\n const G = D + B; // G = D+B\n const F = G - C; // F = G-C\n const H = D - B; // H = D-B\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n isPoint(other);\n const { a, d } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1, et: T1 } = this;\n const { ex: X2, ey: Y2, ez: Z2, et: T2 } = other;\n // Faster algo for adding 2 Extended Points when curve's a=-1.\n // http://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html#addition-add-2008-hwcd-4\n // Cost: 8M + 8add + 2*2.\n // Note: It does not check whether the `other` point is valid.\n if (a === BigInt(-1)) {\n const A = modP((Y1 - X1) * (Y2 + X2));\n const B = modP((Y1 + X1) * (Y2 - X2));\n const F = modP(B - A);\n if (F === _0n)\n return this.double(); // Same point. Tests say it doesn't affect timing\n const C = modP(Z1 * _2n * T2);\n const D = modP(T1 * _2n * Z2);\n const E = D + C;\n const G = B + A;\n const H = D - C;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n const A = modP(X1 * X2); // A = X1*X2\n const B = modP(Y1 * Y2); // B = Y1*Y2\n const C = modP(T1 * d * T2); // C = T1*d*T2\n const D = modP(Z1 * Z2); // D = Z1*Z2\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B); // E = (X1+Y1)*(X2+Y2)-A-B\n const F = D - C; // F = D-C\n const G = D + C; // G = D+C\n const H = modP(B - a * A); // H = B-a*A\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, Point.normalizeZ);\n }\n // Constant-time multiplication.\n multiply(scalar) {\n const { p, f } = this.wNAF(assertInRange(scalar, CURVE_ORDER));\n return Point.normalizeZ([p, f])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n multiplyUnsafe(scalar) {\n let n = assertGE0(scalar); // 0 <= scalar < CURVE.n\n if (n === _0n)\n return I;\n if (this.equals(I) || n === _1n)\n return this;\n if (this.equals(G))\n return this.wNAF(n).p;\n return wnaf.unsafeLadder(this, n);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafeLadder(this, CURVE_ORDER).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(iz) {\n const { ex: x, ey: y, ez: z } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? _8n : Fp.inv(z); // 8 was chosen arbitrarily\n const ax = modP(x * iz);\n const ay = modP(y * iz);\n const zz = modP(z * iz);\n if (is0)\n return { x: _0n, y: _1n };\n if (zz !== _1n)\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n clearCofactor() {\n const { h: cofactor } = CURVE;\n if (cofactor === _1n)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n // Converts hash string or Uint8Array to Point.\n // Uses algo from RFC8032 5.1.3.\n static fromHex(hex, zip215 = false) {\n const { d, a } = CURVE;\n const len = Fp.BYTES;\n hex = ensureBytes('pointHex', hex, len); // copy hex to a new array\n const normed = hex.slice(); // copy again, we'll manipulate it\n const lastByte = hex[len - 1]; // select last byte\n normed[len - 1] = lastByte & ~0x80; // clear last bit\n const y = ut.bytesToNumberLE(normed);\n if (y === _0n) {\n // y=0 is allowed\n }\n else {\n // RFC8032 prohibits >= p, but ZIP215 doesn't\n if (zip215)\n assertInRange(y, MASK); // zip215=true [1..P-1] (2^255-19-1 for ed25519)\n else\n assertInRange(y, Fp.ORDER); // zip215=false [1..MASK-1] (2^256-1 for ed25519)\n }\n // Ed25519: x² = (y²-1)/(dy²+1) mod p. Ed448: x² = (y²-1)/(dy²-1) mod p. Generic case:\n // ax²+y²=1+dx²y² => y²-1=dx²y²-ax² => y²-1=x²(dy²-a) => x²=(y²-1)/(dy²-a)\n const y2 = modP(y * y); // denominator is always non-0 mod p.\n const u = modP(y2 - _1n); // u = y² - 1\n const v = modP(d * y2 - a); // v = d y² + 1.\n let { isValid, value: x } = uvRatio(u, v); // √(u/v)\n if (!isValid)\n throw new Error('Point.fromHex: invalid y coordinate');\n const isXOdd = (x & _1n) === _1n; // There are 2 square roots. Use x_0 bit to select proper\n const isLastByteOdd = (lastByte & 0x80) !== 0; // if x=0 and x_0 = 1, fail\n if (isLastByteOdd !== isXOdd)\n x = modP(-x); // if x_0 != x mod 2, set x = p-x\n return Point.fromAffine({ x, y });\n }\n static fromPrivateKey(privKey) {\n return getExtendedPublicKey(privKey).point;\n }\n toRawBytes() {\n const { x, y } = this.toAffine();\n const bytes = ut.numberToBytesLE(y, Fp.BYTES); // each y has 2 x values (x, -y)\n bytes[bytes.length - 1] |= x & _1n ? 0x80 : 0; // when compressing, it's enough to store y\n return bytes; // and use the last byte to encode sign of x\n }\n toHex() {\n return ut.bytesToHex(this.toRawBytes()); // Same as toRawBytes, but returns string.\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, _1n, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(_0n, _1n, _1n, _0n); // 0, 1, 1, 0\n const { BASE: G, ZERO: I } = Point;\n const wnaf = wNAF(Point, nByteLength * 8);\n function modN(a) {\n return mod(a, CURVE_ORDER);\n }\n // Little-endian SHA512 with modulo n\n function modN_LE(hash) {\n return modN(ut.bytesToNumberLE(hash));\n }\n /** Convenience method that creates public key and other stuff. RFC8032 5.1.5 */\n function getExtendedPublicKey(key) {\n const len = nByteLength;\n key = ensureBytes('private key', key, len);\n // Hash private key with curve's hash function to produce uniformingly random input\n // Check byte lengths: ensure(64, h(ensure(32, key)))\n const hashed = ensureBytes('hashed private key', cHash(key), 2 * len);\n const head = adjustScalarBytes(hashed.slice(0, len)); // clear first half bits, produce FE\n const prefix = hashed.slice(len, 2 * len); // second half is called key prefix (5.1.6)\n const scalar = modN_LE(head); // The actual private scalar\n const point = G.multiply(scalar); // Point on Edwards curve aka public key\n const pointBytes = point.toRawBytes(); // Uint8Array representation\n return { head, prefix, scalar, point, pointBytes };\n }\n // Calculates EdDSA pub key. RFC8032 5.1.5. Privkey is hashed. Use first half with 3 bits cleared\n function getPublicKey(privKey) {\n return getExtendedPublicKey(privKey).pointBytes;\n }\n // int('LE', SHA512(dom2(F, C) || msgs)) mod N\n function hashDomainToScalar(context = new Uint8Array(), ...msgs) {\n const msg = ut.concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, ensureBytes('context', context), !!prehash)));\n }\n /** Signs message with privateKey. RFC8032 5.1.6 */\n function sign(msg, privKey, options = {}) {\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph etc.\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(privKey);\n const r = hashDomainToScalar(options.context, prefix, msg); // r = dom2(F, C) || prefix || PH(M)\n const R = G.multiply(r).toRawBytes(); // R = rG\n const k = hashDomainToScalar(options.context, R, pointBytes, msg); // R || A || PH(M)\n const s = modN(r + k * scalar); // S = (r + k * s) mod L\n assertGE0(s); // 0 <= s < l\n const res = ut.concatBytes(R, ut.numberToBytesLE(s, Fp.BYTES));\n return ensureBytes('result', res, nByteLength * 2); // 64-byte signature\n }\n const verifyOpts = VERIFY_DEFAULT;\n function verify(sig, msg, publicKey, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = Fp.BYTES; // Verifies EdDSA signature against message and public key. RFC8032 5.1.7.\n sig = ensureBytes('signature', sig, 2 * len); // An extended group equation is checked.\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph, etc\n const s = ut.bytesToNumberLE(sig.slice(len, 2 * len));\n // zip215: true is good for consensus-critical apps and allows points < 2^256\n // zip215: false follows RFC8032 / NIST186-5 and restricts points to CURVE.p\n let A, R, SB;\n try {\n A = Point.fromHex(publicKey, zip215);\n R = Point.fromHex(sig.slice(0, len), zip215);\n SB = G.multiplyUnsafe(s); // 0 <= s < l is done inside\n }\n catch (error) {\n return false;\n }\n const k = hashDomainToScalar(context, R.toRawBytes(), A.toRawBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n // [8][S]B = [8]R + [8][k]A'\n return RkA.subtract(SB).clearCofactor().equals(Point.ZERO);\n }\n G._setWindowSize(8); // Enable precomputes. Slows down first publicKey computation by 20ms.\n const utils = {\n getExtendedPublicKey,\n // ed25519 private keys are uniform 32b. No need to check for modulo bias, like in secp256k1.\n randomPrivateKey: () => randomBytes(Fp.BYTES),\n /**\n * We're doing scalar multiplication (used in getPublicKey etc) with precomputed BASE_POINT\n * values. This slows down first getPublicKey() by milliseconds (see Speed section),\n * but allows to speed-up subsequent getPublicKey() calls up to 20x.\n * @param windowSize 2, 4, 8, 16\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n },\n };\n return {\n CURVE,\n getPublicKey,\n sign,\n verify,\n ExtendedPoint: Point,\n utils,\n };\n}\n//# sourceMappingURL=edwards.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { mod, pow } from './modular.js';\nimport { bytesToNumberLE, ensureBytes, numberToBytesLE, validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nfunction validateOpts(curve) {\n validateObject(curve, {\n a: 'bigint',\n }, {\n montgomeryBits: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n adjustScalarBytes: 'function',\n domain: 'function',\n powPminus2: 'function',\n Gu: 'bigint',\n });\n // Set defaults\n return Object.freeze({ ...curve });\n}\n// NOTE: not really montgomery curve, just bunch of very specific methods for X25519/X448 (RFC 7748, https://www.rfc-editor.org/rfc/rfc7748)\n// Uses only one coordinate instead of two\nexport function montgomery(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { P } = CURVE;\n const modP = (n) => mod(n, P);\n const montgomeryBits = CURVE.montgomeryBits;\n const montgomeryBytes = Math.ceil(montgomeryBits / 8);\n const fieldLen = CURVE.nByteLength;\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes);\n const powPminus2 = CURVE.powPminus2 || ((x) => pow(x, P - BigInt(2), P));\n // cswap from RFC7748. But it is not from RFC7748!\n /*\n cswap(swap, x_2, x_3):\n dummy = mask(swap) AND (x_2 XOR x_3)\n x_2 = x_2 XOR dummy\n x_3 = x_3 XOR dummy\n Return (x_2, x_3)\n Where mask(swap) is the all-1 or all-0 word of the same length as x_2\n and x_3, computed, e.g., as mask(swap) = 0 - swap.\n */\n function cswap(swap, x_2, x_3) {\n const dummy = modP(swap * (x_2 - x_3));\n x_2 = modP(x_2 - dummy);\n x_3 = modP(x_3 + dummy);\n return [x_2, x_3];\n }\n // Accepts 0 as well\n function assertFieldElement(n) {\n if (typeof n === 'bigint' && _0n <= n && n < P)\n return n;\n throw new Error('Expected valid scalar 0 < scalar < CURVE.P');\n }\n // x25519 from 4\n // The constant a24 is (486662 - 2) / 4 = 121665 for curve25519/X25519\n const a24 = (CURVE.a - BigInt(2)) / BigInt(4);\n /**\n *\n * @param pointU u coordinate (x) on Montgomery Curve 25519\n * @param scalar by which the point would be multiplied\n * @returns new Point on Montgomery curve\n */\n function montgomeryLadder(pointU, scalar) {\n const u = assertFieldElement(pointU);\n // Section 5: Implementations MUST accept non-canonical values and process them as\n // if they had been reduced modulo the field prime.\n const k = assertFieldElement(scalar);\n const x_1 = u;\n let x_2 = _1n;\n let z_2 = _0n;\n let x_3 = u;\n let z_3 = _1n;\n let swap = _0n;\n let sw;\n for (let t = BigInt(montgomeryBits - 1); t >= _0n; t--) {\n const k_t = (k >> t) & _1n;\n swap ^= k_t;\n sw = cswap(swap, x_2, x_3);\n x_2 = sw[0];\n x_3 = sw[1];\n sw = cswap(swap, z_2, z_3);\n z_2 = sw[0];\n z_3 = sw[1];\n swap = k_t;\n const A = x_2 + z_2;\n const AA = modP(A * A);\n const B = x_2 - z_2;\n const BB = modP(B * B);\n const E = AA - BB;\n const C = x_3 + z_3;\n const D = x_3 - z_3;\n const DA = modP(D * A);\n const CB = modP(C * B);\n const dacb = DA + CB;\n const da_cb = DA - CB;\n x_3 = modP(dacb * dacb);\n z_3 = modP(x_1 * modP(da_cb * da_cb));\n x_2 = modP(AA * BB);\n z_2 = modP(E * (AA + modP(a24 * E)));\n }\n // (x_2, x_3) = cswap(swap, x_2, x_3)\n sw = cswap(swap, x_2, x_3);\n x_2 = sw[0];\n x_3 = sw[1];\n // (z_2, z_3) = cswap(swap, z_2, z_3)\n sw = cswap(swap, z_2, z_3);\n z_2 = sw[0];\n z_3 = sw[1];\n // z_2^(p - 2)\n const z2 = powPminus2(z_2);\n // Return x_2 * (z_2^(p - 2))\n return modP(x_2 * z2);\n }\n function encodeUCoordinate(u) {\n return numberToBytesLE(modP(u), montgomeryBytes);\n }\n function decodeUCoordinate(uEnc) {\n // Section 5: When receiving such an array, implementations of X25519\n // MUST mask the most significant bit in the final byte.\n // This is very ugly way, but it works because fieldLen-1 is outside of bounds for X448, so this becomes NOOP\n // fieldLen - scalaryBytes = 1 for X448 and = 0 for X25519\n const u = ensureBytes('u coordinate', uEnc, montgomeryBytes);\n // u[fieldLen-1] crashes QuickJS (TypeError: out-of-bound numeric index)\n if (fieldLen === montgomeryBytes)\n u[fieldLen - 1] &= 127; // 0b0111_1111\n return bytesToNumberLE(u);\n }\n function decodeScalar(n) {\n const bytes = ensureBytes('scalar', n);\n if (bytes.length !== montgomeryBytes && bytes.length !== fieldLen)\n throw new Error(`Expected ${montgomeryBytes} or ${fieldLen} bytes, got ${bytes.length}`);\n return bytesToNumberLE(adjustScalarBytes(bytes));\n }\n function scalarMult(scalar, u) {\n const pointU = decodeUCoordinate(u);\n const _scalar = decodeScalar(scalar);\n const pu = montgomeryLadder(pointU, _scalar);\n // The result was not contributory\n // https://cr.yp.to/ecdh.html#validate\n if (pu === _0n)\n throw new Error('Invalid private or public key received');\n return encodeUCoordinate(pu);\n }\n // Computes public key from private. By doing scalar multiplication of base point.\n const GuBytes = encodeUCoordinate(CURVE.Gu);\n function scalarMultBase(scalar) {\n return scalarMult(scalar, GuBytes);\n }\n return {\n scalarMult,\n scalarMultBase,\n getSharedSecret: (privateKey, publicKey) => scalarMult(privateKey, publicKey),\n getPublicKey: (privateKey) => scalarMultBase(privateKey),\n utils: { randomPrivateKey: () => CURVE.randomBytes(CURVE.nByteLength) },\n GuBytes: GuBytes,\n };\n}\n//# sourceMappingURL=montgomery.js.map","import { mod } from './modular.js';\nimport { bytesToNumberBE, concatBytes, utf8ToBytes, validateObject } from './utils.js';\nfunction validateDST(dst) {\n if (dst instanceof Uint8Array)\n return dst;\n if (typeof dst === 'string')\n return utf8ToBytes(dst);\n throw new Error('DST must be Uint8Array or string');\n}\n// Octet Stream to Integer. \"spec\" implementation of os2ip is 2.5x slower vs bytesToNumberBE.\nconst os2ip = bytesToNumberBE;\n// Integer to Octet Stream (numberToBytesBE)\nfunction i2osp(value, length) {\n if (value < 0 || value >= 1 << (8 * length)) {\n throw new Error(`bad I2OSP call: value=${value} length=${length}`);\n }\n const res = Array.from({ length }).fill(0);\n for (let i = length - 1; i >= 0; i--) {\n res[i] = value & 0xff;\n value >>>= 8;\n }\n return new Uint8Array(res);\n}\nfunction strxor(a, b) {\n const arr = new Uint8Array(a.length);\n for (let i = 0; i < a.length; i++) {\n arr[i] = a[i] ^ b[i];\n }\n return arr;\n}\nfunction isBytes(item) {\n if (!(item instanceof Uint8Array))\n throw new Error('Uint8Array expected');\n}\nfunction isNum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error('number expected');\n}\n// Produces a uniformly random byte string using a cryptographic hash function H that outputs b bits\n// https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-11#section-5.4.1\nexport function expand_message_xmd(msg, DST, lenInBytes, H) {\n isBytes(msg);\n isBytes(DST);\n isNum(lenInBytes);\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-5.3.3\n if (DST.length > 255)\n DST = H(concatBytes(utf8ToBytes('H2C-OVERSIZE-DST-'), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (ell > 255)\n throw new Error('Invalid xmd length');\n const DST_prime = concatBytes(DST, i2osp(DST.length, 1));\n const Z_pad = i2osp(0, r_in_bytes);\n const l_i_b_str = i2osp(lenInBytes, 2); // len_in_bytes_str\n const b = new Array(ell);\n const b_0 = H(concatBytes(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));\n b[0] = H(concatBytes(b_0, i2osp(1, 1), DST_prime));\n for (let i = 1; i <= ell; i++) {\n const args = [strxor(b_0, b[i - 1]), i2osp(i + 1, 1), DST_prime];\n b[i] = H(concatBytes(...args));\n }\n const pseudo_random_bytes = concatBytes(...b);\n return pseudo_random_bytes.slice(0, lenInBytes);\n}\nexport function expand_message_xof(msg, DST, lenInBytes, k, H) {\n isBytes(msg);\n isBytes(DST);\n isNum(lenInBytes);\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-5.3.3\n // DST = H('H2C-OVERSIZE-DST-' || a_very_long_DST, Math.ceil((lenInBytes * k) / 8));\n if (DST.length > 255) {\n const dkLen = Math.ceil((2 * k) / 8);\n DST = H.create({ dkLen }).update(utf8ToBytes('H2C-OVERSIZE-DST-')).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error('expand_message_xof: invalid lenInBytes');\n return (H.create({ dkLen: lenInBytes })\n .update(msg)\n .update(i2osp(lenInBytes, 2))\n // 2. DST_prime = DST || I2OSP(len(DST), 1)\n .update(DST)\n .update(i2osp(DST.length, 1))\n .digest());\n}\n/**\n * Hashes arbitrary-length byte strings to a list of one or more elements of a finite field F\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-11#section-5.3\n * @param msg a byte string containing the message to hash\n * @param count the number of elements of F to output\n * @param options `{DST: string, p: bigint, m: number, k: number, expand: 'xmd' | 'xof', hash: H}`, see above\n * @returns [u_0, ..., u_(count - 1)], a list of field elements.\n */\nexport function hash_to_field(msg, count, options) {\n validateObject(options, {\n DST: 'string',\n p: 'bigint',\n m: 'isSafeInteger',\n k: 'isSafeInteger',\n hash: 'hash',\n });\n const { p, k, m, hash, expand, DST: _DST } = options;\n isBytes(msg);\n isNum(count);\n const DST = validateDST(_DST);\n const log2p = p.toString(2).length;\n const L = Math.ceil((log2p + k) / 8); // section 5.1 of ietf draft link above\n const len_in_bytes = count * m * L;\n let prb; // pseudo_random_bytes\n if (expand === 'xmd') {\n prb = expand_message_xmd(msg, DST, len_in_bytes, hash);\n }\n else if (expand === 'xof') {\n prb = expand_message_xof(msg, DST, len_in_bytes, k, hash);\n }\n else if (expand === '_internal_pass') {\n // for internal tests only\n prb = msg;\n }\n else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u = new Array(count);\n for (let i = 0; i < count; i++) {\n const e = new Array(m);\n for (let j = 0; j < m; j++) {\n const elm_offset = L * (j + i * m);\n const tv = prb.subarray(elm_offset, elm_offset + L);\n e[j] = mod(os2ip(tv), p);\n }\n u[i] = e;\n }\n return u;\n}\nexport function isogenyMap(field, map) {\n // Make same order as in spec\n const COEFF = map.map((i) => Array.from(i).reverse());\n return (x, y) => {\n const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));\n x = field.div(xNum, xDen); // xNum / xDen\n y = field.mul(y, field.div(yNum, yDen)); // y * (yNum / yDev)\n return { x, y };\n };\n}\nexport function createHasher(Point, mapToCurve, def) {\n if (typeof mapToCurve !== 'function')\n throw new Error('mapToCurve() must be defined');\n return {\n // Encodes byte string to elliptic curve\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-3\n hashToCurve(msg, options) {\n const u = hash_to_field(msg, 2, { ...def, DST: def.DST, ...options });\n const u0 = Point.fromAffine(mapToCurve(u[0]));\n const u1 = Point.fromAffine(mapToCurve(u[1]));\n const P = u0.add(u1).clearCofactor();\n P.assertValidity();\n return P;\n },\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-3\n encodeToCurve(msg, options) {\n const u = hash_to_field(msg, 1, { ...def, DST: def.encodeDST, ...options });\n const P = Point.fromAffine(mapToCurve(u[0])).clearCofactor();\n P.assertValidity();\n return P;\n },\n };\n}\n//# sourceMappingURL=hash-to-curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha512 } from '@noble/hashes/sha512';\nimport { concatBytes, randomBytes, utf8ToBytes } from '@noble/hashes/utils';\nimport { twistedEdwards } from './abstract/edwards.js';\nimport { montgomery } from './abstract/montgomery.js';\nimport { mod, pow2, isNegativeLE, Field, FpSqrtEven } from './abstract/modular.js';\nimport { equalBytes, bytesToHex, bytesToNumberLE, numberToBytesLE, ensureBytes, } from './abstract/utils.js';\nimport * as htf from './abstract/hash-to-curve.js';\n/**\n * ed25519 Twisted Edwards curve with following addons:\n * - X25519 ECDH\n * - Ristretto cofactor elimination\n * - Elligator hash-to-group / point indistinguishability\n */\nconst ED25519_P = BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819949');\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst ED25519_SQRT_M1 = BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _5n = BigInt(5);\n// prettier-ignore\nconst _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\nfunction ed25519_pow_2_252_3(x) {\n const P = ED25519_P;\n const x2 = (x * x) % P;\n const b2 = (x2 * x) % P; // x^3, 11\n const b4 = (pow2(b2, _2n, P) * b2) % P; // x^15, 1111\n const b5 = (pow2(b4, _1n, P) * x) % P; // x^31\n const b10 = (pow2(b5, _5n, P) * b5) % P;\n const b20 = (pow2(b10, _10n, P) * b10) % P;\n const b40 = (pow2(b20, _20n, P) * b20) % P;\n const b80 = (pow2(b40, _40n, P) * b40) % P;\n const b160 = (pow2(b80, _80n, P) * b80) % P;\n const b240 = (pow2(b160, _80n, P) * b80) % P;\n const b250 = (pow2(b240, _10n, P) * b10) % P;\n const pow_p_5_8 = (pow2(b250, _2n, P) * x) % P;\n // ^ To pow to (p+3)/8, multiply it by x.\n return { pow_p_5_8, b2 };\n}\nfunction adjustScalarBytes(bytes) {\n // Section 5: For X25519, in order to decode 32 random bytes as an integer scalar,\n // set the three least significant bits of the first byte\n bytes[0] &= 248; // 0b1111_1000\n // and the most significant bit of the last to zero,\n bytes[31] &= 127; // 0b0111_1111\n // set the second most significant bit of the last byte to 1\n bytes[31] |= 64; // 0b0100_0000\n return bytes;\n}\n// sqrt(u/v)\nfunction uvRatio(u, v) {\n const P = ED25519_P;\n const v3 = mod(v * v * v, P); // v³\n const v7 = mod(v3 * v3 * v, P); // v⁷\n // (p+3)/8 and (p-5)/8\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = mod(u * v3 * pow, P); // (uv³)(uv⁷)^(p-5)/8\n const vx2 = mod(v * x * x, P); // vx²\n const root1 = x; // First root candidate\n const root2 = mod(x * ED25519_SQRT_M1, P); // Second root candidate\n const useRoot1 = vx2 === u; // If vx² = u (mod p), x is a square root\n const useRoot2 = vx2 === mod(-u, P); // If vx² = -u, set x <-- x * 2^((p-1)/4)\n const noRoot = vx2 === mod(-u * ED25519_SQRT_M1, P); // There is no valid root, vx² = -u√(-1)\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2; // We return root2 anyway, for const-time\n if (isNegativeLE(x, P))\n x = mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n}\n// Just in case\nexport const ED25519_TORSION_SUBGROUP = [\n '0100000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a',\n '0000000000000000000000000000000000000000000000000000000000000080',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05',\n 'ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85',\n '0000000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa',\n];\nconst Fp = Field(ED25519_P, undefined, true);\nconst ed25519Defaults = {\n // Param: a\n a: BigInt(-1),\n // d is equal to -121665/121666 over finite field.\n // Negative number is P - number, and division is invert(number, P)\n d: BigInt('37095705934669439343138083508754565189542113879843219016388785533085940283555'),\n // Finite field 𝔽p over which we'll do calculations; 2n ** 255n - 19n\n Fp,\n // Subgroup order: how many points curve has\n // 2n ** 252n + 27742317777372353535851937790883648493n;\n n: BigInt('7237005577332262213973186563042994240857116359379907606001950938285454250989'),\n // Cofactor\n h: BigInt(8),\n // Base point (x, y) aka generator point\n Gx: BigInt('15112221349535400772501151409588531511454012693041857206046113283949847762202'),\n Gy: BigInt('46316835694926478169428394003475163141307993866256225615783033603165251855960'),\n hash: sha512,\n randomBytes,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio,\n};\nexport const ed25519 = twistedEdwards(ed25519Defaults);\nfunction ed25519_domain(data, ctx, phflag) {\n if (ctx.length > 255)\n throw new Error('Context is too big');\n return concatBytes(utf8ToBytes('SigEd25519 no Ed25519 collisions'), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);\n}\nexport const ed25519ctx = twistedEdwards({ ...ed25519Defaults, domain: ed25519_domain });\nexport const ed25519ph = twistedEdwards({\n ...ed25519Defaults,\n domain: ed25519_domain,\n prehash: sha512,\n});\nexport const x25519 = montgomery({\n P: ED25519_P,\n a: BigInt(486662),\n montgomeryBits: 255,\n nByteLength: 32,\n Gu: BigInt(9),\n powPminus2: (x) => {\n const P = ED25519_P;\n // x^(p-2) aka x^(2^255-21)\n const { pow_p_5_8, b2 } = ed25519_pow_2_252_3(x);\n return mod(pow2(pow_p_5_8, BigInt(3), P) * b2, P);\n },\n adjustScalarBytes,\n randomBytes,\n});\n/**\n * Converts ed25519 public key to x25519 public key. Uses formula:\n * * `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * * `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * @example\n * const aPub = ed25519.getPublicKey(utils.randomPrivateKey());\n * x25519.getSharedSecret(edwardsToMontgomery(aPub), edwardsToMontgomery(someonesPub))\n */\nexport function edwardsToMontgomery(edwardsPub) {\n const { y } = ed25519.ExtendedPoint.fromHex(edwardsPub);\n const _1n = BigInt(1);\n return Fp.toBytes(Fp.create((y - _1n) * Fp.inv(y + _1n)));\n}\n// Hash To Curve Elligator2 Map (NOTE: different from ristretto255 elligator)\n// NOTE: very important part is usage of FpSqrtEven for ELL2_C1_EDWARDS, since\n// SageMath returns different root first and everything falls apart\nconst ELL2_C1 = (Fp.ORDER + BigInt(3)) / BigInt(8); // 1. c1 = (q + 3) / 8 # Integer arithmetic\nconst ELL2_C2 = Fp.pow(_2n, ELL2_C1); // 2. c2 = 2^c1\nconst ELL2_C3 = Fp.sqrt(Fp.neg(Fp.ONE)); // 3. c3 = sqrt(-1)\nconst ELL2_C4 = (Fp.ORDER - BigInt(5)) / BigInt(8); // 4. c4 = (q - 5) / 8 # Integer arithmetic\nconst ELL2_J = BigInt(486662);\n// prettier-ignore\nfunction map_to_curve_elligator2_curve25519(u) {\n let tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, _2n); // 2. tv1 = 2 * tv1\n let xd = Fp.add(tv1, Fp.ONE); // 3. xd = tv1 + 1 # Nonzero: -1 is square (mod p), tv1 is not\n let x1n = Fp.neg(ELL2_J); // 4. x1n = -J # x1 = x1n / xd = -J / (1 + 2 * u^2)\n let tv2 = Fp.sqr(xd); // 5. tv2 = xd^2\n let gxd = Fp.mul(tv2, xd); // 6. gxd = tv2 * xd # gxd = xd^3\n let gx1 = Fp.mul(tv1, ELL2_J); // 7. gx1 = J * tv1 # x1n + J * xd\n gx1 = Fp.mul(gx1, x1n); // 8. gx1 = gx1 * x1n # x1n^2 + J * x1n * xd\n gx1 = Fp.add(gx1, tv2); // 9. gx1 = gx1 + tv2 # x1n^2 + J * x1n * xd + xd^2\n gx1 = Fp.mul(gx1, x1n); // 10. gx1 = gx1 * x1n # x1n^3 + J * x1n^2 * xd + x1n * xd^2\n let tv3 = Fp.sqr(gxd); // 11. tv3 = gxd^2\n tv2 = Fp.sqr(tv3); // 12. tv2 = tv3^2 # gxd^4\n tv3 = Fp.mul(tv3, gxd); // 13. tv3 = tv3 * gxd # gxd^3\n tv3 = Fp.mul(tv3, gx1); // 14. tv3 = tv3 * gx1 # gx1 * gxd^3\n tv2 = Fp.mul(tv2, tv3); // 15. tv2 = tv2 * tv3 # gx1 * gxd^7\n let y11 = Fp.pow(tv2, ELL2_C4); // 16. y11 = tv2^c4 # (gx1 * gxd^7)^((p - 5) / 8)\n y11 = Fp.mul(y11, tv3); // 17. y11 = y11 * tv3 # gx1*gxd^3*(gx1*gxd^7)^((p-5)/8)\n let y12 = Fp.mul(y11, ELL2_C3); // 18. y12 = y11 * c3\n tv2 = Fp.sqr(y11); // 19. tv2 = y11^2\n tv2 = Fp.mul(tv2, gxd); // 20. tv2 = tv2 * gxd\n let e1 = Fp.eql(tv2, gx1); // 21. e1 = tv2 == gx1\n let y1 = Fp.cmov(y12, y11, e1); // 22. y1 = CMOV(y12, y11, e1) # If g(x1) is square, this is its sqrt\n let x2n = Fp.mul(x1n, tv1); // 23. x2n = x1n * tv1 # x2 = x2n / xd = 2 * u^2 * x1n / xd\n let y21 = Fp.mul(y11, u); // 24. y21 = y11 * u\n y21 = Fp.mul(y21, ELL2_C2); // 25. y21 = y21 * c2\n let y22 = Fp.mul(y21, ELL2_C3); // 26. y22 = y21 * c3\n let gx2 = Fp.mul(gx1, tv1); // 27. gx2 = gx1 * tv1 # g(x2) = gx2 / gxd = 2 * u^2 * g(x1)\n tv2 = Fp.sqr(y21); // 28. tv2 = y21^2\n tv2 = Fp.mul(tv2, gxd); // 29. tv2 = tv2 * gxd\n let e2 = Fp.eql(tv2, gx2); // 30. e2 = tv2 == gx2\n let y2 = Fp.cmov(y22, y21, e2); // 31. y2 = CMOV(y22, y21, e2) # If g(x2) is square, this is its sqrt\n tv2 = Fp.sqr(y1); // 32. tv2 = y1^2\n tv2 = Fp.mul(tv2, gxd); // 33. tv2 = tv2 * gxd\n let e3 = Fp.eql(tv2, gx1); // 34. e3 = tv2 == gx1\n let xn = Fp.cmov(x2n, x1n, e3); // 35. xn = CMOV(x2n, x1n, e3) # If e3, x = x1, else x = x2\n let y = Fp.cmov(y2, y1, e3); // 36. y = CMOV(y2, y1, e3) # If e3, y = y1, else y = y2\n let e4 = Fp.isOdd(y); // 37. e4 = sgn0(y) == 1 # Fix sign of y\n y = Fp.cmov(y, Fp.neg(y), e3 !== e4); // 38. y = CMOV(y, -y, e3 XOR e4)\n return { xMn: xn, xMd: xd, yMn: y, yMd: _1n }; // 39. return (xn, xd, y, 1)\n}\nconst ELL2_C1_EDWARDS = FpSqrtEven(Fp, Fp.neg(BigInt(486664))); // sgn0(c1) MUST equal 0\nfunction map_to_curve_elligator2_edwards25519(u) {\n const { xMn, xMd, yMn, yMd } = map_to_curve_elligator2_curve25519(u); // 1. (xMn, xMd, yMn, yMd) = map_to_curve_elligator2_curve25519(u)\n let xn = Fp.mul(xMn, yMd); // 2. xn = xMn * yMd\n xn = Fp.mul(xn, ELL2_C1_EDWARDS); // 3. xn = xn * c1\n let xd = Fp.mul(xMd, yMn); // 4. xd = xMd * yMn # xn / xd = c1 * xM / yM\n let yn = Fp.sub(xMn, xMd); // 5. yn = xMn - xMd\n let yd = Fp.add(xMn, xMd); // 6. yd = xMn + xMd # (n / d - 1) / (n / d + 1) = (n - d) / (n + d)\n let tv1 = Fp.mul(xd, yd); // 7. tv1 = xd * yd\n let e = Fp.eql(tv1, Fp.ZERO); // 8. e = tv1 == 0\n xn = Fp.cmov(xn, Fp.ZERO, e); // 9. xn = CMOV(xn, 0, e)\n xd = Fp.cmov(xd, Fp.ONE, e); // 10. xd = CMOV(xd, 1, e)\n yn = Fp.cmov(yn, Fp.ONE, e); // 11. yn = CMOV(yn, 1, e)\n yd = Fp.cmov(yd, Fp.ONE, e); // 12. yd = CMOV(yd, 1, e)\n const inv = Fp.invertBatch([xd, yd]); // batch division\n return { x: Fp.mul(xn, inv[0]), y: Fp.mul(yn, inv[1]) }; // 13. return (xn, xd, yn, yd)\n}\nconst { hashToCurve, encodeToCurve } = htf.createHasher(ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {\n DST: 'edwards25519_XMD:SHA-512_ELL2_RO_',\n encodeDST: 'edwards25519_XMD:SHA-512_ELL2_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha512,\n});\nexport { hashToCurve, encodeToCurve };\nfunction assertRstPoint(other) {\n if (!(other instanceof RistrettoPoint))\n throw new Error('RistrettoPoint expected');\n}\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst SQRT_M1 = BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// √(ad - 1)\nconst SQRT_AD_MINUS_ONE = BigInt('25063068953384623474111414158702152701244531502492656460079210482610430750235');\n// 1 / √(a-d)\nconst INVSQRT_A_MINUS_D = BigInt('54469307008909316920995813868745141605393597292927456921205312896311721017578');\n// 1-d²\nconst ONE_MINUS_D_SQ = BigInt('1159843021668779879193775521855586647937357759715417654439879720876111806838');\n// (d-1)²\nconst D_MINUS_ONE_SQ = BigInt('40440834346308536858101042469323190826248399146238708352240133220865137265952');\n// Calculates 1/√(number)\nconst invertSqrt = (number) => uvRatio(_1n, number);\nconst MAX_255B = BigInt('0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');\nconst bytes255ToNumberLE = (bytes) => ed25519.CURVE.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n// Computes Elligator map for Ristretto\n// https://ristretto.group/formulas/elligator.html\nfunction calcElligatorRistrettoMap(r0) {\n const { d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const r = mod(SQRT_M1 * r0 * r0); // 1\n const Ns = mod((r + _1n) * ONE_MINUS_D_SQ); // 2\n let c = BigInt(-1); // 3\n const D = mod((c - d * r) * mod(r + d)); // 4\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D); // 5\n let s_ = mod(s * r0); // 6\n if (!isNegativeLE(s_, P))\n s_ = mod(-s_);\n if (!Ns_D_is_sq)\n s = s_; // 7\n if (!Ns_D_is_sq)\n c = r; // 8\n const Nt = mod(c * (r - _1n) * D_MINUS_ONE_SQ - D); // 9\n const s2 = s * s;\n const W0 = mod((s + s) * D); // 10\n const W1 = mod(Nt * SQRT_AD_MINUS_ONE); // 11\n const W2 = mod(_1n - s2); // 12\n const W3 = mod(_1n + s2); // 13\n return new ed25519.ExtendedPoint(mod(W0 * W3), mod(W2 * W1), mod(W1 * W3), mod(W0 * W2));\n}\n/**\n * Each ed25519/ExtendedPoint has 8 different equivalent points. This can be\n * a source of bugs for protocols like ring signatures. Ristretto was created to solve this.\n * Ristretto point operates in X:Y:Z:T extended coordinates like ExtendedPoint,\n * but it should work in its own namespace: do not combine those two.\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-ristretto255-decaf448\n */\nclass RistrettoPoint {\n // Private property to discourage combining ExtendedPoint + RistrettoPoint\n // Always use Ristretto encoding/decoding instead.\n constructor(ep) {\n this.ep = ep;\n }\n static fromAffine(ap) {\n return new RistrettoPoint(ed25519.ExtendedPoint.fromAffine(ap));\n }\n /**\n * Takes uniform output of 64-bit hash function like sha512 and converts it to `RistrettoPoint`.\n * The hash-to-group operation applies Elligator twice and adds the results.\n * **Note:** this is one-way map, there is no conversion from point to hash.\n * https://ristretto.group/formulas/elligator.html\n * @param hex 64-bit output of a hash function\n */\n static hashToCurve(hex) {\n hex = ensureBytes('ristrettoHash', hex, 64);\n const r1 = bytes255ToNumberLE(hex.slice(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(hex.slice(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new RistrettoPoint(R1.add(R2));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * https://ristretto.group/formulas/decoding.html\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n hex = ensureBytes('ristrettoHex', hex, 32);\n const { a, d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const emsg = 'RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint';\n const s = bytes255ToNumberLE(hex);\n // 1. Check that s_bytes is the canonical encoding of a field element, or else abort.\n // 3. Check that s is non-negative, or else abort\n if (!equalBytes(numberToBytesLE(s, 32), hex) || isNegativeLE(s, P))\n throw new Error(emsg);\n const s2 = mod(s * s);\n const u1 = mod(_1n + a * s2); // 4 (a is -1)\n const u2 = mod(_1n - a * s2); // 5\n const u1_2 = mod(u1 * u1);\n const u2_2 = mod(u2 * u2);\n const v = mod(a * d * u1_2 - u2_2); // 6\n const { isValid, value: I } = invertSqrt(mod(v * u2_2)); // 7\n const Dx = mod(I * u2); // 8\n const Dy = mod(I * Dx * v); // 9\n let x = mod((s + s) * Dx); // 10\n if (isNegativeLE(x, P))\n x = mod(-x); // 10\n const y = mod(u1 * Dy); // 11\n const t = mod(x * y); // 12\n if (!isValid || isNegativeLE(t, P) || y === _0n)\n throw new Error(emsg);\n return new RistrettoPoint(new ed25519.ExtendedPoint(x, y, _1n, t));\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * https://ristretto.group/formulas/encoding.html\n */\n toRawBytes() {\n let { ex: x, ey: y, ez: z, et: t } = this.ep;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const u1 = mod(mod(z + y) * mod(z - y)); // 1\n const u2 = mod(x * y); // 2\n // Square root always exists\n const u2sq = mod(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod(u1 * u2sq)); // 3\n const D1 = mod(invsqrt * u1); // 4\n const D2 = mod(invsqrt * u2); // 5\n const zInv = mod(D1 * D2 * t); // 6\n let D; // 7\n if (isNegativeLE(t * zInv, P)) {\n let _x = mod(y * SQRT_M1);\n let _y = mod(x * SQRT_M1);\n x = _x;\n y = _y;\n D = mod(D1 * INVSQRT_A_MINUS_D);\n }\n else {\n D = D2; // 8\n }\n if (isNegativeLE(x * zInv, P))\n y = mod(-y); // 9\n let s = mod((z - y) * D); // 10 (check footer's note, no sqrt(-a))\n if (isNegativeLE(s, P))\n s = mod(-s);\n return numberToBytesLE(s, 32); // 11\n }\n toHex() {\n return bytesToHex(this.toRawBytes());\n }\n toString() {\n return this.toHex();\n }\n // Compare one point to another.\n equals(other) {\n assertRstPoint(other);\n const { ex: X1, ey: Y1 } = this.ep;\n const { ex: X2, ey: Y2 } = other.ep;\n const mod = ed25519.CURVE.Fp.create;\n // (x1 * y2 == y1 * x2) | (y1 * y2 == x1 * x2)\n const one = mod(X1 * Y2) === mod(Y1 * X2);\n const two = mod(Y1 * Y2) === mod(X1 * X2);\n return one || two;\n }\n add(other) {\n assertRstPoint(other);\n return new RistrettoPoint(this.ep.add(other.ep));\n }\n subtract(other) {\n assertRstPoint(other);\n return new RistrettoPoint(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return new RistrettoPoint(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return new RistrettoPoint(this.ep.multiplyUnsafe(scalar));\n }\n}\nRistrettoPoint.BASE = new RistrettoPoint(ed25519.ExtendedPoint.BASE);\nRistrettoPoint.ZERO = new RistrettoPoint(ed25519.ExtendedPoint.ZERO);\nexport { RistrettoPoint };\n// https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve/14/\n// Appendix B. Hashing to ristretto255\nexport const hash_to_ristretto255 = (msg, options) => {\n const d = options.DST;\n const DST = typeof d === 'string' ? utf8ToBytes(d) : d;\n const uniform_bytes = htf.expand_message_xmd(msg, DST, 64, sha512);\n const P = RistrettoPoint.hashToCurve(uniform_bytes);\n return P;\n};\n//# sourceMappingURL=ed25519.js.map","import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict'\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\n// @ts-ignore\nvar _Buffer = require('safe-buffer').Buffer\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source) }\n if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return _Buffer.alloc(0) }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (source[psz]) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4))\n vch.fill(0x00, 0, zeroes)\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import assert from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n assert.exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map","import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = wrapConstructor(() => new SHA256());\nexport const sha224 = wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","'use strict';\n\n// This is free and unencumbered software released into the public domain.\n// See LICENSE.md for more information.\n\n//\n// Utilities\n//\n\n/**\n * @param {number} a The number to test.\n * @param {number} min The minimum value in the range, inclusive.\n * @param {number} max The maximum value in the range, inclusive.\n * @return {boolean} True if a >= min and a <= max.\n */\nfunction inRange(a, min, max) {\n return min <= a && a <= max;\n}\n\n/**\n * @param {*} o\n * @return {Object}\n */\nfunction ToDictionary(o) {\n if (o === undefined) return {};\n if (o === Object(o)) return o;\n throw TypeError('Could not convert argument to dictionary');\n}\n\n/**\n * @param {string} string Input string of UTF-16 code units.\n * @return {!Array.} Code points.\n */\nfunction stringToCodePoints(string) {\n // https://heycam.github.io/webidl/#dfn-obtain-unicode\n\n // 1. Let S be the DOMString value.\n var s = String(string);\n\n // 2. Let n be the length of S.\n var n = s.length;\n\n // 3. Initialize i to 0.\n var i = 0;\n\n // 4. Initialize U to be an empty sequence of Unicode characters.\n var u = [];\n\n // 5. While i < n:\n while (i < n) {\n\n // 1. Let c be the code unit in S at index i.\n var c = s.charCodeAt(i);\n\n // 2. Depending on the value of c:\n\n // c < 0xD800 or c > 0xDFFF\n if (c < 0xD800 || c > 0xDFFF) {\n // Append to U the Unicode character with code point c.\n u.push(c);\n }\n\n // 0xDC00 ≤ c ≤ 0xDFFF\n else if (0xDC00 <= c && c <= 0xDFFF) {\n // Append to U a U+FFFD REPLACEMENT CHARACTER.\n u.push(0xFFFD);\n }\n\n // 0xD800 ≤ c ≤ 0xDBFF\n else if (0xD800 <= c && c <= 0xDBFF) {\n // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT\n // CHARACTER.\n if (i === n - 1) {\n u.push(0xFFFD);\n }\n // 2. Otherwise, i < n−1:\n else {\n // 1. Let d be the code unit in S at index i+1.\n var d = string.charCodeAt(i + 1);\n\n // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:\n if (0xDC00 <= d && d <= 0xDFFF) {\n // 1. Let a be c & 0x3FF.\n var a = c & 0x3FF;\n\n // 2. Let b be d & 0x3FF.\n var b = d & 0x3FF;\n\n // 3. Append to U the Unicode character with code point\n // 2^16+2^10*a+b.\n u.push(0x10000 + (a << 10) + b);\n\n // 4. Set i to i+1.\n i += 1;\n }\n\n // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a\n // U+FFFD REPLACEMENT CHARACTER.\n else {\n u.push(0xFFFD);\n }\n }\n }\n\n // 3. Set i to i+1.\n i += 1;\n }\n\n // 6. Return U.\n return u;\n}\n\n/**\n * @param {!Array.} code_points Array of code points.\n * @return {string} string String of UTF-16 code units.\n */\nfunction codePointsToString(code_points) {\n var s = '';\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 0xFFFF) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 0x10000;\n s += String.fromCharCode((cp >> 10) + 0xD800,\n (cp & 0x3FF) + 0xDC00);\n }\n }\n return s;\n}\n\n\n//\n// Implementation of Encoding specification\n// https://encoding.spec.whatwg.org/\n//\n\n//\n// 3. Terminology\n//\n\n/**\n * End-of-stream is a special token that signifies no more tokens\n * are in the stream.\n * @const\n */ var end_of_stream = -1;\n\n/**\n * A stream represents an ordered sequence of tokens.\n *\n * @constructor\n * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide the\n * stream.\n */\nfunction Stream(tokens) {\n /** @type {!Array.} */\n this.tokens = [].slice.call(tokens);\n}\n\nStream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n};\n\n//\n// 4. Encodings\n//\n\n// 4.1 Encoders and decoders\n\n/** @const */\nvar finished = -1;\n\n/**\n * @param {boolean} fatal If true, decoding errors raise an exception.\n * @param {number=} opt_code_point Override the standard fallback code point.\n * @return {number} The code point to insert on a decoding error.\n */\nfunction decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError('Decoder error');\n return opt_code_point || 0xFFFD;\n}\n\n//\n// 7. API\n//\n\n/** @const */ var DEFAULT_ENCODING = 'utf-8';\n\n// 7.1 Interface TextDecoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextDecoder(encoding, options) {\n if (!(this instanceof TextDecoder)) {\n return new TextDecoder(encoding, options);\n }\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {boolean} */\n this._BOMseen = false;\n /** @private @type {?Decoder} */\n this._decoder = null;\n /** @private @type {boolean} */\n this._fatal = Boolean(options['fatal']);\n /** @private @type {boolean} */\n this._ignoreBOM = Boolean(options['ignoreBOM']);\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n Object.defineProperty(this, 'fatal', {value: this._fatal});\n Object.defineProperty(this, 'ignoreBOM', {value: this._ignoreBOM});\n}\n\nTextDecoder.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === 'object' && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === 'object' && 'buffer' in input &&\n input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(input.buffer,\n input.byteOffset,\n input.byteLength);\n } else {\n bytes = new Uint8Array(0);\n }\n\n options = ToDictionary(options);\n\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({fatal: this._fatal});\n this._BOMseen = false;\n }\n this._streaming = Boolean(options['stream']);\n\n var input_stream = new Stream(bytes);\n\n var code_points = [];\n\n /** @type {?(number|!Array.)} */\n var result;\n\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n\n if (code_points.length) {\n // If encoding is one of utf-8, utf-16be, and utf-16le, and\n // ignore BOM flag and BOM seen flag are unset, run these\n // subsubsteps:\n if (['utf-8'].indexOf(this.encoding) !== -1 &&\n !this._ignoreBOM && !this._BOMseen) {\n // If token is U+FEFF, set BOM seen flag.\n if (code_points[0] === 0xFEFF) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n // Otherwise, if token is not end-of-stream, set BOM seen\n // flag and append token to output.\n this._BOMseen = true;\n }\n }\n }\n\n return codePointsToString(code_points);\n }\n};\n\n// 7.2 Interface TextEncoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextEncoder(encoding, options) {\n if (!(this instanceof TextEncoder))\n return new TextEncoder(encoding, options);\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {?Encoder} */\n this._encoder = null;\n /** @private @type {{fatal: boolean}} */\n this._options = {fatal: Boolean(options['fatal'])};\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n}\n\nTextEncoder.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : '';\n options = ToDictionary(options);\n\n // NOTE: This option is nonstandard. None of the encodings\n // permitted for encoding (i.e. UTF-8, UTF-16) are stateful,\n // so streaming is not necessary.\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options['stream']);\n\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n /** @type {?(number|!Array.)} */\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n};\n\n//\n// 8. The encoding\n//\n\n// 8.1 utf-8\n\n/**\n * @constructor\n * @implements {Decoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Decoder(options) {\n var fatal = options.fatal;\n\n // utf-8's decoder's has an associated utf-8 code point, utf-8\n // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8\n // lower boundary (initially 0x80), and a utf-8 upper boundary\n // (initially 0xBF).\n var /** @type {number} */ utf8_code_point = 0,\n /** @type {number} */ utf8_bytes_seen = 0,\n /** @type {number} */ utf8_bytes_needed = 0,\n /** @type {number} */ utf8_lower_boundary = 0x80,\n /** @type {number} */ utf8_upper_boundary = 0xBF;\n\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point.\n */\n this.handler = function(stream, bite) {\n // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,\n // set utf-8 bytes needed to 0 and return error.\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n\n // 2. If byte is end-of-stream, return finished.\n if (bite === end_of_stream)\n return finished;\n\n // 3. If utf-8 bytes needed is 0, based on byte:\n if (utf8_bytes_needed === 0) {\n\n // 0x00 to 0x7F\n if (inRange(bite, 0x00, 0x7F)) {\n // Return a code point whose value is byte.\n return bite;\n }\n\n // 0xC2 to 0xDF\n if (inRange(bite, 0xC2, 0xDF)) {\n // Set utf-8 bytes needed to 1 and utf-8 code point to byte\n // − 0xC0.\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 0xC0;\n }\n\n // 0xE0 to 0xEF\n else if (inRange(bite, 0xE0, 0xEF)) {\n // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.\n if (bite === 0xE0)\n utf8_lower_boundary = 0xA0;\n // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.\n if (bite === 0xED)\n utf8_upper_boundary = 0x9F;\n // 3. Set utf-8 bytes needed to 2 and utf-8 code point to\n // byte − 0xE0.\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 0xE0;\n }\n\n // 0xF0 to 0xF4\n else if (inRange(bite, 0xF0, 0xF4)) {\n // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.\n if (bite === 0xF0)\n utf8_lower_boundary = 0x90;\n // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.\n if (bite === 0xF4)\n utf8_upper_boundary = 0x8F;\n // 3. Set utf-8 bytes needed to 3 and utf-8 code point to\n // byte − 0xF0.\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 0xF0;\n }\n\n // Otherwise\n else {\n // Return error.\n return decoderError(fatal);\n }\n\n // Then (byte is in the range 0xC2 to 0xF4) set utf-8 code\n // point to utf-8 code point << (6 × utf-8 bytes needed) and\n // return continue.\n utf8_code_point = utf8_code_point << (6 * utf8_bytes_needed);\n return null;\n }\n\n // 4. If byte is not in the range utf-8 lower boundary to utf-8\n // upper boundary, run these substeps:\n if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n\n // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8\n // bytes seen to 0, set utf-8 lower boundary to 0x80, and set\n // utf-8 upper boundary to 0xBF.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 2. Prepend byte to stream.\n stream.prepend(bite);\n\n // 3. Return error.\n return decoderError(fatal);\n }\n\n // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary\n // to 0xBF.\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 6. Increase utf-8 bytes seen by one and set utf-8 code point\n // to utf-8 code point + (byte − 0x80) << (6 × (utf-8 bytes\n // needed − utf-8 bytes seen)).\n utf8_bytes_seen += 1;\n utf8_code_point += (bite - 0x80) << (6 * (utf8_bytes_needed - utf8_bytes_seen));\n\n // 7. If utf-8 bytes seen is not equal to utf-8 bytes needed,\n // continue.\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n\n // 8. Let code point be utf-8 code point.\n var code_point = utf8_code_point;\n\n // 9. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes\n // seen to 0.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n\n // 10. Return a code point whose value is code point.\n return code_point;\n };\n}\n\n/**\n * @constructor\n * @implements {Encoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Encoder(options) {\n var fatal = options.fatal;\n /**\n * @param {Stream} stream Input stream.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit.\n */\n this.handler = function(stream, code_point) {\n // 1. If code point is end-of-stream, return finished.\n if (code_point === end_of_stream)\n return finished;\n\n // 2. If code point is in the range U+0000 to U+007F, return a\n // byte whose value is code point.\n if (inRange(code_point, 0x0000, 0x007f))\n return code_point;\n\n // 3. Set count and offset based on the range code point is in:\n var count, offset;\n // U+0080 to U+07FF: 1 and 0xC0\n if (inRange(code_point, 0x0080, 0x07FF)) {\n count = 1;\n offset = 0xC0;\n }\n // U+0800 to U+FFFF: 2 and 0xE0\n else if (inRange(code_point, 0x0800, 0xFFFF)) {\n count = 2;\n offset = 0xE0;\n }\n // U+10000 to U+10FFFF: 3 and 0xF0\n else if (inRange(code_point, 0x10000, 0x10FFFF)) {\n count = 3;\n offset = 0xF0;\n }\n\n // 4.Let bytes be a byte sequence whose first byte is (code\n // point >> (6 × count)) + offset.\n var bytes = [(code_point >> (6 * count)) + offset];\n\n // 5. Run these substeps while count is greater than 0:\n while (count > 0) {\n\n // 1. Set temp to code point >> (6 × (count − 1)).\n var temp = code_point >> (6 * (count - 1));\n\n // 2. Append to bytes 0x80 | (temp & 0x3F).\n bytes.push(0x80 | (temp & 0x3F));\n\n // 3. Decrease count by one.\n count -= 1;\n }\n\n // 6. Return bytes bytes, in order.\n return bytes;\n };\n}\n\nexports.TextEncoder = TextEncoder;\nexports.TextDecoder = TextDecoder;","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserializeUnchecked = exports.deserialize = exports.serialize = exports.BinaryReader = exports.BinaryWriter = exports.BorshError = exports.baseDecode = exports.baseEncode = void 0;\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst bs58_1 = __importDefault(require(\"bs58\"));\n// TODO: Make sure this polyfill not included when not required\nconst encoding = __importStar(require(\"text-encoding-utf-8\"));\nconst ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\nconst textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\nfunction baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer.from(value));\n}\nexports.baseEncode = baseEncode;\nfunction baseDecode(value) {\n return Buffer.from(bs58_1.default.decode(value));\n}\nexports.baseDecode = baseDecode;\nconst INITIAL_LENGTH = 1024;\nclass BorshError extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n // NOTE: Modifying message directly as jest doesn't use .toString()\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n}\nexports.BorshError = BorshError;\n/// Binary encoder.\nclass BinaryWriter {\n constructor() {\n this.buf = Buffer.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer.concat([this.buf, Buffer.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n // Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser\n this.buf = Buffer.concat([\n Buffer.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer.alloc(INITIAL_LENGTH),\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array) {\n this.writeBuffer(Buffer.from(array));\n }\n writeArray(array, fn) {\n this.maybeResize();\n this.writeU32(array.length);\n for (const elem of array) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n}\nexports.BinaryWriter = BinaryWriter;\nfunction handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function (...args) {\n try {\n return originalMethod.apply(this, args);\n }\n catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n}\nclass BinaryReader {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n // NOTE: Using TextDecoder to fail on invalid UTF-8\n return textDecoder.decode(buf);\n }\n catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n}\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU8\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU16\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU32\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU64\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU128\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU256\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU512\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readString\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readFixedArray\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readArray\", null);\nexports.BinaryReader = BinaryReader;\nfunction capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\nfunction serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n // TODO: Handle missing values properly (make sure they never result in just skipped write)\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n }\n else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n }\n else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n }\n else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n }\n else if (fieldType.kind !== undefined) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === undefined) {\n writer.writeU8(0);\n }\n else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n }\n else {\n serializeStruct(schema, value, writer);\n }\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n }\n else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n }\n else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n}\n/// Serialize given object using schema of the form:\n/// { class_name -> [ [field_name, field_type], .. ], .. }\nfunction serialize(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n}\nexports.serialize = serialize;\nfunction deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n }\n else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n }\n else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return undefined;\n }\n if (fieldType.kind === \"map\") {\n let map = new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n}\n/// Deserializes object from bytes using schema.\nfunction deserialize(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n}\nexports.deserialize = deserialize;\n/// Deserializes object from bytes using schema, without checking the length read\nfunction deserializeUnchecked(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n}\nexports.deserializeUnchecked = deserializeUnchecked;\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.s16 = exports.s8 = exports.nu64be = exports.u48be = exports.u40be = exports.u32be = exports.u24be = exports.u16be = exports.nu64 = exports.u48 = exports.u40 = exports.u32 = exports.u24 = exports.u16 = exports.u8 = exports.offset = exports.greedy = exports.Constant = exports.UTF8 = exports.CString = exports.Blob = exports.Boolean = exports.BitField = exports.BitStructure = exports.VariantLayout = exports.Union = exports.UnionLayoutDiscriminator = exports.UnionDiscriminator = exports.Structure = exports.Sequence = exports.DoubleBE = exports.Double = exports.FloatBE = exports.Float = exports.NearInt64BE = exports.NearInt64 = exports.NearUInt64BE = exports.NearUInt64 = exports.IntBE = exports.Int = exports.UIntBE = exports.UInt = exports.OffsetLayout = exports.GreedyCount = exports.ExternalLayout = exports.bindConstructorLayout = exports.nameWithProperty = exports.Layout = exports.uint8ArrayToBuffer = exports.checkUint8Array = void 0;\nexports.constant = exports.utf8 = exports.cstr = exports.blob = exports.unionLayoutDiscriminator = exports.union = exports.seq = exports.bits = exports.struct = exports.f64be = exports.f64 = exports.f32be = exports.f32 = exports.ns64be = exports.s48be = exports.s40be = exports.s32be = exports.s24be = exports.s16be = exports.ns64 = exports.s48 = exports.s40 = exports.s32 = exports.s24 = void 0;\nconst buffer_1 = require(\"buffer\");\n/* Check if a value is a Uint8Array.\n *\n * @ignore */\nfunction checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError('b must be a Uint8Array');\n }\n}\nexports.checkUint8Array = checkUint8Array;\n/* Create a Buffer instance from a Uint8Array.\n *\n * @ignore */\nfunction uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n}\nexports.uint8ArrayToBuffer = uint8ArrayToBuffer;\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nexports.Layout = Layout;\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nexports.nameWithProperty = nameWithProperty;\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\n// `Class` must be a constructor Function, but the assignment of a `layout_` property to it makes it difficult to type\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Object.prototype.hasOwnProperty.call(Class, 'layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (Object.prototype.hasOwnProperty.call(layout, 'boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nexports.bindConstructorLayout = bindConstructorLayout;\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\nexports.ExternalLayout = ExternalLayout;\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\nexports.GreedyCount = GreedyCount;\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n super(layout.span, property || layout.property);\n /** The subordinated layout. */\n this.layout = layout;\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Uint8Array\n * being accessed. */\n this.offset = offset;\n }\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n /** @override */\n decode(b, offset = 0) {\n return this.layout.decode(b, offset + this.offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\nexports.OffsetLayout = OffsetLayout;\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UInt = UInt;\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UIntBE = UIntBE;\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.Int = Int;\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.IntBE = IntBE;\nconst V2E32 = Math.pow(2, 32);\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return { hi32, lo32 };\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64 = NearUInt64;\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64BE = NearUInt64BE;\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64 = NearInt64;\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64BE = NearInt64BE;\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset);\n return 4;\n }\n}\nexports.Float = Float;\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset);\n return 4;\n }\n}\nexports.FloatBE = FloatBE;\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset);\n return 8;\n }\n}\nexports.Double = Double;\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset);\n return 8;\n }\n}\nexports.DoubleBE = DoubleBE;\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n super(span, property);\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n }\n else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\nexports.Sequence = Sequence;\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n }\n catch (e) {\n // ignore error\n }\n super(span, property);\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n }\n catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset = 0) {\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n }\n else if (0 <= offset) {\n offset += fd.span;\n }\n }\n return undefined;\n }\n}\nexports.Structure = Structure;\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\nexports.UnionDiscriminator = UnionDiscriminator;\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n super(property || layout.property || 'variant');\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\nexports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if ((discr instanceof UInt)\n || (discr instanceof UIntBE)) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n }\n else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n }\n else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n else {\n discriminator = discr;\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && ((discr instanceof UInt)\n || (discr instanceof UIntBE))) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discriminator;\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = (discr instanceof UInt)\n || (discr instanceof UIntBE);\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function (src) {\n return boundGetSourceVariant(src);\n };\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function (gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property\n && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)))) {\n return vlo;\n }\n }\n else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n const clo = this.registry[discr];\n if (undefined === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n // defaultLayout.property can be undefined, but this is allowed by buffer-layout\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n dest[defaultLayout.property] = defaultLayout.decode(b, offset + contentOffset);\n }\n else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset = 0) {\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n // this.defaultLayout is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n // clo.property is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return contentOffset + clo.encode(src[clo.property], b, offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset);\n }\n else {\n variant = vb;\n }\n return this.registry[variant];\n }\n}\nexports.Union = Union;\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n }\n else if (this.property) {\n dest[this.property] = true;\n }\n else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!Object.prototype.hasOwnProperty.call(src, this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return undefined;\n }\n}\nexports.VariantLayout = VariantLayout;\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function (v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function () {\n return value;\n };\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset = 0) {\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n}\nexports.BitStructure = BitStructure;\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n /** The span of this value in bits. */\n this.bits = bits;\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ('number' !== typeof value\n || !Number.isInteger(value)\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n }\n}\nexports.BitField = BitField;\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!super.decode(b, offset);\n }\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n super.encode(value);\n }\n}\nexports.Boolean = Boolean;\n/* eslint-enable no-extend-native */\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Uint8Array.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Uint8Array as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Uint8Array');\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\nexports.Blob = Blob;\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n return uint8ArrayToBuffer(b).slice(offset, offset + span - 1).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset);\n buffer[offset + span] = 0;\n return span + 1;\n }\n}\nexports.CString = CString;\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan) && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n }\n else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n super(-1, property);\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n return b.length - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(uint8ArrayToBuffer(b), offset);\n return span;\n }\n}\nexports.UTF8 = UTF8;\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n /** @override */\n decode(b, offset) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\nexports.Constant = Constant;\n/** Factory for {@link GreedyCount}. */\nexports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n/** Factory for {@link OffsetLayout}. */\nexports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nexports.u8 = ((property) => new UInt(1, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16 = ((property) => new UInt(2, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24 = ((property) => new UInt(3, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32 = ((property) => new UInt(4, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40 = ((property) => new UInt(5, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48 = ((property) => new UInt(6, property));\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64 = ((property) => new NearUInt64(property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16be = ((property) => new UIntBE(2, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24be = ((property) => new UIntBE(3, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32be = ((property) => new UIntBE(4, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40be = ((property) => new UIntBE(5, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48be = ((property) => new UIntBE(6, property));\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64be = ((property) => new NearUInt64BE(property));\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nexports.s8 = ((property) => new Int(1, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nexports.s16 = ((property) => new Int(2, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nexports.s24 = ((property) => new Int(3, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nexports.s32 = ((property) => new Int(4, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nexports.s40 = ((property) => new Int(5, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nexports.s48 = ((property) => new Int(6, property));\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64 = ((property) => new NearInt64(property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nexports.s16be = ((property) => new IntBE(2, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nexports.s24be = ((property) => new IntBE(3, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nexports.s32be = ((property) => new IntBE(4, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nexports.s40be = ((property) => new IntBE(5, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nexports.s48be = ((property) => new IntBE(6, property));\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64be = ((property) => new NearInt64BE(property));\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nexports.f32 = ((property) => new Float(property));\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nexports.f32be = ((property) => new FloatBE(property));\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nexports.f64 = ((property) => new Double(property));\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nexports.f64be = ((property) => new DoubleBE(property));\n/** Factory for {@link Structure} values. */\nexports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n/** Factory for {@link BitStructure} values. */\nexports.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n/** Factory for {@link Sequence} values. */\nexports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n/** Factory for {@link Union} values. */\nexports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nexports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n/** Factory for {@link Blob} values. */\nexports.blob = ((length, property) => new Blob(length, property));\n/** Factory for {@link CString} values. */\nexports.cstr = ((property) => new CString(property));\n/** Factory for {@link UTF8} values. */\nexports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n/** Factory for {@link Constant} values. */\nexports.constant = ((value, property) => new Constant(value, property));\n//# sourceMappingURL=Layout.js.map","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = byteArray.shift()!;\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = byteArray.shift()!;\n const numReadonlyUnsignedAccounts = byteArray.shift()!;\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift()!;\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = byteArray.slice(0, accountCount);\n byteArray = byteArray.slice(accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = byteArray.slice(0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n byteArray = byteArray.slice(dataLength);\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = byteArray.shift() as number;\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: byteArray.shift() as number,\n numReadonlySignedAccounts: byteArray.shift() as number,\n numReadonlyUnsignedAccounts: byteArray.shift() as number,\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift() as number;\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength);\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(byteArray.splice(0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = byteArray.splice(0, writableIndexesLength);\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = byteArray.splice(0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);\n byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet converter;\n/**\n * Convert a little-endian buffer into a BigInt.\n * @param buf The little-endian buffer to convert\n * @returns A BigInt with the little-endian representation of buf.\n */\nfunction toBigIntLE(buf) {\n {\n const reversed = Buffer.from(buf);\n reversed.reverse();\n const hex = reversed.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, false);\n}\nexports.toBigIntLE = toBigIntLE;\n/**\n * Convert a big-endian buffer into a BigInt\n * @param buf The big-endian buffer to convert.\n * @returns A BigInt with the big-endian representation of buf.\n */\nfunction toBigIntBE(buf) {\n {\n const hex = buf.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, true);\n}\nexports.toBigIntBE = toBigIntBE;\n/**\n * Convert a BigInt to a little-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A little-endian buffer representation of num.\n */\nfunction toBufferLE(num, width) {\n {\n const hex = num.toString(16);\n const buffer = Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n buffer.reverse();\n return buffer;\n }\n // Allocation is done here, since it is slower using napi in C\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);\n}\nexports.toBufferLE = toBufferLE;\n/**\n * Convert a BigInt to a big-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A big-endian buffer representation of num.\n */\nfunction toBufferBE(num, width) {\n {\n const hex = num.toString(16);\n return Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n }\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), true);\n}\nexports.toBufferBE = toBufferBE;\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a plain object.\n */\n\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options = {}) {\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const schemas = Structs.map(s => s.schema);\n const schema = Object.assign({}, ...schemas);\n return object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\n\nfunction deprecated(struct, log) {\n return new Struct({ ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n } else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n }\n\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\n\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\n\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n\n *entries(value, ctx) {\n var _struct;\n\n (_struct = struct) != null ? _struct : struct = fn();\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n var _struct2;\n\n (_struct2 = struct) != null ? _struct2 : struct = fn();\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n var _struct3;\n\n (_struct3 = struct) != null ? _struct3 : struct = fn();\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\n\nfunction omit(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = { ...schema\n };\n\n for (const key of keys) {\n delete subschema[key];\n }\n\n return object(subschema);\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\n\nfunction partial(struct) {\n const schema = struct instanceof Struct ? { ...struct.schema\n } : { ...struct\n };\n\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\n\nfunction pick(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = {};\n\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n\n return object(subschema);\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\n\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\n\nfunction date() {\n return define('date', value => {\n return value instanceof Date && !isNaN(value.getTime()) || \"Expected a valid `Date` object, but received: \" + print(value);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map(v => print(v)).join();\n\n for (const key of values) {\n schema[key] = key;\n }\n\n return new Struct({\n type: 'enums',\n schema,\n\n validator(value) {\n return values.includes(value) || \"Expected one of `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a function.\n */\n\nfunction func() {\n return define('func', value => {\n return typeof value === 'function' || \"Expected a function, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\n\nfunction instance(Class) {\n return define('instance', value => {\n return value instanceof Class || \"Expected a `\" + Class.name + \"` instance, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\n\nfunction integer() {\n return define('integer', value => {\n return typeof value === 'number' && !isNaN(value) && Number.isInteger(value) || \"Expected an integer, but received: \" + print(value);\n });\n}\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n }\n\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n\n validator(value) {\n return value instanceof Map || \"Expected a `Map` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\n\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n },\n\n coercer(value) {\n return isObject(value) ? { ...value\n } : value;\n }\n\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\n\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\n\nfunction regexp() {\n return define('regexp', value => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n\n validator(value) {\n return value instanceof Set || \"Expected a `Set` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\nfunction tuple(Elements) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Elements.length, value.length);\n\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Elements[i] || Never];\n }\n }\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\nfunction union(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), x => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n\n if (x === undefined) {\n return f;\n }\n\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x\n };\n let changed = false;\n\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n\n if (changed) {\n return ret;\n }\n }\n\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction trimmed(struct) {\n return coerce(struct, string(), x => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\n\nfunction empty(struct) {\n const expected = \"Expected an empty \" + struct.type;\n return refine(struct, 'empty', value => {\n if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return size === 0 || expected + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return length === 0 || expected + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\n\nfunction max(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'max', value => {\n return exclusive ? value < threshold : value <= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\n\nfunction min(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'min', value => {\n return exclusive ? value > threshold : value >= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\n\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', value => {\n return regexp.test(value) || \"Expected a \" + struct.type + \" matching `/\" + regexp.source + \"/` but received \\\"\" + value + \"\\\"\";\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\n\nfunction size(struct, min, max = min) {\n const expected = \"Expected a \" + struct.type;\n const of = min === max ? \"of `\" + min + \"`\" : \"between `\" + min + \"` and `\" + max + \"`\";\n return refine(struct, 'size', value => {\n if (typeof value === 'number' || value instanceof Date) {\n return min <= value && value <= max || expected + \" \" + of + \" but received `\" + value + \"`\";\n } else if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return min <= size && size <= max || expected + \" with a size \" + of + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return min <= length && length <= max || expected + \" with a length \" + of + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\n\nfunction refine(struct, name, refiner) {\n return new Struct({ ...struct,\n\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n\n for (const failure of failures) {\n yield { ...failure,\n refinement: name\n };\n }\n }\n\n });\n}\n\nexport { Struct, StructError, any, array, assert, assign, boolean, coerce, create, date, defaulted, define, deprecated, dynamic, empty, enums, func, instance, integer, intersection, is, lazy, literal, map, mask, max, min, never, nullable, number, object, omit, optional, partial, pattern, pick, record, refine, regexp, set, size, string, struct, trimmed, tuple, type, union, unknown, validate };\n//# sourceMappingURL=index.es.js.map\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","'use strict';\n\nconst uuid = require('uuid').v4;\n\n/**\n * Generates a JSON-RPC 1.0 or 2.0 request\n * @param {String} method Name of method to call\n * @param {Array|Object} params Array of parameters passed to the method as specified, or an object of parameter names and corresponding value\n * @param {String|Number|null} [id] Request ID can be a string, number, null for explicit notification or left out for automatic generation\n * @param {Object} [options]\n * @param {Number} [options.version=2] JSON-RPC version to use (1 or 2)\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @param {Function} [options.generator] Passed the request, and the options object and is expected to return a request ID\n * @throws {TypeError} If any of the parameters are invalid\n * @return {Object} A JSON-RPC 1.0 or 2.0 request\n * @memberOf Utils\n */\nconst generateRequest = function(method, params, id, options) {\n if(typeof method !== 'string') {\n throw new TypeError(method + ' must be a string');\n }\n\n options = options || {};\n\n // check valid version provided\n const version = typeof options.version === 'number' ? options.version : 2;\n if (version !== 1 && version !== 2) {\n throw new TypeError(version + ' must be 1 or 2');\n }\n\n const request = {\n method: method\n };\n\n if(version === 2) {\n request.jsonrpc = '2.0';\n }\n\n if(params) {\n // params given, but invalid?\n if(typeof params !== 'object' && !Array.isArray(params)) {\n throw new TypeError(params + ' must be an object, array or omitted');\n }\n request.params = params;\n }\n\n // if id was left out, generate one (null means explicit notification)\n if(typeof(id) === 'undefined') {\n const generator = typeof options.generator === 'function' ? options.generator : function() { return uuid(); };\n request.id = generator(request, options);\n } else if (version === 2 && id === null) {\n // we have a version 2 notification\n if (options.notificationIdNull) {\n request.id = null; // id will not be set at all unless option provided\n }\n } else {\n request.id = id;\n }\n\n return request;\n};\n\nmodule.exports = generateRequest;\n","'use strict';\n\nconst uuid = require('uuid').v4;\nconst generateRequest = require('../../generateRequest');\n\n/**\n * Constructor for a Jayson Browser Client that does not depend any node.js core libraries\n * @class ClientBrowser\n * @param {Function} callServer Method that calls the server, receives the stringified request and a regular node-style callback\n * @param {Object} [options]\n * @param {Function} [options.reviver] Reviver function for JSON\n * @param {Function} [options.replacer] Replacer function for JSON\n * @param {Number} [options.version=2] JSON-RPC version to use (1|2)\n * @param {Function} [options.generator] Function to use for generating request IDs\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @return {ClientBrowser}\n */\nconst ClientBrowser = function(callServer, options) {\n if(!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n\n if (!options) {\n options = {};\n }\n\n this.options = {\n reviver: typeof options.reviver !== 'undefined' ? options.reviver : null,\n replacer: typeof options.replacer !== 'undefined' ? options.replacer : null,\n generator: typeof options.generator !== 'undefined' ? options.generator : function() { return uuid(); },\n version: typeof options.version !== 'undefined' ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === 'boolean' ? options.notificationIdNull : false,\n };\n\n this.callServer = callServer;\n};\n\nmodule.exports = ClientBrowser;\n\n/**\n * Creates a request and dispatches it if given a callback.\n * @param {String|Array} method A batch request if passed an Array, or a method name if passed a String\n * @param {Array|Object} [params] Parameters for the method\n * @param {String|Number} [id] Optional id. If undefined an id will be generated. If null it creates a notification request\n * @param {Function} [callback] Request callback. If specified, executes the request rather than only returning it.\n * @throws {TypeError} Invalid parameters\n * @return {Object} JSON-RPC 1.0 or 2.0 compatible request\n */\nClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n\n // is this a batch request?\n const isBatch = Array.isArray(method) && typeof params === 'function';\n\n if (this.options.version === 1 && isBatch) {\n throw new TypeError('JSON-RPC 1.0 does not support batching');\n }\n\n // is this a raw request?\n const isRaw = !isBatch && method && typeof method === 'object' && typeof params === 'function';\n\n if(isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if(typeof id === 'function') {\n callback = id;\n // specifically undefined because \"null\" is a notification request\n id = undefined;\n }\n\n const hasCallback = typeof callback === 'function';\n\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull,\n });\n } catch(err) {\n if(hasCallback) {\n return callback(err);\n }\n throw err;\n }\n\n // no callback means we should just return a raw request\n if(!hasCallback) {\n return request;\n }\n\n }\n\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch(err) {\n return callback(err);\n }\n\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n\n // always return the raw request\n return request;\n};\n\n/**\n * Parses a response from a server\n * @param {Object} err Error to pass on that is unrelated to the actual response\n * @param {String} responseText JSON-RPC 1.0 or 2.0 response\n * @param {Function} callback Callback that will receive different arguments depending on the amount of parameters\n * @private\n */\nClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if(err) {\n callback(err);\n return;\n }\n\n if(!responseText) {\n // empty response text, assume that is correct because it could be a\n // notification which jayson does not give any body for\n return callback();\n }\n\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch(err) {\n return callback(err);\n }\n\n if(callback.length === 3) {\n // if callback length is 3, we split callback arguments on error and response\n\n // is batch response?\n if(Array.isArray(response)) {\n\n // neccesary to split strictly on validity according to spec here\n const isError = function(res) {\n return typeof res.error !== 'undefined';\n };\n\n const isNotError = function (res) {\n return !isError(res);\n };\n\n return callback(null, response.filter(isError), response.filter(isNotError));\n \n } else {\n\n // split regardless of validity\n return callback(null, response.error, response.result);\n \n }\n \n }\n\n callback(null, response);\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","export const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport default globalThis.fetch;\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) keys.push(key);\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * \"Client\" wraps \"ws\" or a browser-implemented \"WebSocket\" library\n * according to the environment providing JSON RPC 2.0 support on top.\n * @module Client\n */\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime/regenerator\"));\n\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime/helpers/asyncToGenerator\"));\n\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _eventemitter = require(\"eventemitter3\");\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}; // @ts-ignore\n\n\nvar CommonClient = /*#__PURE__*/function (_EventEmitter) {\n (0, _inherits2[\"default\"])(CommonClient, _EventEmitter);\n\n var _super = _createSuper(CommonClient);\n\n /**\n * Instantiate a Client class.\n * @constructor\n * @param {webSocketFactory} webSocketFactory - factory method for WebSocket\n * @param {String} address - url to a websocket server\n * @param {Object} options - ws options object with reconnect parameters\n * @param {Function} generate_request_id - custom generation request Id\n * @return {CommonClient}\n */\n function CommonClient(webSocketFactory) {\n var _this;\n\n var address = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"ws://localhost:8080\";\n\n var _a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var generate_request_id = arguments.length > 3 ? arguments[3] : undefined;\n (0, _classCallCheck2[\"default\"])(this, CommonClient);\n\n var _a$autoconnect = _a.autoconnect,\n autoconnect = _a$autoconnect === void 0 ? true : _a$autoconnect,\n _a$reconnect = _a.reconnect,\n reconnect = _a$reconnect === void 0 ? true : _a$reconnect,\n _a$reconnect_interval = _a.reconnect_interval,\n reconnect_interval = _a$reconnect_interval === void 0 ? 1000 : _a$reconnect_interval,\n _a$max_reconnects = _a.max_reconnects,\n max_reconnects = _a$max_reconnects === void 0 ? 5 : _a$max_reconnects,\n rest_options = __rest(_a, [\"autoconnect\", \"reconnect\", \"reconnect_interval\", \"max_reconnects\"]);\n\n _this = _super.call(this);\n _this.webSocketFactory = webSocketFactory;\n _this.queue = {};\n _this.rpc_id = 0;\n _this.address = address;\n _this.autoconnect = autoconnect;\n _this.ready = false;\n _this.reconnect = reconnect;\n _this.reconnect_timer_id = undefined;\n _this.reconnect_interval = reconnect_interval;\n _this.max_reconnects = max_reconnects;\n _this.rest_options = rest_options;\n _this.current_reconnects = 0;\n\n _this.generate_request_id = generate_request_id || function () {\n return ++_this.rpc_id;\n };\n\n if (_this.autoconnect) _this._connect(_this.address, Object.assign({\n autoconnect: _this.autoconnect,\n reconnect: _this.reconnect,\n reconnect_interval: _this.reconnect_interval,\n max_reconnects: _this.max_reconnects\n }, _this.rest_options));\n return _this;\n }\n /**\n * Connects to a defined server if not connected already.\n * @method\n * @return {Undefined}\n */\n\n\n (0, _createClass2[\"default\"])(CommonClient, [{\n key: \"connect\",\n value: function connect() {\n if (this.socket) return;\n\n this._connect(this.address, Object.assign({\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects\n }, this.rest_options));\n }\n /**\n * Calls a registered RPC method on server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object|Array} params - optional method parameters\n * @param {Number} timeout - RPC reply timeout value\n * @param {Object} ws_opts - options passed to ws\n * @return {Promise}\n */\n\n }, {\n key: \"call\",\n value: function call(method, params, timeout, ws_opts) {\n var _this2 = this;\n\n if (!ws_opts && \"object\" === (0, _typeof2[\"default\"])(timeout)) {\n ws_opts = timeout;\n timeout = null;\n }\n\n return new Promise(function (resolve, reject) {\n if (!_this2.ready) return reject(new Error(\"socket not ready\"));\n\n var rpc_id = _this2.generate_request_id(method, params);\n\n var message = {\n jsonrpc: \"2.0\",\n method: method,\n params: params || null,\n id: rpc_id\n };\n\n _this2.socket.send(JSON.stringify(message), ws_opts, function (error) {\n if (error) return reject(error);\n _this2.queue[rpc_id] = {\n promise: [resolve, reject]\n };\n\n if (timeout) {\n _this2.queue[rpc_id].timeout = setTimeout(function () {\n delete _this2.queue[rpc_id];\n reject(new Error(\"reply timeout\"));\n }, timeout);\n }\n });\n });\n }\n /**\n * Logins with the other side of the connection.\n * @method\n * @param {Object} params - Login credentials object\n * @return {Promise}\n */\n\n }, {\n key: \"login\",\n value: function () {\n var _login = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee(params) {\n var resp;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return this.call(\"rpc.login\", params);\n\n case 2:\n resp = _context.sent;\n\n if (resp) {\n _context.next = 5;\n break;\n }\n\n throw new Error(\"authentication failed\");\n\n case 5:\n return _context.abrupt(\"return\", resp);\n\n case 6:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function login(_x) {\n return _login.apply(this, arguments);\n }\n\n return login;\n }()\n /**\n * Fetches a list of client's methods registered on server.\n * @method\n * @return {Array}\n */\n\n }, {\n key: \"listMethods\",\n value: function () {\n var _listMethods = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2() {\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return this.call(\"__listMethods\");\n\n case 2:\n return _context2.abrupt(\"return\", _context2.sent);\n\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function listMethods() {\n return _listMethods.apply(this, arguments);\n }\n\n return listMethods;\n }()\n /**\n * Sends a JSON-RPC 2.0 notification to server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object} params - optional method parameters\n * @return {Promise}\n */\n\n }, {\n key: \"notify\",\n value: function notify(method, params) {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n if (!_this3.ready) return reject(new Error(\"socket not ready\"));\n var message = {\n jsonrpc: \"2.0\",\n method: method,\n params: params || null\n };\n\n _this3.socket.send(JSON.stringify(message), function (error) {\n if (error) return reject(error);\n resolve();\n });\n });\n }\n /**\n * Subscribes for a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"subscribe\",\n value: function () {\n var _subscribe = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee3(event) {\n var result;\n return _regenerator[\"default\"].wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n if (typeof event === \"string\") event = [event];\n _context3.next = 3;\n return this.call(\"rpc.on\", event);\n\n case 3:\n result = _context3.sent;\n\n if (!(typeof event === \"string\" && result[event] !== \"ok\")) {\n _context3.next = 6;\n break;\n }\n\n throw new Error(\"Failed subscribing to an event '\" + event + \"' with: \" + result[event]);\n\n case 6:\n return _context3.abrupt(\"return\", result);\n\n case 7:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function subscribe(_x2) {\n return _subscribe.apply(this, arguments);\n }\n\n return subscribe;\n }()\n /**\n * Unsubscribes from a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"unsubscribe\",\n value: function () {\n var _unsubscribe = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee4(event) {\n var result;\n return _regenerator[\"default\"].wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n if (typeof event === \"string\") event = [event];\n _context4.next = 3;\n return this.call(\"rpc.off\", event);\n\n case 3:\n result = _context4.sent;\n\n if (!(typeof event === \"string\" && result[event] !== \"ok\")) {\n _context4.next = 6;\n break;\n }\n\n throw new Error(\"Failed unsubscribing from an event with: \" + result);\n\n case 6:\n return _context4.abrupt(\"return\", result);\n\n case 7:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function unsubscribe(_x3) {\n return _unsubscribe.apply(this, arguments);\n }\n\n return unsubscribe;\n }()\n /**\n * Closes a WebSocket connection gracefully.\n * @method\n * @param {Number} code - socket close code\n * @param {String} data - optional data to be sent before closing\n * @return {Undefined}\n */\n\n }, {\n key: \"close\",\n value: function close(code, data) {\n this.socket.close(code || 1000, data);\n }\n /**\n * Connection/Message handler.\n * @method\n * @private\n * @param {String} address - WebSocket API address\n * @param {Object} options - ws options object\n * @return {Undefined}\n */\n\n }, {\n key: \"_connect\",\n value: function _connect(address, options) {\n var _this4 = this;\n\n clearTimeout(this.reconnect_timer_id);\n this.socket = this.webSocketFactory(address, options);\n this.socket.addEventListener(\"open\", function () {\n _this4.ready = true;\n\n _this4.emit(\"open\");\n\n _this4.current_reconnects = 0;\n });\n this.socket.addEventListener(\"message\", function (_ref) {\n var message = _ref.data;\n if (message instanceof ArrayBuffer) message = Buffer.from(message).toString();\n\n try {\n message = JSON.parse(message);\n } catch (error) {\n return;\n } // check if any listeners are attached and forward event\n\n\n if (message.notification && _this4.listeners(message.notification).length) {\n if (!Object.keys(message.params).length) return _this4.emit(message.notification);\n var args = [message.notification];\n if (message.params.constructor === Object) args.push(message.params);else // using for-loop instead of unshift/spread because performance is better\n for (var i = 0; i < message.params.length; i++) {\n args.push(message.params[i]);\n } // run as microtask so that pending queue messages are resolved first\n // eslint-disable-next-line prefer-spread\n\n return Promise.resolve().then(function () {\n _this4.emit.apply(_this4, args);\n });\n }\n\n if (!_this4.queue[message.id]) {\n // general JSON RPC 2.0 events\n if (message.method && message.params) {\n // run as microtask so that pending queue messages are resolved first\n return Promise.resolve().then(function () {\n _this4.emit(message.method, message.params);\n });\n }\n\n return;\n } // reject early since server's response is invalid\n\n\n if (\"error\" in message === \"result\" in message) _this4.queue[message.id].promise[1](new Error(\"Server response malformed. Response must include either \\\"result\\\"\" + \" or \\\"error\\\", but not both.\"));\n if (_this4.queue[message.id].timeout) clearTimeout(_this4.queue[message.id].timeout);\n if (message.error) _this4.queue[message.id].promise[1](message.error);else _this4.queue[message.id].promise[0](message.result);\n delete _this4.queue[message.id];\n });\n this.socket.addEventListener(\"error\", function (error) {\n return _this4.emit(\"error\", error);\n });\n this.socket.addEventListener(\"close\", function (_ref2) {\n var code = _ref2.code,\n reason = _ref2.reason;\n if (_this4.ready) // Delay close event until internal state is updated\n setTimeout(function () {\n return _this4.emit(\"close\", code, reason);\n }, 0);\n _this4.ready = false;\n _this4.socket = undefined;\n if (code === 1000) return;\n _this4.current_reconnects++;\n if (_this4.reconnect && (_this4.max_reconnects > _this4.current_reconnects || _this4.max_reconnects === 0)) _this4.reconnect_timer_id = setTimeout(function () {\n return _this4._connect(address, options);\n }, _this4.reconnect_interval);\n });\n }\n }]);\n return CommonClient;\n}(_eventemitter.EventEmitter);\n\nexports[\"default\"] = CommonClient;","/**\n * WebSocket implements a browser-side WebSocket specification.\n * @module Client\n */\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = _default;\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _eventemitter = require(\"eventemitter3\");\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar WebSocketBrowserImpl = /*#__PURE__*/function (_EventEmitter) {\n (0, _inherits2[\"default\"])(WebSocketBrowserImpl, _EventEmitter);\n\n var _super = _createSuper(WebSocketBrowserImpl);\n\n /** Instantiate a WebSocket class\n * @constructor\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @param {(String|Array)} protocols - a list of protocols\n * @return {WebSocketBrowserImpl} - returns a WebSocket instance\n */\n function WebSocketBrowserImpl(address, options, protocols) {\n var _this;\n\n (0, _classCallCheck2[\"default\"])(this, WebSocketBrowserImpl);\n _this = _super.call(this);\n _this.socket = new window.WebSocket(address, protocols);\n\n _this.socket.onopen = function () {\n return _this.emit(\"open\");\n };\n\n _this.socket.onmessage = function (event) {\n return _this.emit(\"message\", event.data);\n };\n\n _this.socket.onerror = function (error) {\n return _this.emit(\"error\", error);\n };\n\n _this.socket.onclose = function (event) {\n _this.emit(\"close\", event.code, event.reason);\n };\n\n return _this;\n }\n /**\n * Sends data through a websocket connection\n * @method\n * @param {(String|Object)} data - data to be sent via websocket\n * @param {Object} optionsOrCallback - ws options\n * @param {Function} callback - a callback called once the data is sent\n * @return {Undefined}\n */\n\n\n (0, _createClass2[\"default\"])(WebSocketBrowserImpl, [{\n key: \"send\",\n value: function send(data, optionsOrCallback, callback) {\n var cb = callback || optionsOrCallback;\n\n try {\n this.socket.send(data);\n cb();\n } catch (error) {\n cb(error);\n }\n }\n /**\n * Closes an underlying socket\n * @method\n * @param {Number} code - status code explaining why the connection is being closed\n * @param {String} reason - a description why the connection is closing\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"close\",\n value: function close(code, reason) {\n this.socket.close(code, reason);\n }\n }, {\n key: \"addEventListener\",\n value: function addEventListener(type, listener, options) {\n this.socket.addEventListener(type, listener, options);\n }\n }]);\n return WebSocketBrowserImpl;\n}(_eventemitter.EventEmitter);\n/**\n * factory method for common WebSocket instance\n * @method\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @return {Undefined}\n */\n\n\nfunction _default(address, options) {\n return new WebSocketBrowserImpl(address, options);\n}","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","const U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nexport function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nexport function split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nexport const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (h, l) => l;\nconst rotr32L = (h, l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\n// Removing \"export\" has 5% perf penalty -_-\nexport function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import assert from './_assert.js';\nimport u64 from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, } from './utils.js';\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _7n = BigInt(7);\nconst _256n = BigInt(256);\nconst _0x71n = BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = u64.split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => s > 32 ? u64.rotlBH(h, l, s) : u64.rotlSH(h, l, s);\nconst rotlL = (h, l, s) => s > 32 ? u64.rotlBL(h, l, s) : u64.rotlSL(h, l, s);\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n assert.number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n assert.exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n assert.exists(this, false);\n assert.bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n assert.number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n assert.output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = gen(0x06, 136, 256 / 8);\nexport const sha3_384 = gen(0x06, 104, 384 / 8);\nexport const sha3_512 = gen(0x06, 72, 512 / 8);\nexport const keccak_224 = gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = gen(0x01, 136, 256 / 8);\nexport const keccak_384 = gen(0x01, 104, 384 / 8);\nexport const keccak_512 = gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = genShake(0x1f, 168, 128 / 8);\nexport const shake256 = genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = wrapConstructor(() => new SHA256());\nexport const sha224 = wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error('ui8a expected');\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((c, point, isCompressed) => {\n const a = point.toAffine();\n return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n // Zero is valid point too!\n if (this.is0()) {\n if (CURVE.allowInfinityPoint)\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, _3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, _3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === _0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === _1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return mod.mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return mod.invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n const isYOdd = (y & _1n) === _1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size (nBitLength+64)\n * as per FIPS 186 B.4.1 with modulo bias being neglible.\n */\n randomPrivateKey: () => {\n const rand = CURVE.randomBytes(Fp.BYTES + 8);\n const num = mod.hashToPrivateScalar(rand, CURVE_ORDER);\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(ensureBytes('extraEntropy', e, Fp.BYTES)); // check for being of size BYTES\n }\n const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === _0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === _0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash (not message: you need to hash it by yourself).\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param opts `lowS, extraEntropy, prehash`\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const drbg = ut.createHmacDrbg(CURVE.hash.outputLen, CURVE.nByteLength, CURVE.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes('msgHash', msgHash);\n publicKey = ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || sg instanceof Uint8Array) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n// Implementation of the Shallue and van de Woestijne method for any Weierstrass curve\n// TODO: check if there is a way to merge this with uvRatio in Edwards && move to modular?\n// b = True and y = sqrt(u / v) if (u / v) is square in F, and\n// b = False and y = sqrt(Z * (u / v)) otherwise.\nexport function SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = _0n;\n for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n l += _1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n const c2 = (q - _1n) / _2n ** c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n ** c1 - _1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n ** (c1 - _1n); // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > _1n; i--) {\n let tv5 = _2n ** (i - _2n); // 18. tv5 = i - 2; 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n === _3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n// From draft-irtf-cfrg-hash-to-curve-16\nexport function mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map","import assert from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nclass HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assert.hash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new TypeError('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assert.exists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.bytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n return {\n hash,\n hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n randomBytes,\n };\n}\nexport function createCurve(curveDef, defHash) {\n const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport * as htf from './abstract/hash-to-curve.js';\nimport { createCurve } from './_shortw_utils.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N,\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = {\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n};\nconst isoMap = htf.isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j))));\nconst mapSWU = mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n});\nexport const { hashToCurve, encodeToCurve } = htf.createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n});\n//# sourceMappingURL=secp256k1.js.map","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH));\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n const isSigner = byteArray.slice(0, 1)[0] === 1;\n byteArray = byteArray.slice(1);\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["base64Js","byteLength","toByteArray","fromByteArray","lookup","revLookup","Arr","Uint8Array","Array","code","i","len","length","charCodeAt","getLens","b64","Error","validLen","indexOf","placeHoldersLen","lens","_byteLength","tmp","arr","curByte","tripletToBase64","num","encodeChunk","uint8","start","end","output","push","join","extraBytes","parts","maxChunkLength","len2","ieee754","read","buffer","offset","isLE","mLen","nBytes","e","m","eLen","eMax","eBias","nBits","d","s","NaN","Infinity","Math","pow","write","value","c","rt","abs","isNaN","floor","log","LN2","base64","require$$0","require$$1","customInspectSymbol","Symbol","exports","Buffer","SlowBuffer","INSPECT_MAX_BYTES","K_MAX_LENGTH","kMaxLength","TYPED_ARRAY_SUPPORT","typedArraySupport","console","error","proto","foo","Object","setPrototypeOf","prototype","defineProperty","enumerable","get","isBuffer","this","undefined","byteOffset","createBuffer","RangeError","buf","arg","encodingOrOffset","TypeError","allocUnsafe","from","poolSize","fromString","ArrayBuffer","isView","fromArrayView","isInstance","fromArrayBuffer","SharedArrayBuffer","valueOf","b","fromObject","toPrimitive","assertSize","size","alloc","fill","encoding","checked","allocUnsafeSlow","string","isEncoding","actual","slice","fromArrayLike","array","arrayView","copy","obj","numberIsNaN","type","isArray","data","toString","_isBuffer","compare","a","x","y","min","String","toLowerCase","concat","list","pos","set","call","mustMatch","arguments","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","n","swap16","swap32","swap64","apply","toLocaleString","equals","inspect","str","max","replace","trim","target","thisStart","thisEnd","thisCopy","targetCopy","bidirectionalIndexOf","val","dir","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","found","j","includes","hexWrite","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","asciiToBytes","base64Write","ucs2Write","utf16leToBytes","isFinite","toJSON","_arr","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","MAX_ARGUMENTS_LENGTH","codePoints","fromCharCode","ret","out","hexSliceLookupTable","bytes","newBuf","subarray","checkOffset","ext","readUintLE","readUIntLE","noAssert","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","defineBigIntMethod","validateNumber","first","last","boundsError","lo","hi","BigInt","readBigUInt64BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","checkInt","writeUintLE","writeUIntLE","maxBytes","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeUInt32BE","wrtBigUInt64LE","checkIntBI","wrtBigUInt64BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeBigInt64LE","writeBigInt64BE","checkIEEE754","writeFloat","littleEndian","writeFloatLE","writeFloatBE","writeDouble","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","errors","E","sym","getMessage","Base","NodeError","constructor","super","writable","configurable","name","stack","message","range","input","msg","received","isInteger","addNumericalSeparator","checkBounds","ERR_OUT_OF_RANGE","ERR_INVALID_ARG_TYPE","ERR_BUFFER_OUT_OF_BOUNDS","INVALID_BASE64_RE","base64clean","split","units","leadSurrogate","byteArray","src","dst","alphabet","table","i16","fn","BufferBigIntNotDefined","number","isSafeInteger","bool","lengths","hash","create","outputLen","blockLen","exists","instance","checkFinished","destroyed","finished","assert","assert$5","crypto","globalThis","createView","DataView","rotr","word","shift","Uint32Array","v","padStart","TextEncoder","encode","toBytes","concatBytes","arrays","every","reduce","result","pad","Hash$1","Hash","clone","_cloneInto","wrapConstructor","hashConstructor","hashC","update","digest","randomBytes","bytesLength","getRandomValues","setBigUint64","view","_32n","_u32_max","wh","wl","h","l","setUint32","SHA2","padOffset","take","dataView","process","roundClean","digestInto","oview","outLen","state","destroy","to","U32_MASK64","fromBig","le","lst","Ah","Al","toBig","shrSH","shrSL","rotrSH","rotrSL","rotrBH","rotrBL","rotr32H","rotr32L","rotlSH","rotlSL","rotlBH","rotlBL","add","Bh","Bl","add3L","Cl","add3H","low","Ch","add4L","Dl","add4H","Dh","add5L","El","add5H","Eh","u64","u64$4","SHA512_Kh","SHA512_Kl","map","SHA512_W_H","SHA512_W_L","SHA512","Fh","Fl","Gh","Gl","Hh","Hl","getUint32","W15h","W15l","s0h","s0l","W2h","W2l","s1h","s1l","SUMl","SUMh","sigma1h","sigma1l","CHIh","CHIl","T1ll","T1h","T1l","sigma0h","sigma0l","MAJh","MAJl","All","SHA512_224","SHA512_256","SHA384","sha512","_0n","_1n","_2n","u8a","hexes","bytesToHex","hex","numberToHexUnpadded","hexToNumber","hexToBytes","hexByte","byte","bytesToNumberBE","bytesToNumberLE","reverse","numberToBytesBE","numberToBytesLE","numberToVarBytesBE","ensureBytes","title","expectedLength","arrs","r","sum","forEach","equalBytes","b1","b2","bitLen","bitGet","bitSet","bitMask","u8n","u8fr","createHmacDrbg","hashLen","qByteLen","hmacFn","k","reset","reseed","seed","gen","sl","genUntil","pred","validatorFns","bigint","function","boolean","field","object","Fp","isValid","validateObject","validators","optValidators","checkField","fieldName","isOptional","checkVal","entries","_3n","_4n","_5n","_8n","mod","power","modulo","pow2","invert","u","q","gcd","tonelliShanks","P","legendreC","Q","S","Z","p1div4","tonelliFast","root","eql","sqr","Q1div2","tonelliSlow","neg","ONE","g","ZERO","t2","ge","FpSqrt","sqrt3mod4","c1","sqrt5mod8","n2","nv","isNegativeLE","FIELD_FIELDS","validateField","initial","ORDER","MASK","BYTES","BITS","opts","FpPow","f","p","FpInvertBatch","nums","lastMultiplied","acc","is0","inverted","inv","reduceRight","nLength","nBitLength","_nBitLength","nByteLength","ceil","Field","redef","sqrtP","freeze","isOdd","lhs","rhs","div","sqrN","addN","subN","mulN","sqrt","invertBatch","cmov","fromBytes","FpSqrtEven","elm","hashToPrivateScalar","groupOrder","minLen","wNAF","bits","constTimeNegate","condition","item","negate","W","windows","windowSize","unsafeLadder","double","precomputeWindow","points","base","window","precomputes","BASE","mask","maxNumber","shiftBy","wbits","offset1","offset2","cond1","cond2","wNAFCached","precomputesMap","transform","_WINDOW_SIZE","comp","validateBasic","curve","Gx","Gy","VERIFY_DEFAULT","zip215","validateOpts","ut.validateObject","adjustScalarBytes","domain","uvRatio","mapToCurve","twistedEdwards","curveDef","CURVE","CURVE_ORDER","prehash","cHash","cofactor","modP","ctx","phflag","inBig","inRange","in0MaskRange","assertInRange","assertGE0","pointPrecomputes","Map","isPoint","other","Point","ex","ey","ez","et","toAffine","static","toInv","fromAffine","_setWindowSize","delete","assertValidity","X","Y","T","X2","Y2","Z2","Z4","aX2","left","right","XY","ZT","X1","Y1","Z1","X1Z2","X2Z1","Y1Z2","Y2Z1","A","B","C","D","x1y1","G","F","H","X3","Y3","T3","Z3","T1","T2","subtract","wnaf","normalizeZ","multiply","scalar","multiplyUnsafe","I","isSmallOrder","isTorsionFree","iz","z","ax","ay","zz","clearCofactor","normed","lastByte","ut.bytesToNumberLE","y2","isXOdd","isLastByteOdd","privKey","getExtendedPublicKey","point","toRawBytes","ut.numberToBytesLE","toHex","ut.bytesToHex","modN","modN_LE","key","hashed","head","prefix","pointBytes","getPublicKey","hashDomainToScalar","context","msgs","ut.concatBytes","sign","options","R","verifyOpts","verify","sig","publicKey","SB","fromHex","RkA","utils","randomPrivateKey","precompute","ExtendedPoint","montgomeryBits","powPminus2","Gu","montgomery","montgomeryBytes","fieldLen","cswap","x_2","x_3","dummy","assertFieldElement","a24","montgomeryLadder","pointU","x_1","z_2","z_3","sw","t","k_t","AA","BB","DA","CB","dacb","da_cb","z2","encodeUCoordinate","decodeUCoordinate","uEnc","decodeScalar","scalarMult","_scalar","pu","GuBytes","scalarMultBase","getSharedSecret","privateKey","validateDST","os2ip","i2osp","strxor","isBytes","isNum","expand_message_xmd","DST","lenInBytes","b_in_bytes","r_in_bytes","ell","DST_prime","Z_pad","l_i_b_str","b_0","args","pseudo_random_bytes","expand_message_xof","dkLen","hash_to_field","count","expand","_DST","log2p","L","len_in_bytes","prb","elm_offset","tv","isogenyMap","COEFF","xNum","xDen","yNum","yDen","createHasher","def","hashToCurve","u0","u1","encodeToCurve","encodeDST","ED25519_P","ED25519_SQRT_M1","_10n","_20n","_40n","_80n","ed25519_pow_2_252_3","x2","b4","b5","b10","b20","b40","b80","b160","b240","b250","pow_p_5_8","v3","v7","vx2","root1","root2","useRoot1","useRoot2","noRoot","ed25519Defaults","ed25519","ed25519_domain","ELL2_C1","ELL2_C2","ELL2_C3","ELL2_C4","ELL2_J","map_to_curve_elligator2_curve25519","tv1","xd","x1n","tv2","gxd","gx1","tv3","y11","y12","e1","y1","x2n","y21","y22","gx2","e2","e3","xn","e4","xMn","xMd","yMn","yMd","ELL2_C1_EDWARDS","map_to_curve_elligator2_edwards25519","yn","yd","htf.createHasher","scalars","assertRstPoint","RistrettoPoint","SQRT_M1","SQRT_AD_MINUS_ONE","INVSQRT_A_MINUS_D","ONE_MINUS_D_SQ","D_MINUS_ONE_SQ","invertSqrt","MAX_255B","bytes255ToNumberLE","calcElligatorRistrettoMap","r0","Ns","Ns_D_is_sq","s_","Nt","s2","W0","W1","W2","W3","ep","ap","r1","R1","r2","R2","emsg","u2","u1_2","u2_2","Dx","Dy","u2sq","invsqrt","D1","D2","zInv","_x","_y","one","two","generatePrivateKey","generateKeypair","privateScalar","secretKey","isOnCurve","_unused","toBuffer","module","inherits","ctor","superCtor","super_","TempCtor","BN","endian","isBN","negative","words","red","_init","wordSize","cmp","init","_initNumber","_initArray","_parseHex","_parseBase","toArray","w","off","_strip","parseHex4Bits","index","parseHexByte","lowerBound","parseLength","parseBase","limbLen","limbPow","total","imuln","_iaddn","dest","move","_move","_expand","strip","_normSign","for","zeros","groupSizes","groupBases","padding","carry","groupSize","groupBase","isZero","modrn","idivn","toNumber","toArrayLike","allocate","ArrayType","reqLength","postfix","_toArrayLikeLE","position","_toArrayLikeBE","clz32","_countBits","_zeroBits","bitLength","toBitArray","bit","wbit","zeroBits","toTwos","width","inotn","iaddn","fromTwos","testn","notn","ineg","isNeg","iuor","ior","or","uor","iuand","iand","and","uand","iuxor","ixor","xor","uxor","bytesNeeded","bitsLeft","setn","iadd","isub","smallMulTo","self","ncarry","rword","maxJ","comb10MulTo","o","mid","a0","al0","ah0","a1","al1","ah1","a2","al2","ah2","a3","al3","ah3","a4","al4","ah4","a5","al5","ah5","a6","al6","ah6","a7","al7","ah7","a8","al8","ah8","a9","al9","ah9","b0","bl0","bh0","bl1","bh1","bl2","bh2","b3","bl3","bh3","bl4","bh4","bl5","bh5","b6","bl6","bh6","b7","bl7","bh7","b8","bl8","bh8","b9","bl9","bh9","imul","w0","w1","w2","w3","w4","w5","w6","w7","w8","w9","w10","w11","w12","w13","w14","w15","w16","w17","w18","bigMulTo","hncarry","jumboMulTo","mulTo","mulf","isNegNum","muln","isqr","iushln","carryMask","newCarry","ishln","iushrn","hint","extended","maskedWords","ishrn","shln","ushln","shrn","ushrn","imaskn","maskn","isubn","addn","subn","iabs","_ishlnsubmul","_wordDiv","mode","bhi","bhiBits","diff","qj","divmod","positive","divn","umod","divRound","dm","half","andln","modn","egcd","isEven","yp","xp","im","jm","_invmp","x1","delta","cmpn","invm","bincn","ucmp","gtn","gt","gten","gte","ltn","lt","lten","lte","eqn","eq","Red","toRed","convertTo","_forceRed","fromRed","convertFrom","forceRed","redAdd","redIAdd","redSub","redISub","redShl","shl","redMul","_verify2","redIMul","redSqr","_verify1","redISqr","redSqrt","redInvm","redNeg","redPow","primes","k256","p224","p192","p25519","MPrime","_tmp","ireduce","rlen","imulK","K256","prev","next","P224","P192","P25519","_prime","prime","imod","mod3","nOne","lpow","wnd","current","currentLen","mont","Mont","rinv","minv","copyProps","SafeBuffer","_Buffer","ALPHABET","BASE_MAP","charAt","xc","LEADER","FACTOR","iFACTOR","source","zeroes","pbegin","pend","b58","it1","it2","repeat","decodeUnsafe","psz","b256","it3","it4","vch","decode","basex","bs58","assert$3","u32","hashCons","wrapXOFConstructorWithOpts","Chi","Maj","SHA256_K","IV","SHA256_W","SHA256","W15","s0","s1","sigma1","sigma0","SHA224","sha256","ToDictionary","stringToCodePoints","codePointsToString","code_points","cp","end_of_stream","Stream","tokens","endOfStream","prepend","token","unshift","pop","decoderError","fatal","opt_code_point","DEFAULT_ENCODING","TextDecoder","_streaming","_BOMseen","_decoder","_fatal","Boolean","_ignoreBOM","TextDecoder$1","UTF8Decoder","input_stream","handler","_encoder","_options","TextEncoder$1","opt_string","UTF8Encoder","utf8_code_point","utf8_bytes_seen","utf8_bytes_needed","utf8_lower_boundary","utf8_upper_boundary","stream","bite","code_point","temp","encoding_lib","__createBinding","k2","__setModuleDefault","__decorate","decorators","desc","getOwnPropertyDescriptor","Reflect","decorate","__importStar","__esModule","hasOwnProperty","__importDefault","default","lib","deserializeUnchecked_1","deserializeUnchecked","deserialize_1","deserialize","serialize_1","serialize","BinaryWriter","BorshError","baseDecode","bn_js_1","bs58_1","require$$2","ResolvedTextDecoder","textDecoder","baseEncode","INITIAL_LENGTH","fieldPath","originalMessage","addToFieldPath","splice","maybeResize","writeU8","writeU16","writeU32","writeU64","writeBuffer","writeU128","writeU256","writeU512","writeString","writeFixedArray","writeArray","elem","handlingRangeError","propertyKey","propertyDescriptor","originalMethod","BinaryReader","readU8","readU16","readU32","readU64","readBuffer","readU128","readU256","readU512","readString","readFixedArray","readArray","capitalizeFirstLetter","toUpperCase","serializeField","schema","fieldType","writer","kind","serializeStruct","borshSerialize","structSchema","fields","idx","values","Writer","deserializeField","reader","option","deserializeStruct","classType","borshDeserialize","fieldValue","Reader","Struct","properties","_classCallCheck","assign","_createClass","SOLANA_SCHEMA","decodeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","keys","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","uniquePublicKeyCounter","_Symbol$toStringTag","toStringTag","PublicKey","decoded","toBase58","zeroPad","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","programId","publicKeyBytes","wrap","_callee$","_context","abrupt","stop","createWithSeed","_x2","_x3","createProgramAddressSync","seeds","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","Layout_1","Layout$1","s16","nu64be","u48be","u40be","u32be","u16be","nu64","u40","u24","u16","u8","greedy","Constant","UTF8","Blob","BitStructure","VariantLayout","Union","UnionLayoutDiscriminator","Structure","Sequence","DoubleBE","Double","Float","NearInt64BE","NearUInt64BE","NearUInt64","IntBE","Int","UInt","OffsetLayout","GreedyCount","ExternalLayout","nameWithProperty","Layout","uint8ArrayToBuffer","checkUint8Array","constant","cstr","blob","unionLayoutDiscriminator","union","seq","struct","f64","f32be","f32","ns64be","s40be","s32be","s24be","s16be","ns64","s48","s40","s32","s24","buffer_1","span","property","makeDestinationObject","getSpan","replicate","rv","fromArray","bindConstructorLayout","Class","layout","layout_","boundConstructor_","isCount","elementSpan","rem","UIntBE","V2E32","divmodInt64","hi32","lo32","roundedInt64","NearInt64","FloatBE","elementLayout","elo","decodePrefixes","fd","fsp","firstOffset","lastOffset","lastWrote","fv","layoutFor","offsetOf","UnionDiscriminator","discr","defaultLayout","discriminator","usesPrefixDiscriminator","registry","boundGetSourceVariant","defaultGetSourceVariant","bind","getSourceVariant","configGetSourceVariant","gsv","vlo","getVariant","tag","dlo","clo","contentOffset","addVariant","variant","vb","fixBitwiseResult","msb","_packedSetValue","_packedGetValue","addField","bf","BitField","addBoolean","fieldFor","container","totalBits","usedBits","valueMask","wordMask","wordValue","srcBuffer","CString","srcb","maxSpan","u48","u24be","s8","s48be","f64be","utf8","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","readonly","_iterator","_createForOfIteratorHelper","_step","done","keySegment","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","BufferLayout","rustString","rsl","_decode","_encode","rslShim","chars","authorized","lockup","voteInit","voteAuthorizeWithSeedArgs","getAlloc","getItemAlloc","decodeLength","encodeLength","rem_len","assert$1","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","Message","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","signDataLayout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","accountCount","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","TransactionInstruction","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","minContextSlot","blockhash","nonceInstruction","signers","_len","items","_key","compileMessage","JSON","stringify","warn","accountMetas","_objectSpread","uniqueMetas","pubkeyString","uniqueIndex","sort","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","signedKeys","unsignedKeys","invariant","_compile","valid","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","browser","toBigIntLE","reversed","toBigIntLE_1","toBigIntBE","browser$1","toBufferLE","toBufferLE_1","toBufferBE","encodeDecode","bigInt","_encodeDecode","bigIntLayout","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","UpgradeNonceAccount","createAccount","params","transfer","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","CHUNK_SIZE","Loader","getMinNumSignatures","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","owner","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","objToString","objKeys","isArrayProp","propVal","toStr","fastStableStringify","returnVal","StructError","failure","failures","cached","rest","path","_cached","isIterable","isObject","iterator","print","shiftIterator","toFailure","branch","refinement","toFailures","run","coerce","coercer","validator","ts","refiner","props","is","validate","tuples","tuple","define","any","Element","literal","description","never","nullable","optional","record","Key","Value","Elements","Never","Structs","unknown","rnds8","rng","msCrypto","REGEX","uuid","test","byteToHex","_nodeId","_clockseq","_lastMSecs","_lastNSecs","v1","node","clockseq","seedBytes","random","msecs","Date","now","nsecs","dt","tl","tmh","parse","stringToBytes","unescape","encodeURIComponent","DNS","URL","v35","hashfunc","generateUUID","namespace","md5","md5ToHexEncodedArray","wordsToMd5","bytesToWords","length32","hexTab","getOutputLength","inputLength8","olda","oldb","oldc","oldd","md5ff","md5gg","md5hh","md5ii","safeAdd","length8","lsw","msw","bitRotateLeft","cnt","md5cmn","v3$1","v4","rnds","ROTL","sha1","K","N","M","_t","_t2","v5","v5$1","nil","generateRequest","method","id","request","jsonrpc","generator","notificationIdNull","generateRequest_1","ClientBrowser","callServer","reviver","replacer","callback","isBatch","isRaw","hasCallback","response","_parseResponse","responseText","isError","isNotError","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","getFirstSlotInEpoch","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","fetch","_interopRequireDefault","_typeof","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","innerFn","outerFn","tryLocsList","protoGenerator","Generator","Context","makeInvokeMethod","tryCatch","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","_invoke","AsyncIterator","PromiseImpl","invoke","reject","__await","then","unwrapped","previousPromise","callInvokeWithMethodAndArg","doneResult","delegate","delegateResult","maybeInvokeDelegate","_sent","dispatchException","methodName","info","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","displayName","isGeneratorFunction","genFun","__proto__","awrap","async","iter","skipTempReset","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","_catch","thrown","delegateYield","runtime","regenerator","regeneratorRuntime","accidentalStrictMode","Function","asyncGeneratorStep","_next","_throw","Constructor","_toPrimitive","prim","_toPropertyKey","toPropertyKey","_defineProperties","descriptor","protoProps","staticProps","_setPrototypeOf","subClass","superClass","_assertThisInitialized","ReferenceError","assertThisInitialized","_possibleConstructorReturn","_getPrototypeOf","Events","EE","once","addListener","emitter","event","listener","evt","_events","_eventsCount","clearEvent","EventEmitter","eventNames","names","events","getOwnPropertySymbols","listeners","handlers","ee","listenerCount","emit","removeListener","on","removeAllListeners","prefixed","_regenerator","_asyncToGenerator2","_typeof2","require$$3","_classCallCheck2","require$$4","_createClass2","require$$5","_inherits2","require$$6","_possibleConstructorReturn2","require$$7","_getPrototypeOf2","require$$8","_eventemitter","require$$9","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","NewTarget","construct","sham","Proxy","__rest","propertyIsEnumerable","CommonClient","_EventEmitter","webSocketFactory","_a","generate_request_id","_a$autoconnect","autoconnect","_a$reconnect","reconnect","_a$reconnect_interval","reconnect_interval","_a$max_reconnects","max_reconnects","rest_options","queue","rpc_id","ready","reconnect_timer_id","current_reconnects","_connect","connect","socket","timeout","ws_opts","send","promise","_login","resp","login","_listMethods","listMethods","notify","_subscribe","subscribe","_unsubscribe","_callee4","_callee4$","_context4","unsubscribe","close","_this4","clearTimeout","addEventListener","notification","reason","_default","WebSocketBrowserImpl","protocols","WebSocket","onopen","onmessage","onerror","onclose","optionsOrCallback","cb","RpcWebSocketClient","_RpcWebSocketCommonCl","url","rpc","createRpc","underlyingSocket","_this$underlyingSocke","readyState","_get2","_get","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","protocol","startsWith","startPort","websocketPort","PublicKeyFromString","RawAccountDataResult","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","pick","UnknownRpcResult","jsonRpcResult","jsonRpcResultAndContext","notificationResultAndContext","versionedMessageFromResponse","GetInflationGovernorResult","foundation","foundationTerm","taper","terminal","GetInflationRewardResult","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","GetLeaderScheduleResult","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","fetchWithMiddleware","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","too_many_requests_retries","waitTime","text","body","headers","COMMON_HTTP_HEADERS","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_requestPromises$requ","_extractCommitmentFro","requestHash","_buildArgs","unsafeRes","wsEndpoint","confirmTransactionInitialTimeout","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","u64$1","SHA3_PI","SHA3_ROTL","_SHA3_IOTA","_7n","_256n","_0x71n","SHA3_IOTA_H","SHA3_IOTA_L","rotlH","rotlL","keccakP","rounds","idx1","idx0","B0","B1","Th","Tl","curH","curL","PI","Keccak","suffix","enableXOF","posOut","state32","keccak","writeInto","bufferOut","xofInto","xof","keccak_256","genShake","validatePointOpts","allowedPrivateKeyLengths","wrapPrivateKey","allowInfinityPoint","endo","beta","splitScalar","b2n","h2b","ut","DER","Err","DERErr","_parseInt","toSig","sBytes","rBytesLeft","hexFromSig","rhl","rl","weierstrassPoints","isCompressed","tail","weierstrassEquation","x3","isWithinCurveOrder","assertGE","normPrivateKeyToScalar","ut.bytesToNumberBE","mod.mod","assertPrjPoint","px","py","pz","hasEvenY","U1","U2","t3","t4","t5","k1neg","k1","k2neg","k1p","k2p","fake","f1p","f2p","multiplyAndAddUnsafe","_bits","ProjectivePoint","hmac","bits2int","bits2int_modN","lowS","weierstrass","compressedLen","uncompressedLen","isValidFieldElement","invN","mod.invert","cat","isYOdd","isHeadOdd","numToNByteStr","ut.numberToBytesBE","isBiggerThanHalfOrder","HALF","normalizeS","slcNum","Signature","recovery","addRecoveryBit","recoverPublicKey","msgHash","rec","radj","ir","hasHighS","toDERRawBytes","ut.hexToBytes","toDERHex","toCompactRawBytes","toCompactHex","isValidPrivateKey","rand","mod.hashToPrivateScalar","fromPrivateKey","isProbPub","privateA","publicB","ORDER_MASK","ut.bitMask","int2octets","prepSig","defaultSigOpts","extraEntropy","ent","h1int","seedArgs","k2sig","kBytes","ik","normS","defaultVerOpts","drbg","ut.createHmacDrbg","sg","_sig","fromDER","derError","fromCompact","SWUFpSqrtRatio","c2","c3","c4","c5","c6","c7","sqrtRatio","tv5","tv4","isQR","tvv5","mapToCurveSimpleSWU","mod.validateField","tv6","HMAC","iHash","oHash","getHash","createCurve","defHash","secp256k1P","secp256k1N","divNearest","sqrtMod","_6n","_11n","_22n","_23n","_44n","_88n","b11","b22","b44","b88","b176","b220","b223","secp256k1","POW_2_128","fe","TAGGED_HASH_PREFIXES","taggedHash","messages","tagP","tagH","pointToBytes","numTo32b","GmulAdd","schnorrGetExtPubKey","priv","d_","lift_x","xx","challenge","schnorrGetPublicKey","schnorrSign","auxRand","k_","rx","schnorrVerify","pub","isoMap","htf.isogenyMap","mapSWU","ecdsaSign","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","authorize","authorizeWithSeed","splitInstruction","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":"4+pBAEAA,SAAAC,WAAqBA,WACrBD,SAAAE,YAAsBA,YACtBF,SAAAG,cAAwBA,cAExB,IAAIC,OAAS,GACb,IAAIC,UAAY,GAChB,IAAIC,WAAaC,aAAe,YAAcA,WAAaC,MA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C7B0sC,cAAe1sC,QAAQ0sC,cACvBC,oBAAqB3sC,QAAQ2sC,qBAAuB3sC,QAAQ4sC,WAC5D/G,eAAgB7lC,QAAQ6lC,gBACzBpZ,SAAAlO,KAAA,EAAA,OAEuB0pB,WAAWmhD,mBACjCM,eACAn9C,aACD,KAAA,EAHK3U,UAASnL,SAAA0b,KAKTyE,WAAa5sC,SAAWA,QAAQ4sC,WAChCw+B,oBAAsBogC,qBACxBvjE,WAAW8E,mBAAmBy+D,qBAAsB5+D,YACpD3E,WAAW8E,mBAAmBnV,UAAWgV,YAAWngB,SAAAlO,KAAA,EAAA,OAClC6sD,oBAAmB,KAAA,EAAnC5+B,OAAM/f,SAAA0b,KAA+Bn1D,MAAK,IAE5Cw5D,OAAO5e,IAAG,CAAAnB,SAAAlO,KAAA,GAAA,KAAA,CAAA,MACN,IAAIjuC,MAAK,mBAAA8H,OACMw/C,UAASx/C,aAAAA,OAAYiuD,KAAKC,UAAUkG,cACxD,KAAA,GAAA,OAAA/f,SAAAC,OAAA,SAGIkL,WAAS,KAAA,GAAA,IAAA,MAAA,OAAAnL,SAAAE,OAAA,GAAAR,QACjB,KAAA,OAAAk/E,8BAAA3xH,MAAA1E,KAAA0D,UAAA,CC9EM,IAAM+yH,iBAAmB","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18,19,20,21,22,23,24,25,26,27,32,53,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,105,106,107,108,109,110,111]} -\ No newline at end of file -+{"version":3,"file":"index.iife.min.js","sources":["../../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js","../../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js","../../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/utils.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_sha2.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_u64.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/sha512.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/edwards.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/montgomery.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/hash-to-curve.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/ed25519.js","../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js","../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js","../../../node_modules/.pnpm/base-x@3.0.9/node_modules/base-x/src/index.js","../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/utils.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.js","../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js","../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../../../node_modules/.pnpm/@solana+buffer-layout@4.0.0/node_modules/@solana/buffer-layout/lib/Layout.js","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/utils/guarded-array-utils.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../../../node_modules/.pnpm/bigint-buffer@1.1.5/node_modules/bigint-buffer/dist/browser.js","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../../../node_modules/.pnpm/superstruct@0.14.2/node_modules/superstruct/lib/index.es.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js","../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js","../../../node_modules/.pnpm/jayson@4.1.0/node_modules/jayson/lib/generateRequest.js","../../../node_modules/.pnpm/jayson@4.1.0/node_modules/jayson/lib/client/browser/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/__forks__/browser/fetch-impl.ts","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/typeof.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/regeneratorRuntime.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/regenerator/index.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/asyncToGenerator.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/classCallCheck.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/toPrimitive.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/toPropertyKey.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/createClass.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/setPrototypeOf.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/inherits.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/assertThisInitialized.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/getPrototypeOf.js","../../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js","../../../node_modules/.pnpm/rpc-websockets@7.5.1/node_modules/rpc-websockets/dist/lib/client.js","../../../node_modules/.pnpm/rpc-websockets@7.5.1/node_modules/rpc-websockets/dist/lib/client/websocket.browser.js","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_u64.js","../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/sha3.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/sha256.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js","../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.js","../../../node_modules/.pnpm/@noble+curves@1.0.0/node_modules/@noble/curves/esm/secp256k1.js","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new TypeError('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new TypeError(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map","export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use `globalThis.crypto`, but node.js versions earlier than v19 don't\n// declare it in global scope. For node.js, package.json#exports field mapping\n// rewrites import from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xde, 0xad, 0xbe, 0xef])) // 'deadbeef'\n */\nexport function bytesToHex(uint8a) {\n // pre-caching improves the speed 6x\n if (!(uint8a instanceof Uint8Array))\n throw new Error('Uint8Array expected');\n let hex = '';\n for (let i = 0; i < uint8a.length; i++) {\n hex += hexes[uint8a[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('deadbeef') // Uint8Array.from([0xde, 0xad, 0xbe, 0xef])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string') {\n throw new TypeError('hexToBytes: expected string, got ' + typeof hex);\n }\n if (hex.length % 2)\n throw new Error('hexToBytes: received invalid unpadded hex');\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string') {\n throw new TypeError(`utf8ToBytes expected string, got ${typeof str}`);\n }\n return new TextEncoder().encode(str);\n}\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!(data instanceof Uint8Array))\n throw new TypeError(`Expected input type is Uint8Array (got ${typeof data})`);\n return data;\n}\n/**\n * Concats Uint8Array-s into one; like `Buffer.concat([buf1, buf2])`\n * @example concatBytes(buf1, buf2)\n */\nexport function concatBytes(...arrays) {\n if (!arrays.every((a) => a instanceof Uint8Array))\n throw new Error('Uint8Array list expected');\n if (arrays.length === 1)\n return arrays[0];\n const length = arrays.reduce((a, arr) => a + arr.length, 0);\n const result = new Uint8Array(length);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const arr = arrays[i];\n result.set(arr, pad);\n pad += arr.length;\n }\n return result;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))\n throw new TypeError('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashConstructor) {\n const hashC = (message) => hashConstructor().update(toBytes(message)).digest();\n const tmp = hashConstructor();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashConstructor();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `globalThis.crypto` or node.js crypto module.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import assert from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n assert.exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map","const U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nexport function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nexport function split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nexport const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (h, l) => l;\nconst rotr32L = (h, l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\n// Removing \"export\" has 5% perf penalty -_-\nexport function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import { SHA2 } from './_sha2.js';\nimport u64 from './_u64.js';\nimport { wrapConstructor } from './utils.js';\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n)));\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = new Uint32Array(80);\nconst SHA512_W_L = new Uint32Array(80);\nexport class SHA512 extends SHA2 {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x1f83d9ab | 0;\n this.Gl = 0xfb41bd6b | 0;\n this.Hh = 0x5be0cd19 | 0;\n this.Hl = 0x137e2179 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H.fill(0);\n SHA512_W_L.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\nclass SHA512_224 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x8c3d37c8 | 0;\n this.Al = 0x19544da2 | 0;\n this.Bh = 0x73e19966 | 0;\n this.Bl = 0x89dcd4d6 | 0;\n this.Ch = 0x1dfab7ae | 0;\n this.Cl = 0x32ff9c82 | 0;\n this.Dh = 0x679dd514 | 0;\n this.Dl = 0x582f9fcf | 0;\n this.Eh = 0x0f6d2b69 | 0;\n this.El = 0x7bd44da8 | 0;\n this.Fh = 0x77e36f73 | 0;\n this.Fl = 0x04c48942 | 0;\n this.Gh = 0x3f9d85a8 | 0;\n this.Gl = 0x6a1d36c8 | 0;\n this.Hh = 0x1112e6ad | 0;\n this.Hl = 0x91d692a1 | 0;\n this.outputLen = 28;\n }\n}\nclass SHA512_256 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x22312194 | 0;\n this.Al = 0xfc2bf72c | 0;\n this.Bh = 0x9f555fa3 | 0;\n this.Bl = 0xc84c64c2 | 0;\n this.Ch = 0x2393b86b | 0;\n this.Cl = 0x6f53b151 | 0;\n this.Dh = 0x96387719 | 0;\n this.Dl = 0x5940eabd | 0;\n this.Eh = 0x96283ee2 | 0;\n this.El = 0xa88effe3 | 0;\n this.Fh = 0xbe5e1e25 | 0;\n this.Fl = 0x53863992 | 0;\n this.Gh = 0x2b0199fc | 0;\n this.Gl = 0x2c85b8aa | 0;\n this.Hh = 0x0eb72ddc | 0;\n this.Hl = 0x81c52ca2 | 0;\n this.outputLen = 32;\n }\n}\nclass SHA384 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0xcbbb9d5d | 0;\n this.Al = 0xc1059ed8 | 0;\n this.Bh = 0x629a292a | 0;\n this.Bl = 0x367cd507 | 0;\n this.Ch = 0x9159015a | 0;\n this.Cl = 0x3070dd17 | 0;\n this.Dh = 0x152fecd8 | 0;\n this.Dl = 0xf70e5939 | 0;\n this.Eh = 0x67332667 | 0;\n this.El = 0xffc00b31 | 0;\n this.Fh = 0x8eb44a87 | 0;\n this.Fl = 0x68581511 | 0;\n this.Gh = 0xdb0c2e0d | 0;\n this.Gl = 0x64f98fa7 | 0;\n this.Hh = 0x47b5481d | 0;\n this.Hl = 0xbefa4fa4 | 0;\n this.outputLen = 48;\n }\n}\nexport const sha512 = wrapConstructor(() => new SHA512());\nexport const sha512_224 = wrapConstructor(() => new SHA512_224());\nexport const sha512_256 = wrapConstructor(() => new SHA512_256());\nexport const sha384 = wrapConstructor(() => new SHA384());\n//# sourceMappingURL=sha512.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst u8a = (a) => a instanceof Uint8Array;\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // Big Endian\n return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n// Caching slows it down 2-3x\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n if (hex.length % 2)\n throw new Error('hex string is invalid: unpadded ' + hex.length);\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// Big Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport const numberToBytesBE = (n, len) => hexToBytes(n.toString(16).padStart(len * 2, '0'));\nexport const numberToBytesLE = (n, len) => numberToBytesBE(n, len).reverse();\n// Returns variable number bytes (minimal bigint encoding?)\nexport const numberToVarBytesBE = (n) => hexToBytes(numberToHexUnpadded(n));\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n }\n }\n else if (u8a(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(`${title} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n return res;\n}\n// Copies several Uint8Arrays into one.\nexport function concatBytes(...arrs) {\n const r = new Uint8Array(arrs.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrs.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\nexport function equalBytes(b1, b2) {\n // We don't care about timing attacks here\n if (b1.length !== b2.length)\n return false;\n for (let i = 0; i < b1.length; i++)\n if (b1[i] !== b2[i])\n return false;\n return true;\n}\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string') {\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n }\n return new TextEncoder().encode(str);\n}\n// Bit operations\n// Amount of bits inside bigint (Same as n.toString(2).length)\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n// Gets single bit at position. NOTE: first bit position is 0 (same as arrays)\n// Same as !!+Array.from(n.toString(2)).reverse()[pos]\nexport const bitGet = (n, pos) => (n >> BigInt(pos)) & _1n;\n// Sets single bit at position\nexport const bitSet = (n, pos, value) => n | ((value ? _1n : _0n) << BigInt(pos));\n// Return mask for N bits (Same as BigInt(`0b${Array(i).fill('1').join('')}`))\n// Not using ** operator with bigints for old engines.\nexport const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n()) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\nimport { bitMask, numberToBytesBE, numberToBytesLE, bytesToNumberBE, bytesToNumberLE, ensureBytes, validateObject, } from './utils.js';\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently exponentiate num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * powMod(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nexport function pow(num, power, modulo) {\n if (modulo <= _0n || power < _0n)\n throw new Error('Expected power/modulo > 0');\n if (modulo === _1n)\n return _0n;\n let res = _1n;\n while (power > _0n) {\n if (power & _1n)\n res = (res * num) % modulo;\n num = (num * num) % modulo;\n power >>= _1n;\n }\n return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nexport function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= modulo;\n }\n return res;\n}\n// Inverses number over modulo\nexport function invert(number, modulo) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n // Eucledian GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n let a = mod(number, modulo);\n let b = modulo;\n // prettier-ignore\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n // JIT applies optimization if those two lines follow each other\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n // prettier-ignore\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\n// Tonelli-Shanks algorithm\n// Paper 1: https://eprint.iacr.org/2012/685.pdf (page 12)\n// Paper 2: Square Roots from 1; 24, 51, 10 to Dan Shanks\nexport function tonelliShanks(P) {\n // Legendre constant: used to calculate Legendre symbol (a | p),\n // which denotes the value of a^((p-1)/2) (mod p).\n // (a | p) ≡ 1 if a is a square (mod p)\n // (a | p) ≡ -1 if a is not a square (mod p)\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreC = (P - _1n) / _2n;\n let Q, S, Z;\n // Step 1: By factoring out powers of 2 from p - 1,\n // find q and s such that p - 1 = q*(2^s) with q odd\n for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++)\n ;\n // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++)\n ;\n // Fast-path\n if (S === 1) {\n const p1div4 = (P + _1n) / _4n;\n return function tonelliFast(Fp, n) {\n const root = Fp.pow(n, p1div4);\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Slow-path\n const Q1div2 = (Q + _1n) / _2n;\n return function tonelliSlow(Fp, n) {\n // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n throw new Error('Cannot find square root');\n let r = S;\n // TODO: will fail at Fp2/etc\n let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n let x = Fp.pow(n, Q1div2); // first guess at the square root\n let b = Fp.pow(n, Q); // first guess at the fudge factor\n while (!Fp.eql(b, Fp.ONE)) {\n if (Fp.eql(b, Fp.ZERO))\n return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n // Find m such b^(2^m)==1\n let m = 1;\n for (let t2 = Fp.sqr(b); m < r; m++) {\n if (Fp.eql(t2, Fp.ONE))\n break;\n t2 = Fp.sqr(t2); // t2 *= t2\n }\n // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n const ge = Fp.pow(g, _1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n g = Fp.sqr(ge); // g = ge * ge\n x = Fp.mul(x, ge); // x *= ge\n b = Fp.mul(b, g); // b *= g\n r = m;\n }\n return x;\n };\n}\nexport function FpSqrt(P) {\n // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n // P ≡ 3 (mod 4)\n // √n = n^((P+1)/4)\n if (P % _4n === _3n) {\n // Not all roots possible!\n // const ORDER =\n // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n // const NUM = 72057594037927816n;\n const p1div4 = (P + _1n) / _4n;\n return function sqrt3mod4(Fp, n) {\n const root = Fp.pow(n, p1div4);\n // Throw if root**2 != n\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n if (P % _8n === _5n) {\n const c1 = (P - _5n) / _8n;\n return function sqrt5mod8(Fp, n) {\n const n2 = Fp.mul(n, _2n);\n const v = Fp.pow(n2, c1);\n const nv = Fp.mul(n, v);\n const i = Fp.mul(Fp.mul(nv, _2n), v);\n const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // P ≡ 9 (mod 16)\n if (P % _16n === _9n) {\n // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n // Means we cannot use sqrt for constants at all!\n //\n // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n // const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n // const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n // const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic\n // sqrt = (x) => {\n // let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4\n // let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1\n // const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1\n // let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1\n // const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x\n // const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x\n // tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x\n // tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x\n // const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x\n // return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2\n // }\n }\n // Other cases: Tonelli-Shanks algorithm\n return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n 'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n 'eql', 'add', 'sub', 'mul', 'pow', 'div',\n 'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n const initial = {\n ORDER: 'bigint',\n MASK: 'bigint',\n BYTES: 'isSafeInteger',\n BITS: 'isSafeInteger',\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = 'function';\n return map;\n }, initial);\n return validateObject(field, opts);\n}\n// Generic field functions\nexport function FpPow(f, num, power) {\n // Should have same speed as pow for bigints\n // TODO: benchmark!\n if (power < _0n)\n throw new Error('Expected power > 0');\n if (power === _0n)\n return f.ONE;\n if (power === _1n)\n return num;\n let p = f.ONE;\n let d = num;\n while (power > _0n) {\n if (power & _1n)\n p = f.mul(p, d);\n d = f.sqr(d);\n power >>= _1n;\n }\n return p;\n}\n// 0 is non-invertible: non-batched version will throw on 0\nexport function FpInvertBatch(f, nums) {\n const tmp = new Array(nums.length);\n // Walk from first to last, multiply them by each other MOD p\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = acc;\n return f.mul(acc, num);\n }, f.ONE);\n // Invert last element\n const inverted = f.inv(lastMultiplied);\n // Walk from last to first, multiply them by inverted each other MOD p\n nums.reduceRight((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = f.mul(acc, tmp[i]);\n return f.mul(acc, num);\n }, inverted);\n return tmp;\n}\nexport function FpDiv(f, lhs, rhs) {\n return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n const legendreConst = (f.ORDER - _1n) / _2n; // Integer arithmetic\n return (x) => {\n const p = f.pow(x, legendreConst);\n return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n };\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n // Bit size, byte size of CURVE.n\n const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a galois field over prime. Non-primes are not supported for now.\n * Do not init in loop: slow. Very fragile: always run a benchmark on change.\n * Major performance gains:\n * a) non-normalized operations like mulN instead of mul\n * b) `Object.freeze`\n * c) Same object shape: never add or remove keys\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLen, isLE = false, redef = {}) {\n if (ORDER <= _0n)\n throw new Error(`Expected Fp ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('Field lengths over 2048 bytes are not supported');\n const sqrtP = FpSqrt(ORDER);\n const f = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n,\n ONE: _1n,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== 'bigint')\n throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n },\n is0: (num) => num === _0n,\n isOdd: (num) => (num & _1n) === _1n,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n invertBatch: (lst) => FpInvertBatch(f, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a, b, c) => (c ? b : a),\n toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n });\n return Object.freeze(f);\n}\nexport function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * FIPS 186 B.4.1-compliant \"constant-time\" private key generation utility.\n * Can take (n+8) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being neglible.\n * Needs at least 40 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * @param hash hash output from SHA3 or a similar function\n * @returns valid private scalar\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n hash = ensureBytes('privateHash', hash);\n const hashLen = hash.length;\n const minLen = nLength(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n return mod(num, groupOrder - _1n) + _1n;\n}\n//# sourceMappingURL=modular.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nexport function wNAF(c, bits) {\n const constTimeNegate = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1; // +1, because\n const windowSize = 2 ** (W - 1); // -1 because we skip zero\n return { windows, windowSize };\n };\n return {\n constTimeNegate,\n // non-const time multiplication ladder\n unsafeLadder(elm, n) {\n let p = c.ZERO;\n let d = elm;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p = elm;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n // =1, because we skip zero\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n // But need to carefully remove other checks before wNAF. ORDER == bits here\n const { windows, windowSize } = opts(W);\n let p = c.ZERO;\n let f = c.BASE;\n const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n // Extract W bits.\n let wbits = Number(n & mask);\n // Shift number by W bits.\n n >>= shiftBy;\n // If the bits are bigger than max size, we'll split those.\n // +224 => 256 - 32\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n // there is negate now: it is possible that negated element from low value\n // would be the same as high element, which will create carry into next window.\n // It's not obvious how this can fail, but still worth investigating later.\n // Check if we're onto Zero point.\n // Add random point inside current window to f.\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n // The most important part for const-time getPublicKey\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n // Even if the variable is still unused, there are some checks which will\n // throw an exception, so compiler needs to prove they won't happen, which is hard.\n // At this point there is a way to F be infinity-point even if p is not,\n // which makes it less const-time: around 1 bigint multiply.\n return { p, f };\n },\n wNAFCached(P, precomputesMap, n, transform) {\n // @ts-ignore\n const W = P._WINDOW_SIZE || 1;\n // Calculate precomputes on a first run, reuse them after\n let comp = precomputesMap.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1) {\n precomputesMap.set(P, transform(comp));\n }\n }\n return this.wNAF(W, comp, n);\n },\n };\n}\nexport function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: 'bigint',\n h: 'bigint',\n Gx: 'field',\n Gy: 'field',\n }, {\n nBitLength: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n });\n // Set defaults\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER },\n });\n}\n//# sourceMappingURL=curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y²\nimport { mod } from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _8n = BigInt(8);\n// verification rule is either zip215 or rfc8032 / nist186-5. Consult fromHex:\nconst VERIFY_DEFAULT = { zip215: true };\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(curve, {\n hash: 'function',\n a: 'bigint',\n d: 'bigint',\n randomBytes: 'function',\n }, {\n adjustScalarBytes: 'function',\n domain: 'function',\n uvRatio: 'function',\n mapToCurve: 'function',\n });\n // Set defaults\n return Object.freeze({ ...opts });\n}\n// It is not generic twisted curve for now, but ed25519/ed448 generic implementation\nexport function twistedEdwards(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, prehash: prehash, hash: cHash, randomBytes, nByteLength, h: cofactor, } = CURVE;\n const MASK = _2n ** BigInt(nByteLength * 8);\n const modP = Fp.create; // Function overrides\n // sqrt(u/v)\n const uvRatio = CURVE.uvRatio ||\n ((u, v) => {\n try {\n return { isValid: true, value: Fp.sqrt(u * Fp.inv(v)) };\n }\n catch (e) {\n return { isValid: false, value: _0n };\n }\n });\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes); // NOOP\n const domain = CURVE.domain ||\n ((data, ctx, phflag) => {\n if (ctx.length || phflag)\n throw new Error('Contexts/pre-hash are not supported');\n return data;\n }); // NOOP\n const inBig = (n) => typeof n === 'bigint' && _0n < n; // n in [1..]\n const inRange = (n, max) => inBig(n) && inBig(max) && n < max; // n in [1..max-1]\n const in0MaskRange = (n) => n === _0n || inRange(n, MASK); // n in [0..MASK-1]\n function assertInRange(n, max) {\n // n in [1..max-1]\n if (inRange(n, max))\n return n;\n throw new Error(`Expected valid scalar < ${max}, got ${typeof n} ${n}`);\n }\n function assertGE0(n) {\n // n in [0..CURVE_ORDER-1]\n return n === _0n ? n : assertInRange(n, CURVE_ORDER); // GE = prime subgroup, not full group\n }\n const pointPrecomputes = new Map();\n function isPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ExtendedPoint expected');\n }\n // Extended Point works in extended coordinates: (x, y, z, t) ∋ (x=x/z, y=y/z, t=xy).\n // https://en.wikipedia.org/wiki/Twisted_Edwards_curve#Extended_coordinates\n class Point {\n constructor(ex, ey, ez, et) {\n this.ex = ex;\n this.ey = ey;\n this.ez = ez;\n this.et = et;\n if (!in0MaskRange(ex))\n throw new Error('x required');\n if (!in0MaskRange(ey))\n throw new Error('y required');\n if (!in0MaskRange(ez))\n throw new Error('z required');\n if (!in0MaskRange(et))\n throw new Error('t required');\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error('extended point not allowed');\n const { x, y } = p || {};\n if (!in0MaskRange(x) || !in0MaskRange(y))\n throw new Error('invalid affine point');\n return new Point(x, y, _1n, modP(x * y));\n }\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.ez));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // Not required for fromHex(), which always creates valid points.\n // Could be useful for fromAffine().\n assertValidity() {\n const { a, d } = CURVE;\n if (this.is0())\n throw new Error('bad point: ZERO'); // TODO: optimize, with vars below?\n // Equation in affine coordinates: ax² + y² = 1 + dx²y²\n // Equation in projective coordinates (X/Z, Y/Z, Z): (aX² + Y²)Z² = Z⁴ + dX²Y²\n const { ex: X, ey: Y, ez: Z, et: T } = this;\n const X2 = modP(X * X); // X²\n const Y2 = modP(Y * Y); // Y²\n const Z2 = modP(Z * Z); // Z²\n const Z4 = modP(Z2 * Z2); // Z⁴\n const aX2 = modP(X2 * a); // aX²\n const left = modP(Z2 * modP(aX2 + Y2)); // (aX² + Y²)Z²\n const right = modP(Z4 + modP(d * modP(X2 * Y2))); // Z⁴ + dX²Y²\n if (left !== right)\n throw new Error('bad point: equation left != right (1)');\n // In Extended coordinates we also have T, which is x*y=T/Z: check X*Y == Z*T\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error('bad point: equation left != right (2)');\n }\n // Compare one point to another.\n equals(other) {\n isPoint(other);\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const { ex: X2, ey: Y2, ez: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n // Flips point sign to a negative one (-x, y in affine coords)\n return new Point(modP(-this.ex), this.ey, this.ez, modP(-this.et));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const A = modP(X1 * X1); // A = X12\n const B = modP(Y1 * Y1); // B = Y12\n const C = modP(_2n * modP(Z1 * Z1)); // C = 2*Z12\n const D = modP(a * A); // D = a*A\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B); // E = (X1+Y1)2-A-B\n const G = D + B; // G = D+B\n const F = G - C; // F = G-C\n const H = D - B; // H = D-B\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n isPoint(other);\n const { a, d } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1, et: T1 } = this;\n const { ex: X2, ey: Y2, ez: Z2, et: T2 } = other;\n // Faster algo for adding 2 Extended Points when curve's a=-1.\n // http://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html#addition-add-2008-hwcd-4\n // Cost: 8M + 8add + 2*2.\n // Note: It does not check whether the `other` point is valid.\n if (a === BigInt(-1)) {\n const A = modP((Y1 - X1) * (Y2 + X2));\n const B = modP((Y1 + X1) * (Y2 - X2));\n const F = modP(B - A);\n if (F === _0n)\n return this.double(); // Same point. Tests say it doesn't affect timing\n const C = modP(Z1 * _2n * T2);\n const D = modP(T1 * _2n * Z2);\n const E = D + C;\n const G = B + A;\n const H = D - C;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n const A = modP(X1 * X2); // A = X1*X2\n const B = modP(Y1 * Y2); // B = Y1*Y2\n const C = modP(T1 * d * T2); // C = T1*d*T2\n const D = modP(Z1 * Z2); // D = Z1*Z2\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B); // E = (X1+Y1)*(X2+Y2)-A-B\n const F = D - C; // F = D-C\n const G = D + C; // G = D+C\n const H = modP(B - a * A); // H = B-a*A\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, Point.normalizeZ);\n }\n // Constant-time multiplication.\n multiply(scalar) {\n const { p, f } = this.wNAF(assertInRange(scalar, CURVE_ORDER));\n return Point.normalizeZ([p, f])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n multiplyUnsafe(scalar) {\n let n = assertGE0(scalar); // 0 <= scalar < CURVE.n\n if (n === _0n)\n return I;\n if (this.equals(I) || n === _1n)\n return this;\n if (this.equals(G))\n return this.wNAF(n).p;\n return wnaf.unsafeLadder(this, n);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafeLadder(this, CURVE_ORDER).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(iz) {\n const { ex: x, ey: y, ez: z } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? _8n : Fp.inv(z); // 8 was chosen arbitrarily\n const ax = modP(x * iz);\n const ay = modP(y * iz);\n const zz = modP(z * iz);\n if (is0)\n return { x: _0n, y: _1n };\n if (zz !== _1n)\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n clearCofactor() {\n const { h: cofactor } = CURVE;\n if (cofactor === _1n)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n // Converts hash string or Uint8Array to Point.\n // Uses algo from RFC8032 5.1.3.\n static fromHex(hex, zip215 = false) {\n const { d, a } = CURVE;\n const len = Fp.BYTES;\n hex = ensureBytes('pointHex', hex, len); // copy hex to a new array\n const normed = hex.slice(); // copy again, we'll manipulate it\n const lastByte = hex[len - 1]; // select last byte\n normed[len - 1] = lastByte & ~0x80; // clear last bit\n const y = ut.bytesToNumberLE(normed);\n if (y === _0n) {\n // y=0 is allowed\n }\n else {\n // RFC8032 prohibits >= p, but ZIP215 doesn't\n if (zip215)\n assertInRange(y, MASK); // zip215=true [1..P-1] (2^255-19-1 for ed25519)\n else\n assertInRange(y, Fp.ORDER); // zip215=false [1..MASK-1] (2^256-1 for ed25519)\n }\n // Ed25519: x² = (y²-1)/(dy²+1) mod p. Ed448: x² = (y²-1)/(dy²-1) mod p. Generic case:\n // ax²+y²=1+dx²y² => y²-1=dx²y²-ax² => y²-1=x²(dy²-a) => x²=(y²-1)/(dy²-a)\n const y2 = modP(y * y); // denominator is always non-0 mod p.\n const u = modP(y2 - _1n); // u = y² - 1\n const v = modP(d * y2 - a); // v = d y² + 1.\n let { isValid, value: x } = uvRatio(u, v); // √(u/v)\n if (!isValid)\n throw new Error('Point.fromHex: invalid y coordinate');\n const isXOdd = (x & _1n) === _1n; // There are 2 square roots. Use x_0 bit to select proper\n const isLastByteOdd = (lastByte & 0x80) !== 0; // if x=0 and x_0 = 1, fail\n if (isLastByteOdd !== isXOdd)\n x = modP(-x); // if x_0 != x mod 2, set x = p-x\n return Point.fromAffine({ x, y });\n }\n static fromPrivateKey(privKey) {\n return getExtendedPublicKey(privKey).point;\n }\n toRawBytes() {\n const { x, y } = this.toAffine();\n const bytes = ut.numberToBytesLE(y, Fp.BYTES); // each y has 2 x values (x, -y)\n bytes[bytes.length - 1] |= x & _1n ? 0x80 : 0; // when compressing, it's enough to store y\n return bytes; // and use the last byte to encode sign of x\n }\n toHex() {\n return ut.bytesToHex(this.toRawBytes()); // Same as toRawBytes, but returns string.\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, _1n, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(_0n, _1n, _1n, _0n); // 0, 1, 1, 0\n const { BASE: G, ZERO: I } = Point;\n const wnaf = wNAF(Point, nByteLength * 8);\n function modN(a) {\n return mod(a, CURVE_ORDER);\n }\n // Little-endian SHA512 with modulo n\n function modN_LE(hash) {\n return modN(ut.bytesToNumberLE(hash));\n }\n /** Convenience method that creates public key and other stuff. RFC8032 5.1.5 */\n function getExtendedPublicKey(key) {\n const len = nByteLength;\n key = ensureBytes('private key', key, len);\n // Hash private key with curve's hash function to produce uniformingly random input\n // Check byte lengths: ensure(64, h(ensure(32, key)))\n const hashed = ensureBytes('hashed private key', cHash(key), 2 * len);\n const head = adjustScalarBytes(hashed.slice(0, len)); // clear first half bits, produce FE\n const prefix = hashed.slice(len, 2 * len); // second half is called key prefix (5.1.6)\n const scalar = modN_LE(head); // The actual private scalar\n const point = G.multiply(scalar); // Point on Edwards curve aka public key\n const pointBytes = point.toRawBytes(); // Uint8Array representation\n return { head, prefix, scalar, point, pointBytes };\n }\n // Calculates EdDSA pub key. RFC8032 5.1.5. Privkey is hashed. Use first half with 3 bits cleared\n function getPublicKey(privKey) {\n return getExtendedPublicKey(privKey).pointBytes;\n }\n // int('LE', SHA512(dom2(F, C) || msgs)) mod N\n function hashDomainToScalar(context = new Uint8Array(), ...msgs) {\n const msg = ut.concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, ensureBytes('context', context), !!prehash)));\n }\n /** Signs message with privateKey. RFC8032 5.1.6 */\n function sign(msg, privKey, options = {}) {\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph etc.\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(privKey);\n const r = hashDomainToScalar(options.context, prefix, msg); // r = dom2(F, C) || prefix || PH(M)\n const R = G.multiply(r).toRawBytes(); // R = rG\n const k = hashDomainToScalar(options.context, R, pointBytes, msg); // R || A || PH(M)\n const s = modN(r + k * scalar); // S = (r + k * s) mod L\n assertGE0(s); // 0 <= s < l\n const res = ut.concatBytes(R, ut.numberToBytesLE(s, Fp.BYTES));\n return ensureBytes('result', res, nByteLength * 2); // 64-byte signature\n }\n const verifyOpts = VERIFY_DEFAULT;\n function verify(sig, msg, publicKey, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = Fp.BYTES; // Verifies EdDSA signature against message and public key. RFC8032 5.1.7.\n sig = ensureBytes('signature', sig, 2 * len); // An extended group equation is checked.\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph, etc\n const s = ut.bytesToNumberLE(sig.slice(len, 2 * len));\n // zip215: true is good for consensus-critical apps and allows points < 2^256\n // zip215: false follows RFC8032 / NIST186-5 and restricts points to CURVE.p\n let A, R, SB;\n try {\n A = Point.fromHex(publicKey, zip215);\n R = Point.fromHex(sig.slice(0, len), zip215);\n SB = G.multiplyUnsafe(s); // 0 <= s < l is done inside\n }\n catch (error) {\n return false;\n }\n const k = hashDomainToScalar(context, R.toRawBytes(), A.toRawBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n // [8][S]B = [8]R + [8][k]A'\n return RkA.subtract(SB).clearCofactor().equals(Point.ZERO);\n }\n G._setWindowSize(8); // Enable precomputes. Slows down first publicKey computation by 20ms.\n const utils = {\n getExtendedPublicKey,\n // ed25519 private keys are uniform 32b. No need to check for modulo bias, like in secp256k1.\n randomPrivateKey: () => randomBytes(Fp.BYTES),\n /**\n * We're doing scalar multiplication (used in getPublicKey etc) with precomputed BASE_POINT\n * values. This slows down first getPublicKey() by milliseconds (see Speed section),\n * but allows to speed-up subsequent getPublicKey() calls up to 20x.\n * @param windowSize 2, 4, 8, 16\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n },\n };\n return {\n CURVE,\n getPublicKey,\n sign,\n verify,\n ExtendedPoint: Point,\n utils,\n };\n}\n//# sourceMappingURL=edwards.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { mod, pow } from './modular.js';\nimport { bytesToNumberLE, ensureBytes, numberToBytesLE, validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nfunction validateOpts(curve) {\n validateObject(curve, {\n a: 'bigint',\n }, {\n montgomeryBits: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n adjustScalarBytes: 'function',\n domain: 'function',\n powPminus2: 'function',\n Gu: 'bigint',\n });\n // Set defaults\n return Object.freeze({ ...curve });\n}\n// NOTE: not really montgomery curve, just bunch of very specific methods for X25519/X448 (RFC 7748, https://www.rfc-editor.org/rfc/rfc7748)\n// Uses only one coordinate instead of two\nexport function montgomery(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { P } = CURVE;\n const modP = (n) => mod(n, P);\n const montgomeryBits = CURVE.montgomeryBits;\n const montgomeryBytes = Math.ceil(montgomeryBits / 8);\n const fieldLen = CURVE.nByteLength;\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes);\n const powPminus2 = CURVE.powPminus2 || ((x) => pow(x, P - BigInt(2), P));\n // cswap from RFC7748. But it is not from RFC7748!\n /*\n cswap(swap, x_2, x_3):\n dummy = mask(swap) AND (x_2 XOR x_3)\n x_2 = x_2 XOR dummy\n x_3 = x_3 XOR dummy\n Return (x_2, x_3)\n Where mask(swap) is the all-1 or all-0 word of the same length as x_2\n and x_3, computed, e.g., as mask(swap) = 0 - swap.\n */\n function cswap(swap, x_2, x_3) {\n const dummy = modP(swap * (x_2 - x_3));\n x_2 = modP(x_2 - dummy);\n x_3 = modP(x_3 + dummy);\n return [x_2, x_3];\n }\n // Accepts 0 as well\n function assertFieldElement(n) {\n if (typeof n === 'bigint' && _0n <= n && n < P)\n return n;\n throw new Error('Expected valid scalar 0 < scalar < CURVE.P');\n }\n // x25519 from 4\n // The constant a24 is (486662 - 2) / 4 = 121665 for curve25519/X25519\n const a24 = (CURVE.a - BigInt(2)) / BigInt(4);\n /**\n *\n * @param pointU u coordinate (x) on Montgomery Curve 25519\n * @param scalar by which the point would be multiplied\n * @returns new Point on Montgomery curve\n */\n function montgomeryLadder(pointU, scalar) {\n const u = assertFieldElement(pointU);\n // Section 5: Implementations MUST accept non-canonical values and process them as\n // if they had been reduced modulo the field prime.\n const k = assertFieldElement(scalar);\n const x_1 = u;\n let x_2 = _1n;\n let z_2 = _0n;\n let x_3 = u;\n let z_3 = _1n;\n let swap = _0n;\n let sw;\n for (let t = BigInt(montgomeryBits - 1); t >= _0n; t--) {\n const k_t = (k >> t) & _1n;\n swap ^= k_t;\n sw = cswap(swap, x_2, x_3);\n x_2 = sw[0];\n x_3 = sw[1];\n sw = cswap(swap, z_2, z_3);\n z_2 = sw[0];\n z_3 = sw[1];\n swap = k_t;\n const A = x_2 + z_2;\n const AA = modP(A * A);\n const B = x_2 - z_2;\n const BB = modP(B * B);\n const E = AA - BB;\n const C = x_3 + z_3;\n const D = x_3 - z_3;\n const DA = modP(D * A);\n const CB = modP(C * B);\n const dacb = DA + CB;\n const da_cb = DA - CB;\n x_3 = modP(dacb * dacb);\n z_3 = modP(x_1 * modP(da_cb * da_cb));\n x_2 = modP(AA * BB);\n z_2 = modP(E * (AA + modP(a24 * E)));\n }\n // (x_2, x_3) = cswap(swap, x_2, x_3)\n sw = cswap(swap, x_2, x_3);\n x_2 = sw[0];\n x_3 = sw[1];\n // (z_2, z_3) = cswap(swap, z_2, z_3)\n sw = cswap(swap, z_2, z_3);\n z_2 = sw[0];\n z_3 = sw[1];\n // z_2^(p - 2)\n const z2 = powPminus2(z_2);\n // Return x_2 * (z_2^(p - 2))\n return modP(x_2 * z2);\n }\n function encodeUCoordinate(u) {\n return numberToBytesLE(modP(u), montgomeryBytes);\n }\n function decodeUCoordinate(uEnc) {\n // Section 5: When receiving such an array, implementations of X25519\n // MUST mask the most significant bit in the final byte.\n // This is very ugly way, but it works because fieldLen-1 is outside of bounds for X448, so this becomes NOOP\n // fieldLen - scalaryBytes = 1 for X448 and = 0 for X25519\n const u = ensureBytes('u coordinate', uEnc, montgomeryBytes);\n // u[fieldLen-1] crashes QuickJS (TypeError: out-of-bound numeric index)\n if (fieldLen === montgomeryBytes)\n u[fieldLen - 1] &= 127; // 0b0111_1111\n return bytesToNumberLE(u);\n }\n function decodeScalar(n) {\n const bytes = ensureBytes('scalar', n);\n if (bytes.length !== montgomeryBytes && bytes.length !== fieldLen)\n throw new Error(`Expected ${montgomeryBytes} or ${fieldLen} bytes, got ${bytes.length}`);\n return bytesToNumberLE(adjustScalarBytes(bytes));\n }\n function scalarMult(scalar, u) {\n const pointU = decodeUCoordinate(u);\n const _scalar = decodeScalar(scalar);\n const pu = montgomeryLadder(pointU, _scalar);\n // The result was not contributory\n // https://cr.yp.to/ecdh.html#validate\n if (pu === _0n)\n throw new Error('Invalid private or public key received');\n return encodeUCoordinate(pu);\n }\n // Computes public key from private. By doing scalar multiplication of base point.\n const GuBytes = encodeUCoordinate(CURVE.Gu);\n function scalarMultBase(scalar) {\n return scalarMult(scalar, GuBytes);\n }\n return {\n scalarMult,\n scalarMultBase,\n getSharedSecret: (privateKey, publicKey) => scalarMult(privateKey, publicKey),\n getPublicKey: (privateKey) => scalarMultBase(privateKey),\n utils: { randomPrivateKey: () => CURVE.randomBytes(CURVE.nByteLength) },\n GuBytes: GuBytes,\n };\n}\n//# sourceMappingURL=montgomery.js.map","import { mod } from './modular.js';\nimport { bytesToNumberBE, concatBytes, utf8ToBytes, validateObject } from './utils.js';\nfunction validateDST(dst) {\n if (dst instanceof Uint8Array)\n return dst;\n if (typeof dst === 'string')\n return utf8ToBytes(dst);\n throw new Error('DST must be Uint8Array or string');\n}\n// Octet Stream to Integer. \"spec\" implementation of os2ip is 2.5x slower vs bytesToNumberBE.\nconst os2ip = bytesToNumberBE;\n// Integer to Octet Stream (numberToBytesBE)\nfunction i2osp(value, length) {\n if (value < 0 || value >= 1 << (8 * length)) {\n throw new Error(`bad I2OSP call: value=${value} length=${length}`);\n }\n const res = Array.from({ length }).fill(0);\n for (let i = length - 1; i >= 0; i--) {\n res[i] = value & 0xff;\n value >>>= 8;\n }\n return new Uint8Array(res);\n}\nfunction strxor(a, b) {\n const arr = new Uint8Array(a.length);\n for (let i = 0; i < a.length; i++) {\n arr[i] = a[i] ^ b[i];\n }\n return arr;\n}\nfunction isBytes(item) {\n if (!(item instanceof Uint8Array))\n throw new Error('Uint8Array expected');\n}\nfunction isNum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error('number expected');\n}\n// Produces a uniformly random byte string using a cryptographic hash function H that outputs b bits\n// https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-11#section-5.4.1\nexport function expand_message_xmd(msg, DST, lenInBytes, H) {\n isBytes(msg);\n isBytes(DST);\n isNum(lenInBytes);\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-5.3.3\n if (DST.length > 255)\n DST = H(concatBytes(utf8ToBytes('H2C-OVERSIZE-DST-'), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (ell > 255)\n throw new Error('Invalid xmd length');\n const DST_prime = concatBytes(DST, i2osp(DST.length, 1));\n const Z_pad = i2osp(0, r_in_bytes);\n const l_i_b_str = i2osp(lenInBytes, 2); // len_in_bytes_str\n const b = new Array(ell);\n const b_0 = H(concatBytes(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));\n b[0] = H(concatBytes(b_0, i2osp(1, 1), DST_prime));\n for (let i = 1; i <= ell; i++) {\n const args = [strxor(b_0, b[i - 1]), i2osp(i + 1, 1), DST_prime];\n b[i] = H(concatBytes(...args));\n }\n const pseudo_random_bytes = concatBytes(...b);\n return pseudo_random_bytes.slice(0, lenInBytes);\n}\nexport function expand_message_xof(msg, DST, lenInBytes, k, H) {\n isBytes(msg);\n isBytes(DST);\n isNum(lenInBytes);\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-5.3.3\n // DST = H('H2C-OVERSIZE-DST-' || a_very_long_DST, Math.ceil((lenInBytes * k) / 8));\n if (DST.length > 255) {\n const dkLen = Math.ceil((2 * k) / 8);\n DST = H.create({ dkLen }).update(utf8ToBytes('H2C-OVERSIZE-DST-')).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error('expand_message_xof: invalid lenInBytes');\n return (H.create({ dkLen: lenInBytes })\n .update(msg)\n .update(i2osp(lenInBytes, 2))\n // 2. DST_prime = DST || I2OSP(len(DST), 1)\n .update(DST)\n .update(i2osp(DST.length, 1))\n .digest());\n}\n/**\n * Hashes arbitrary-length byte strings to a list of one or more elements of a finite field F\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-11#section-5.3\n * @param msg a byte string containing the message to hash\n * @param count the number of elements of F to output\n * @param options `{DST: string, p: bigint, m: number, k: number, expand: 'xmd' | 'xof', hash: H}`, see above\n * @returns [u_0, ..., u_(count - 1)], a list of field elements.\n */\nexport function hash_to_field(msg, count, options) {\n validateObject(options, {\n DST: 'string',\n p: 'bigint',\n m: 'isSafeInteger',\n k: 'isSafeInteger',\n hash: 'hash',\n });\n const { p, k, m, hash, expand, DST: _DST } = options;\n isBytes(msg);\n isNum(count);\n const DST = validateDST(_DST);\n const log2p = p.toString(2).length;\n const L = Math.ceil((log2p + k) / 8); // section 5.1 of ietf draft link above\n const len_in_bytes = count * m * L;\n let prb; // pseudo_random_bytes\n if (expand === 'xmd') {\n prb = expand_message_xmd(msg, DST, len_in_bytes, hash);\n }\n else if (expand === 'xof') {\n prb = expand_message_xof(msg, DST, len_in_bytes, k, hash);\n }\n else if (expand === '_internal_pass') {\n // for internal tests only\n prb = msg;\n }\n else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u = new Array(count);\n for (let i = 0; i < count; i++) {\n const e = new Array(m);\n for (let j = 0; j < m; j++) {\n const elm_offset = L * (j + i * m);\n const tv = prb.subarray(elm_offset, elm_offset + L);\n e[j] = mod(os2ip(tv), p);\n }\n u[i] = e;\n }\n return u;\n}\nexport function isogenyMap(field, map) {\n // Make same order as in spec\n const COEFF = map.map((i) => Array.from(i).reverse());\n return (x, y) => {\n const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));\n x = field.div(xNum, xDen); // xNum / xDen\n y = field.mul(y, field.div(yNum, yDen)); // y * (yNum / yDev)\n return { x, y };\n };\n}\nexport function createHasher(Point, mapToCurve, def) {\n if (typeof mapToCurve !== 'function')\n throw new Error('mapToCurve() must be defined');\n return {\n // Encodes byte string to elliptic curve\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-3\n hashToCurve(msg, options) {\n const u = hash_to_field(msg, 2, { ...def, DST: def.DST, ...options });\n const u0 = Point.fromAffine(mapToCurve(u[0]));\n const u1 = Point.fromAffine(mapToCurve(u[1]));\n const P = u0.add(u1).clearCofactor();\n P.assertValidity();\n return P;\n },\n // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16#section-3\n encodeToCurve(msg, options) {\n const u = hash_to_field(msg, 1, { ...def, DST: def.encodeDST, ...options });\n const P = Point.fromAffine(mapToCurve(u[0])).clearCofactor();\n P.assertValidity();\n return P;\n },\n };\n}\n//# sourceMappingURL=hash-to-curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha512 } from '@noble/hashes/sha512';\nimport { concatBytes, randomBytes, utf8ToBytes } from '@noble/hashes/utils';\nimport { twistedEdwards } from './abstract/edwards.js';\nimport { montgomery } from './abstract/montgomery.js';\nimport { mod, pow2, isNegativeLE, Field, FpSqrtEven } from './abstract/modular.js';\nimport { equalBytes, bytesToHex, bytesToNumberLE, numberToBytesLE, ensureBytes, } from './abstract/utils.js';\nimport * as htf from './abstract/hash-to-curve.js';\n/**\n * ed25519 Twisted Edwards curve with following addons:\n * - X25519 ECDH\n * - Ristretto cofactor elimination\n * - Elligator hash-to-group / point indistinguishability\n */\nconst ED25519_P = BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819949');\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst ED25519_SQRT_M1 = BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _5n = BigInt(5);\n// prettier-ignore\nconst _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\nfunction ed25519_pow_2_252_3(x) {\n const P = ED25519_P;\n const x2 = (x * x) % P;\n const b2 = (x2 * x) % P; // x^3, 11\n const b4 = (pow2(b2, _2n, P) * b2) % P; // x^15, 1111\n const b5 = (pow2(b4, _1n, P) * x) % P; // x^31\n const b10 = (pow2(b5, _5n, P) * b5) % P;\n const b20 = (pow2(b10, _10n, P) * b10) % P;\n const b40 = (pow2(b20, _20n, P) * b20) % P;\n const b80 = (pow2(b40, _40n, P) * b40) % P;\n const b160 = (pow2(b80, _80n, P) * b80) % P;\n const b240 = (pow2(b160, _80n, P) * b80) % P;\n const b250 = (pow2(b240, _10n, P) * b10) % P;\n const pow_p_5_8 = (pow2(b250, _2n, P) * x) % P;\n // ^ To pow to (p+3)/8, multiply it by x.\n return { pow_p_5_8, b2 };\n}\nfunction adjustScalarBytes(bytes) {\n // Section 5: For X25519, in order to decode 32 random bytes as an integer scalar,\n // set the three least significant bits of the first byte\n bytes[0] &= 248; // 0b1111_1000\n // and the most significant bit of the last to zero,\n bytes[31] &= 127; // 0b0111_1111\n // set the second most significant bit of the last byte to 1\n bytes[31] |= 64; // 0b0100_0000\n return bytes;\n}\n// sqrt(u/v)\nfunction uvRatio(u, v) {\n const P = ED25519_P;\n const v3 = mod(v * v * v, P); // v³\n const v7 = mod(v3 * v3 * v, P); // v⁷\n // (p+3)/8 and (p-5)/8\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = mod(u * v3 * pow, P); // (uv³)(uv⁷)^(p-5)/8\n const vx2 = mod(v * x * x, P); // vx²\n const root1 = x; // First root candidate\n const root2 = mod(x * ED25519_SQRT_M1, P); // Second root candidate\n const useRoot1 = vx2 === u; // If vx² = u (mod p), x is a square root\n const useRoot2 = vx2 === mod(-u, P); // If vx² = -u, set x <-- x * 2^((p-1)/4)\n const noRoot = vx2 === mod(-u * ED25519_SQRT_M1, P); // There is no valid root, vx² = -u√(-1)\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2; // We return root2 anyway, for const-time\n if (isNegativeLE(x, P))\n x = mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n}\n// Just in case\nexport const ED25519_TORSION_SUBGROUP = [\n '0100000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a',\n '0000000000000000000000000000000000000000000000000000000000000080',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05',\n 'ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85',\n '0000000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa',\n];\nconst Fp = Field(ED25519_P, undefined, true);\nconst ed25519Defaults = {\n // Param: a\n a: BigInt(-1),\n // d is equal to -121665/121666 over finite field.\n // Negative number is P - number, and division is invert(number, P)\n d: BigInt('37095705934669439343138083508754565189542113879843219016388785533085940283555'),\n // Finite field 𝔽p over which we'll do calculations; 2n ** 255n - 19n\n Fp,\n // Subgroup order: how many points curve has\n // 2n ** 252n + 27742317777372353535851937790883648493n;\n n: BigInt('7237005577332262213973186563042994240857116359379907606001950938285454250989'),\n // Cofactor\n h: BigInt(8),\n // Base point (x, y) aka generator point\n Gx: BigInt('15112221349535400772501151409588531511454012693041857206046113283949847762202'),\n Gy: BigInt('46316835694926478169428394003475163141307993866256225615783033603165251855960'),\n hash: sha512,\n randomBytes,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio,\n};\nexport const ed25519 = twistedEdwards(ed25519Defaults);\nfunction ed25519_domain(data, ctx, phflag) {\n if (ctx.length > 255)\n throw new Error('Context is too big');\n return concatBytes(utf8ToBytes('SigEd25519 no Ed25519 collisions'), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);\n}\nexport const ed25519ctx = twistedEdwards({ ...ed25519Defaults, domain: ed25519_domain });\nexport const ed25519ph = twistedEdwards({\n ...ed25519Defaults,\n domain: ed25519_domain,\n prehash: sha512,\n});\nexport const x25519 = montgomery({\n P: ED25519_P,\n a: BigInt(486662),\n montgomeryBits: 255,\n nByteLength: 32,\n Gu: BigInt(9),\n powPminus2: (x) => {\n const P = ED25519_P;\n // x^(p-2) aka x^(2^255-21)\n const { pow_p_5_8, b2 } = ed25519_pow_2_252_3(x);\n return mod(pow2(pow_p_5_8, BigInt(3), P) * b2, P);\n },\n adjustScalarBytes,\n randomBytes,\n});\n/**\n * Converts ed25519 public key to x25519 public key. Uses formula:\n * * `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * * `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * @example\n * const aPub = ed25519.getPublicKey(utils.randomPrivateKey());\n * x25519.getSharedSecret(edwardsToMontgomery(aPub), edwardsToMontgomery(someonesPub))\n */\nexport function edwardsToMontgomery(edwardsPub) {\n const { y } = ed25519.ExtendedPoint.fromHex(edwardsPub);\n const _1n = BigInt(1);\n return Fp.toBytes(Fp.create((y - _1n) * Fp.inv(y + _1n)));\n}\n// Hash To Curve Elligator2 Map (NOTE: different from ristretto255 elligator)\n// NOTE: very important part is usage of FpSqrtEven for ELL2_C1_EDWARDS, since\n// SageMath returns different root first and everything falls apart\nconst ELL2_C1 = (Fp.ORDER + BigInt(3)) / BigInt(8); // 1. c1 = (q + 3) / 8 # Integer arithmetic\nconst ELL2_C2 = Fp.pow(_2n, ELL2_C1); // 2. c2 = 2^c1\nconst ELL2_C3 = Fp.sqrt(Fp.neg(Fp.ONE)); // 3. c3 = sqrt(-1)\nconst ELL2_C4 = (Fp.ORDER - BigInt(5)) / BigInt(8); // 4. c4 = (q - 5) / 8 # Integer arithmetic\nconst ELL2_J = BigInt(486662);\n// prettier-ignore\nfunction map_to_curve_elligator2_curve25519(u) {\n let tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, _2n); // 2. tv1 = 2 * tv1\n let xd = Fp.add(tv1, Fp.ONE); // 3. xd = tv1 + 1 # Nonzero: -1 is square (mod p), tv1 is not\n let x1n = Fp.neg(ELL2_J); // 4. x1n = -J # x1 = x1n / xd = -J / (1 + 2 * u^2)\n let tv2 = Fp.sqr(xd); // 5. tv2 = xd^2\n let gxd = Fp.mul(tv2, xd); // 6. gxd = tv2 * xd # gxd = xd^3\n let gx1 = Fp.mul(tv1, ELL2_J); // 7. gx1 = J * tv1 # x1n + J * xd\n gx1 = Fp.mul(gx1, x1n); // 8. gx1 = gx1 * x1n # x1n^2 + J * x1n * xd\n gx1 = Fp.add(gx1, tv2); // 9. gx1 = gx1 + tv2 # x1n^2 + J * x1n * xd + xd^2\n gx1 = Fp.mul(gx1, x1n); // 10. gx1 = gx1 * x1n # x1n^3 + J * x1n^2 * xd + x1n * xd^2\n let tv3 = Fp.sqr(gxd); // 11. tv3 = gxd^2\n tv2 = Fp.sqr(tv3); // 12. tv2 = tv3^2 # gxd^4\n tv3 = Fp.mul(tv3, gxd); // 13. tv3 = tv3 * gxd # gxd^3\n tv3 = Fp.mul(tv3, gx1); // 14. tv3 = tv3 * gx1 # gx1 * gxd^3\n tv2 = Fp.mul(tv2, tv3); // 15. tv2 = tv2 * tv3 # gx1 * gxd^7\n let y11 = Fp.pow(tv2, ELL2_C4); // 16. y11 = tv2^c4 # (gx1 * gxd^7)^((p - 5) / 8)\n y11 = Fp.mul(y11, tv3); // 17. y11 = y11 * tv3 # gx1*gxd^3*(gx1*gxd^7)^((p-5)/8)\n let y12 = Fp.mul(y11, ELL2_C3); // 18. y12 = y11 * c3\n tv2 = Fp.sqr(y11); // 19. tv2 = y11^2\n tv2 = Fp.mul(tv2, gxd); // 20. tv2 = tv2 * gxd\n let e1 = Fp.eql(tv2, gx1); // 21. e1 = tv2 == gx1\n let y1 = Fp.cmov(y12, y11, e1); // 22. y1 = CMOV(y12, y11, e1) # If g(x1) is square, this is its sqrt\n let x2n = Fp.mul(x1n, tv1); // 23. x2n = x1n * tv1 # x2 = x2n / xd = 2 * u^2 * x1n / xd\n let y21 = Fp.mul(y11, u); // 24. y21 = y11 * u\n y21 = Fp.mul(y21, ELL2_C2); // 25. y21 = y21 * c2\n let y22 = Fp.mul(y21, ELL2_C3); // 26. y22 = y21 * c3\n let gx2 = Fp.mul(gx1, tv1); // 27. gx2 = gx1 * tv1 # g(x2) = gx2 / gxd = 2 * u^2 * g(x1)\n tv2 = Fp.sqr(y21); // 28. tv2 = y21^2\n tv2 = Fp.mul(tv2, gxd); // 29. tv2 = tv2 * gxd\n let e2 = Fp.eql(tv2, gx2); // 30. e2 = tv2 == gx2\n let y2 = Fp.cmov(y22, y21, e2); // 31. y2 = CMOV(y22, y21, e2) # If g(x2) is square, this is its sqrt\n tv2 = Fp.sqr(y1); // 32. tv2 = y1^2\n tv2 = Fp.mul(tv2, gxd); // 33. tv2 = tv2 * gxd\n let e3 = Fp.eql(tv2, gx1); // 34. e3 = tv2 == gx1\n let xn = Fp.cmov(x2n, x1n, e3); // 35. xn = CMOV(x2n, x1n, e3) # If e3, x = x1, else x = x2\n let y = Fp.cmov(y2, y1, e3); // 36. y = CMOV(y2, y1, e3) # If e3, y = y1, else y = y2\n let e4 = Fp.isOdd(y); // 37. e4 = sgn0(y) == 1 # Fix sign of y\n y = Fp.cmov(y, Fp.neg(y), e3 !== e4); // 38. y = CMOV(y, -y, e3 XOR e4)\n return { xMn: xn, xMd: xd, yMn: y, yMd: _1n }; // 39. return (xn, xd, y, 1)\n}\nconst ELL2_C1_EDWARDS = FpSqrtEven(Fp, Fp.neg(BigInt(486664))); // sgn0(c1) MUST equal 0\nfunction map_to_curve_elligator2_edwards25519(u) {\n const { xMn, xMd, yMn, yMd } = map_to_curve_elligator2_curve25519(u); // 1. (xMn, xMd, yMn, yMd) = map_to_curve_elligator2_curve25519(u)\n let xn = Fp.mul(xMn, yMd); // 2. xn = xMn * yMd\n xn = Fp.mul(xn, ELL2_C1_EDWARDS); // 3. xn = xn * c1\n let xd = Fp.mul(xMd, yMn); // 4. xd = xMd * yMn # xn / xd = c1 * xM / yM\n let yn = Fp.sub(xMn, xMd); // 5. yn = xMn - xMd\n let yd = Fp.add(xMn, xMd); // 6. yd = xMn + xMd # (n / d - 1) / (n / d + 1) = (n - d) / (n + d)\n let tv1 = Fp.mul(xd, yd); // 7. tv1 = xd * yd\n let e = Fp.eql(tv1, Fp.ZERO); // 8. e = tv1 == 0\n xn = Fp.cmov(xn, Fp.ZERO, e); // 9. xn = CMOV(xn, 0, e)\n xd = Fp.cmov(xd, Fp.ONE, e); // 10. xd = CMOV(xd, 1, e)\n yn = Fp.cmov(yn, Fp.ONE, e); // 11. yn = CMOV(yn, 1, e)\n yd = Fp.cmov(yd, Fp.ONE, e); // 12. yd = CMOV(yd, 1, e)\n const inv = Fp.invertBatch([xd, yd]); // batch division\n return { x: Fp.mul(xn, inv[0]), y: Fp.mul(yn, inv[1]) }; // 13. return (xn, xd, yn, yd)\n}\nconst { hashToCurve, encodeToCurve } = htf.createHasher(ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {\n DST: 'edwards25519_XMD:SHA-512_ELL2_RO_',\n encodeDST: 'edwards25519_XMD:SHA-512_ELL2_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha512,\n});\nexport { hashToCurve, encodeToCurve };\nfunction assertRstPoint(other) {\n if (!(other instanceof RistrettoPoint))\n throw new Error('RistrettoPoint expected');\n}\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst SQRT_M1 = BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// √(ad - 1)\nconst SQRT_AD_MINUS_ONE = BigInt('25063068953384623474111414158702152701244531502492656460079210482610430750235');\n// 1 / √(a-d)\nconst INVSQRT_A_MINUS_D = BigInt('54469307008909316920995813868745141605393597292927456921205312896311721017578');\n// 1-d²\nconst ONE_MINUS_D_SQ = BigInt('1159843021668779879193775521855586647937357759715417654439879720876111806838');\n// (d-1)²\nconst D_MINUS_ONE_SQ = BigInt('40440834346308536858101042469323190826248399146238708352240133220865137265952');\n// Calculates 1/√(number)\nconst invertSqrt = (number) => uvRatio(_1n, number);\nconst MAX_255B = BigInt('0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');\nconst bytes255ToNumberLE = (bytes) => ed25519.CURVE.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n// Computes Elligator map for Ristretto\n// https://ristretto.group/formulas/elligator.html\nfunction calcElligatorRistrettoMap(r0) {\n const { d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const r = mod(SQRT_M1 * r0 * r0); // 1\n const Ns = mod((r + _1n) * ONE_MINUS_D_SQ); // 2\n let c = BigInt(-1); // 3\n const D = mod((c - d * r) * mod(r + d)); // 4\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D); // 5\n let s_ = mod(s * r0); // 6\n if (!isNegativeLE(s_, P))\n s_ = mod(-s_);\n if (!Ns_D_is_sq)\n s = s_; // 7\n if (!Ns_D_is_sq)\n c = r; // 8\n const Nt = mod(c * (r - _1n) * D_MINUS_ONE_SQ - D); // 9\n const s2 = s * s;\n const W0 = mod((s + s) * D); // 10\n const W1 = mod(Nt * SQRT_AD_MINUS_ONE); // 11\n const W2 = mod(_1n - s2); // 12\n const W3 = mod(_1n + s2); // 13\n return new ed25519.ExtendedPoint(mod(W0 * W3), mod(W2 * W1), mod(W1 * W3), mod(W0 * W2));\n}\n/**\n * Each ed25519/ExtendedPoint has 8 different equivalent points. This can be\n * a source of bugs for protocols like ring signatures. Ristretto was created to solve this.\n * Ristretto point operates in X:Y:Z:T extended coordinates like ExtendedPoint,\n * but it should work in its own namespace: do not combine those two.\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-ristretto255-decaf448\n */\nclass RistrettoPoint {\n // Private property to discourage combining ExtendedPoint + RistrettoPoint\n // Always use Ristretto encoding/decoding instead.\n constructor(ep) {\n this.ep = ep;\n }\n static fromAffine(ap) {\n return new RistrettoPoint(ed25519.ExtendedPoint.fromAffine(ap));\n }\n /**\n * Takes uniform output of 64-bit hash function like sha512 and converts it to `RistrettoPoint`.\n * The hash-to-group operation applies Elligator twice and adds the results.\n * **Note:** this is one-way map, there is no conversion from point to hash.\n * https://ristretto.group/formulas/elligator.html\n * @param hex 64-bit output of a hash function\n */\n static hashToCurve(hex) {\n hex = ensureBytes('ristrettoHash', hex, 64);\n const r1 = bytes255ToNumberLE(hex.slice(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(hex.slice(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new RistrettoPoint(R1.add(R2));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * https://ristretto.group/formulas/decoding.html\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n hex = ensureBytes('ristrettoHex', hex, 32);\n const { a, d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const emsg = 'RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint';\n const s = bytes255ToNumberLE(hex);\n // 1. Check that s_bytes is the canonical encoding of a field element, or else abort.\n // 3. Check that s is non-negative, or else abort\n if (!equalBytes(numberToBytesLE(s, 32), hex) || isNegativeLE(s, P))\n throw new Error(emsg);\n const s2 = mod(s * s);\n const u1 = mod(_1n + a * s2); // 4 (a is -1)\n const u2 = mod(_1n - a * s2); // 5\n const u1_2 = mod(u1 * u1);\n const u2_2 = mod(u2 * u2);\n const v = mod(a * d * u1_2 - u2_2); // 6\n const { isValid, value: I } = invertSqrt(mod(v * u2_2)); // 7\n const Dx = mod(I * u2); // 8\n const Dy = mod(I * Dx * v); // 9\n let x = mod((s + s) * Dx); // 10\n if (isNegativeLE(x, P))\n x = mod(-x); // 10\n const y = mod(u1 * Dy); // 11\n const t = mod(x * y); // 12\n if (!isValid || isNegativeLE(t, P) || y === _0n)\n throw new Error(emsg);\n return new RistrettoPoint(new ed25519.ExtendedPoint(x, y, _1n, t));\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * https://ristretto.group/formulas/encoding.html\n */\n toRawBytes() {\n let { ex: x, ey: y, ez: z, et: t } = this.ep;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const u1 = mod(mod(z + y) * mod(z - y)); // 1\n const u2 = mod(x * y); // 2\n // Square root always exists\n const u2sq = mod(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod(u1 * u2sq)); // 3\n const D1 = mod(invsqrt * u1); // 4\n const D2 = mod(invsqrt * u2); // 5\n const zInv = mod(D1 * D2 * t); // 6\n let D; // 7\n if (isNegativeLE(t * zInv, P)) {\n let _x = mod(y * SQRT_M1);\n let _y = mod(x * SQRT_M1);\n x = _x;\n y = _y;\n D = mod(D1 * INVSQRT_A_MINUS_D);\n }\n else {\n D = D2; // 8\n }\n if (isNegativeLE(x * zInv, P))\n y = mod(-y); // 9\n let s = mod((z - y) * D); // 10 (check footer's note, no sqrt(-a))\n if (isNegativeLE(s, P))\n s = mod(-s);\n return numberToBytesLE(s, 32); // 11\n }\n toHex() {\n return bytesToHex(this.toRawBytes());\n }\n toString() {\n return this.toHex();\n }\n // Compare one point to another.\n equals(other) {\n assertRstPoint(other);\n const { ex: X1, ey: Y1 } = this.ep;\n const { ex: X2, ey: Y2 } = other.ep;\n const mod = ed25519.CURVE.Fp.create;\n // (x1 * y2 == y1 * x2) | (y1 * y2 == x1 * x2)\n const one = mod(X1 * Y2) === mod(Y1 * X2);\n const two = mod(Y1 * Y2) === mod(X1 * X2);\n return one || two;\n }\n add(other) {\n assertRstPoint(other);\n return new RistrettoPoint(this.ep.add(other.ep));\n }\n subtract(other) {\n assertRstPoint(other);\n return new RistrettoPoint(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return new RistrettoPoint(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return new RistrettoPoint(this.ep.multiplyUnsafe(scalar));\n }\n}\nRistrettoPoint.BASE = new RistrettoPoint(ed25519.ExtendedPoint.BASE);\nRistrettoPoint.ZERO = new RistrettoPoint(ed25519.ExtendedPoint.ZERO);\nexport { RistrettoPoint };\n// https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve/14/\n// Appendix B. Hashing to ristretto255\nexport const hash_to_ristretto255 = (msg, options) => {\n const d = options.DST;\n const DST = typeof d === 'string' ? utf8ToBytes(d) : d;\n const uniform_bytes = htf.expand_message_xmd(msg, DST, 64, sha512);\n const P = RistrettoPoint.hashToCurve(uniform_bytes);\n return P;\n};\n//# sourceMappingURL=ed25519.js.map","import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict'\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\n// @ts-ignore\nvar _Buffer = require('safe-buffer').Buffer\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source) }\n if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return _Buffer.alloc(0) }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (source[psz]) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4))\n vch.fill(0x00, 0, zeroes)\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import assert from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n assert.exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map","import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = wrapConstructor(() => new SHA256());\nexport const sha224 = wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","'use strict';\n\n// This is free and unencumbered software released into the public domain.\n// See LICENSE.md for more information.\n\n//\n// Utilities\n//\n\n/**\n * @param {number} a The number to test.\n * @param {number} min The minimum value in the range, inclusive.\n * @param {number} max The maximum value in the range, inclusive.\n * @return {boolean} True if a >= min and a <= max.\n */\nfunction inRange(a, min, max) {\n return min <= a && a <= max;\n}\n\n/**\n * @param {*} o\n * @return {Object}\n */\nfunction ToDictionary(o) {\n if (o === undefined) return {};\n if (o === Object(o)) return o;\n throw TypeError('Could not convert argument to dictionary');\n}\n\n/**\n * @param {string} string Input string of UTF-16 code units.\n * @return {!Array.} Code points.\n */\nfunction stringToCodePoints(string) {\n // https://heycam.github.io/webidl/#dfn-obtain-unicode\n\n // 1. Let S be the DOMString value.\n var s = String(string);\n\n // 2. Let n be the length of S.\n var n = s.length;\n\n // 3. Initialize i to 0.\n var i = 0;\n\n // 4. Initialize U to be an empty sequence of Unicode characters.\n var u = [];\n\n // 5. While i < n:\n while (i < n) {\n\n // 1. Let c be the code unit in S at index i.\n var c = s.charCodeAt(i);\n\n // 2. Depending on the value of c:\n\n // c < 0xD800 or c > 0xDFFF\n if (c < 0xD800 || c > 0xDFFF) {\n // Append to U the Unicode character with code point c.\n u.push(c);\n }\n\n // 0xDC00 ≤ c ≤ 0xDFFF\n else if (0xDC00 <= c && c <= 0xDFFF) {\n // Append to U a U+FFFD REPLACEMENT CHARACTER.\n u.push(0xFFFD);\n }\n\n // 0xD800 ≤ c ≤ 0xDBFF\n else if (0xD800 <= c && c <= 0xDBFF) {\n // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT\n // CHARACTER.\n if (i === n - 1) {\n u.push(0xFFFD);\n }\n // 2. Otherwise, i < n−1:\n else {\n // 1. Let d be the code unit in S at index i+1.\n var d = string.charCodeAt(i + 1);\n\n // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:\n if (0xDC00 <= d && d <= 0xDFFF) {\n // 1. Let a be c & 0x3FF.\n var a = c & 0x3FF;\n\n // 2. Let b be d & 0x3FF.\n var b = d & 0x3FF;\n\n // 3. Append to U the Unicode character with code point\n // 2^16+2^10*a+b.\n u.push(0x10000 + (a << 10) + b);\n\n // 4. Set i to i+1.\n i += 1;\n }\n\n // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a\n // U+FFFD REPLACEMENT CHARACTER.\n else {\n u.push(0xFFFD);\n }\n }\n }\n\n // 3. Set i to i+1.\n i += 1;\n }\n\n // 6. Return U.\n return u;\n}\n\n/**\n * @param {!Array.} code_points Array of code points.\n * @return {string} string String of UTF-16 code units.\n */\nfunction codePointsToString(code_points) {\n var s = '';\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 0xFFFF) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 0x10000;\n s += String.fromCharCode((cp >> 10) + 0xD800,\n (cp & 0x3FF) + 0xDC00);\n }\n }\n return s;\n}\n\n\n//\n// Implementation of Encoding specification\n// https://encoding.spec.whatwg.org/\n//\n\n//\n// 3. Terminology\n//\n\n/**\n * End-of-stream is a special token that signifies no more tokens\n * are in the stream.\n * @const\n */ var end_of_stream = -1;\n\n/**\n * A stream represents an ordered sequence of tokens.\n *\n * @constructor\n * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide the\n * stream.\n */\nfunction Stream(tokens) {\n /** @type {!Array.} */\n this.tokens = [].slice.call(tokens);\n}\n\nStream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n};\n\n//\n// 4. Encodings\n//\n\n// 4.1 Encoders and decoders\n\n/** @const */\nvar finished = -1;\n\n/**\n * @param {boolean} fatal If true, decoding errors raise an exception.\n * @param {number=} opt_code_point Override the standard fallback code point.\n * @return {number} The code point to insert on a decoding error.\n */\nfunction decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError('Decoder error');\n return opt_code_point || 0xFFFD;\n}\n\n//\n// 7. API\n//\n\n/** @const */ var DEFAULT_ENCODING = 'utf-8';\n\n// 7.1 Interface TextDecoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextDecoder(encoding, options) {\n if (!(this instanceof TextDecoder)) {\n return new TextDecoder(encoding, options);\n }\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {boolean} */\n this._BOMseen = false;\n /** @private @type {?Decoder} */\n this._decoder = null;\n /** @private @type {boolean} */\n this._fatal = Boolean(options['fatal']);\n /** @private @type {boolean} */\n this._ignoreBOM = Boolean(options['ignoreBOM']);\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n Object.defineProperty(this, 'fatal', {value: this._fatal});\n Object.defineProperty(this, 'ignoreBOM', {value: this._ignoreBOM});\n}\n\nTextDecoder.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === 'object' && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === 'object' && 'buffer' in input &&\n input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(input.buffer,\n input.byteOffset,\n input.byteLength);\n } else {\n bytes = new Uint8Array(0);\n }\n\n options = ToDictionary(options);\n\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({fatal: this._fatal});\n this._BOMseen = false;\n }\n this._streaming = Boolean(options['stream']);\n\n var input_stream = new Stream(bytes);\n\n var code_points = [];\n\n /** @type {?(number|!Array.)} */\n var result;\n\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n\n if (code_points.length) {\n // If encoding is one of utf-8, utf-16be, and utf-16le, and\n // ignore BOM flag and BOM seen flag are unset, run these\n // subsubsteps:\n if (['utf-8'].indexOf(this.encoding) !== -1 &&\n !this._ignoreBOM && !this._BOMseen) {\n // If token is U+FEFF, set BOM seen flag.\n if (code_points[0] === 0xFEFF) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n // Otherwise, if token is not end-of-stream, set BOM seen\n // flag and append token to output.\n this._BOMseen = true;\n }\n }\n }\n\n return codePointsToString(code_points);\n }\n};\n\n// 7.2 Interface TextEncoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextEncoder(encoding, options) {\n if (!(this instanceof TextEncoder))\n return new TextEncoder(encoding, options);\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {?Encoder} */\n this._encoder = null;\n /** @private @type {{fatal: boolean}} */\n this._options = {fatal: Boolean(options['fatal'])};\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n}\n\nTextEncoder.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : '';\n options = ToDictionary(options);\n\n // NOTE: This option is nonstandard. None of the encodings\n // permitted for encoding (i.e. UTF-8, UTF-16) are stateful,\n // so streaming is not necessary.\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options['stream']);\n\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n /** @type {?(number|!Array.)} */\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n};\n\n//\n// 8. The encoding\n//\n\n// 8.1 utf-8\n\n/**\n * @constructor\n * @implements {Decoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Decoder(options) {\n var fatal = options.fatal;\n\n // utf-8's decoder's has an associated utf-8 code point, utf-8\n // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8\n // lower boundary (initially 0x80), and a utf-8 upper boundary\n // (initially 0xBF).\n var /** @type {number} */ utf8_code_point = 0,\n /** @type {number} */ utf8_bytes_seen = 0,\n /** @type {number} */ utf8_bytes_needed = 0,\n /** @type {number} */ utf8_lower_boundary = 0x80,\n /** @type {number} */ utf8_upper_boundary = 0xBF;\n\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point.\n */\n this.handler = function(stream, bite) {\n // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,\n // set utf-8 bytes needed to 0 and return error.\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n\n // 2. If byte is end-of-stream, return finished.\n if (bite === end_of_stream)\n return finished;\n\n // 3. If utf-8 bytes needed is 0, based on byte:\n if (utf8_bytes_needed === 0) {\n\n // 0x00 to 0x7F\n if (inRange(bite, 0x00, 0x7F)) {\n // Return a code point whose value is byte.\n return bite;\n }\n\n // 0xC2 to 0xDF\n if (inRange(bite, 0xC2, 0xDF)) {\n // Set utf-8 bytes needed to 1 and utf-8 code point to byte\n // − 0xC0.\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 0xC0;\n }\n\n // 0xE0 to 0xEF\n else if (inRange(bite, 0xE0, 0xEF)) {\n // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.\n if (bite === 0xE0)\n utf8_lower_boundary = 0xA0;\n // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.\n if (bite === 0xED)\n utf8_upper_boundary = 0x9F;\n // 3. Set utf-8 bytes needed to 2 and utf-8 code point to\n // byte − 0xE0.\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 0xE0;\n }\n\n // 0xF0 to 0xF4\n else if (inRange(bite, 0xF0, 0xF4)) {\n // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.\n if (bite === 0xF0)\n utf8_lower_boundary = 0x90;\n // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.\n if (bite === 0xF4)\n utf8_upper_boundary = 0x8F;\n // 3. Set utf-8 bytes needed to 3 and utf-8 code point to\n // byte − 0xF0.\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 0xF0;\n }\n\n // Otherwise\n else {\n // Return error.\n return decoderError(fatal);\n }\n\n // Then (byte is in the range 0xC2 to 0xF4) set utf-8 code\n // point to utf-8 code point << (6 × utf-8 bytes needed) and\n // return continue.\n utf8_code_point = utf8_code_point << (6 * utf8_bytes_needed);\n return null;\n }\n\n // 4. If byte is not in the range utf-8 lower boundary to utf-8\n // upper boundary, run these substeps:\n if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n\n // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8\n // bytes seen to 0, set utf-8 lower boundary to 0x80, and set\n // utf-8 upper boundary to 0xBF.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 2. Prepend byte to stream.\n stream.prepend(bite);\n\n // 3. Return error.\n return decoderError(fatal);\n }\n\n // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary\n // to 0xBF.\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 6. Increase utf-8 bytes seen by one and set utf-8 code point\n // to utf-8 code point + (byte − 0x80) << (6 × (utf-8 bytes\n // needed − utf-8 bytes seen)).\n utf8_bytes_seen += 1;\n utf8_code_point += (bite - 0x80) << (6 * (utf8_bytes_needed - utf8_bytes_seen));\n\n // 7. If utf-8 bytes seen is not equal to utf-8 bytes needed,\n // continue.\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n\n // 8. Let code point be utf-8 code point.\n var code_point = utf8_code_point;\n\n // 9. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes\n // seen to 0.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n\n // 10. Return a code point whose value is code point.\n return code_point;\n };\n}\n\n/**\n * @constructor\n * @implements {Encoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Encoder(options) {\n var fatal = options.fatal;\n /**\n * @param {Stream} stream Input stream.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit.\n */\n this.handler = function(stream, code_point) {\n // 1. If code point is end-of-stream, return finished.\n if (code_point === end_of_stream)\n return finished;\n\n // 2. If code point is in the range U+0000 to U+007F, return a\n // byte whose value is code point.\n if (inRange(code_point, 0x0000, 0x007f))\n return code_point;\n\n // 3. Set count and offset based on the range code point is in:\n var count, offset;\n // U+0080 to U+07FF: 1 and 0xC0\n if (inRange(code_point, 0x0080, 0x07FF)) {\n count = 1;\n offset = 0xC0;\n }\n // U+0800 to U+FFFF: 2 and 0xE0\n else if (inRange(code_point, 0x0800, 0xFFFF)) {\n count = 2;\n offset = 0xE0;\n }\n // U+10000 to U+10FFFF: 3 and 0xF0\n else if (inRange(code_point, 0x10000, 0x10FFFF)) {\n count = 3;\n offset = 0xF0;\n }\n\n // 4.Let bytes be a byte sequence whose first byte is (code\n // point >> (6 × count)) + offset.\n var bytes = [(code_point >> (6 * count)) + offset];\n\n // 5. Run these substeps while count is greater than 0:\n while (count > 0) {\n\n // 1. Set temp to code point >> (6 × (count − 1)).\n var temp = code_point >> (6 * (count - 1));\n\n // 2. Append to bytes 0x80 | (temp & 0x3F).\n bytes.push(0x80 | (temp & 0x3F));\n\n // 3. Decrease count by one.\n count -= 1;\n }\n\n // 6. Return bytes bytes, in order.\n return bytes;\n };\n}\n\nexports.TextEncoder = TextEncoder;\nexports.TextDecoder = TextDecoder;","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserializeUnchecked = exports.deserialize = exports.serialize = exports.BinaryReader = exports.BinaryWriter = exports.BorshError = exports.baseDecode = exports.baseEncode = void 0;\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst bs58_1 = __importDefault(require(\"bs58\"));\n// TODO: Make sure this polyfill not included when not required\nconst encoding = __importStar(require(\"text-encoding-utf-8\"));\nconst ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\nconst textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\nfunction baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer.from(value));\n}\nexports.baseEncode = baseEncode;\nfunction baseDecode(value) {\n return Buffer.from(bs58_1.default.decode(value));\n}\nexports.baseDecode = baseDecode;\nconst INITIAL_LENGTH = 1024;\nclass BorshError extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n // NOTE: Modifying message directly as jest doesn't use .toString()\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n}\nexports.BorshError = BorshError;\n/// Binary encoder.\nclass BinaryWriter {\n constructor() {\n this.buf = Buffer.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer.concat([this.buf, Buffer.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n // Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser\n this.buf = Buffer.concat([\n Buffer.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer.alloc(INITIAL_LENGTH),\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array) {\n this.writeBuffer(Buffer.from(array));\n }\n writeArray(array, fn) {\n this.maybeResize();\n this.writeU32(array.length);\n for (const elem of array) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n}\nexports.BinaryWriter = BinaryWriter;\nfunction handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function (...args) {\n try {\n return originalMethod.apply(this, args);\n }\n catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n}\nclass BinaryReader {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n // NOTE: Using TextDecoder to fail on invalid UTF-8\n return textDecoder.decode(buf);\n }\n catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n}\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU8\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU16\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU32\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU64\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU128\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU256\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU512\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readString\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readFixedArray\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readArray\", null);\nexports.BinaryReader = BinaryReader;\nfunction capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\nfunction serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n // TODO: Handle missing values properly (make sure they never result in just skipped write)\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n }\n else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n }\n else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n }\n else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n }\n else if (fieldType.kind !== undefined) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === undefined) {\n writer.writeU8(0);\n }\n else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n }\n else {\n serializeStruct(schema, value, writer);\n }\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n }\n else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n }\n else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n}\n/// Serialize given object using schema of the form:\n/// { class_name -> [ [field_name, field_type], .. ], .. }\nfunction serialize(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n}\nexports.serialize = serialize;\nfunction deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n }\n else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n }\n else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return undefined;\n }\n if (fieldType.kind === \"map\") {\n let map = new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n}\n/// Deserializes object from bytes using schema.\nfunction deserialize(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n}\nexports.deserialize = deserialize;\n/// Deserializes object from bytes using schema, without checking the length read\nfunction deserializeUnchecked(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n}\nexports.deserializeUnchecked = deserializeUnchecked;\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.s16 = exports.s8 = exports.nu64be = exports.u48be = exports.u40be = exports.u32be = exports.u24be = exports.u16be = exports.nu64 = exports.u48 = exports.u40 = exports.u32 = exports.u24 = exports.u16 = exports.u8 = exports.offset = exports.greedy = exports.Constant = exports.UTF8 = exports.CString = exports.Blob = exports.Boolean = exports.BitField = exports.BitStructure = exports.VariantLayout = exports.Union = exports.UnionLayoutDiscriminator = exports.UnionDiscriminator = exports.Structure = exports.Sequence = exports.DoubleBE = exports.Double = exports.FloatBE = exports.Float = exports.NearInt64BE = exports.NearInt64 = exports.NearUInt64BE = exports.NearUInt64 = exports.IntBE = exports.Int = exports.UIntBE = exports.UInt = exports.OffsetLayout = exports.GreedyCount = exports.ExternalLayout = exports.bindConstructorLayout = exports.nameWithProperty = exports.Layout = exports.uint8ArrayToBuffer = exports.checkUint8Array = void 0;\nexports.constant = exports.utf8 = exports.cstr = exports.blob = exports.unionLayoutDiscriminator = exports.union = exports.seq = exports.bits = exports.struct = exports.f64be = exports.f64 = exports.f32be = exports.f32 = exports.ns64be = exports.s48be = exports.s40be = exports.s32be = exports.s24be = exports.s16be = exports.ns64 = exports.s48 = exports.s40 = exports.s32 = exports.s24 = void 0;\nconst buffer_1 = require(\"buffer\");\n/* Check if a value is a Uint8Array.\n *\n * @ignore */\nfunction checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError('b must be a Uint8Array');\n }\n}\nexports.checkUint8Array = checkUint8Array;\n/* Create a Buffer instance from a Uint8Array.\n *\n * @ignore */\nfunction uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n}\nexports.uint8ArrayToBuffer = uint8ArrayToBuffer;\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nexports.Layout = Layout;\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nexports.nameWithProperty = nameWithProperty;\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\n// `Class` must be a constructor Function, but the assignment of a `layout_` property to it makes it difficult to type\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Object.prototype.hasOwnProperty.call(Class, 'layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (Object.prototype.hasOwnProperty.call(layout, 'boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nexports.bindConstructorLayout = bindConstructorLayout;\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\nexports.ExternalLayout = ExternalLayout;\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\nexports.GreedyCount = GreedyCount;\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n super(layout.span, property || layout.property);\n /** The subordinated layout. */\n this.layout = layout;\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Uint8Array\n * being accessed. */\n this.offset = offset;\n }\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n /** @override */\n decode(b, offset = 0) {\n return this.layout.decode(b, offset + this.offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\nexports.OffsetLayout = OffsetLayout;\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UInt = UInt;\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UIntBE = UIntBE;\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.Int = Int;\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.IntBE = IntBE;\nconst V2E32 = Math.pow(2, 32);\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return { hi32, lo32 };\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64 = NearUInt64;\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64BE = NearUInt64BE;\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64 = NearInt64;\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64BE = NearInt64BE;\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset);\n return 4;\n }\n}\nexports.Float = Float;\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset);\n return 4;\n }\n}\nexports.FloatBE = FloatBE;\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset);\n return 8;\n }\n}\nexports.Double = Double;\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset);\n return 8;\n }\n}\nexports.DoubleBE = DoubleBE;\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n super(span, property);\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n }\n else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\nexports.Sequence = Sequence;\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n }\n catch (e) {\n // ignore error\n }\n super(span, property);\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n }\n catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset = 0) {\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n }\n else if (0 <= offset) {\n offset += fd.span;\n }\n }\n return undefined;\n }\n}\nexports.Structure = Structure;\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\nexports.UnionDiscriminator = UnionDiscriminator;\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n super(property || layout.property || 'variant');\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\nexports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if ((discr instanceof UInt)\n || (discr instanceof UIntBE)) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n }\n else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n }\n else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n else {\n discriminator = discr;\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && ((discr instanceof UInt)\n || (discr instanceof UIntBE))) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discriminator;\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = (discr instanceof UInt)\n || (discr instanceof UIntBE);\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function (src) {\n return boundGetSourceVariant(src);\n };\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function (gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property\n && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)))) {\n return vlo;\n }\n }\n else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n const clo = this.registry[discr];\n if (undefined === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n // defaultLayout.property can be undefined, but this is allowed by buffer-layout\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n dest[defaultLayout.property] = defaultLayout.decode(b, offset + contentOffset);\n }\n else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset = 0) {\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n // this.defaultLayout is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n // clo.property is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return contentOffset + clo.encode(src[clo.property], b, offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset);\n }\n else {\n variant = vb;\n }\n return this.registry[variant];\n }\n}\nexports.Union = Union;\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n }\n else if (this.property) {\n dest[this.property] = true;\n }\n else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!Object.prototype.hasOwnProperty.call(src, this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return undefined;\n }\n}\nexports.VariantLayout = VariantLayout;\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function (v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function () {\n return value;\n };\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset = 0) {\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n}\nexports.BitStructure = BitStructure;\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n /** The span of this value in bits. */\n this.bits = bits;\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ('number' !== typeof value\n || !Number.isInteger(value)\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n }\n}\nexports.BitField = BitField;\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!super.decode(b, offset);\n }\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n super.encode(value);\n }\n}\nexports.Boolean = Boolean;\n/* eslint-enable no-extend-native */\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Uint8Array.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Uint8Array as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Uint8Array');\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\nexports.Blob = Blob;\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n return uint8ArrayToBuffer(b).slice(offset, offset + span - 1).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset);\n buffer[offset + span] = 0;\n return span + 1;\n }\n}\nexports.CString = CString;\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan) && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n }\n else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n super(-1, property);\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n return b.length - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(uint8ArrayToBuffer(b), offset);\n return span;\n }\n}\nexports.UTF8 = UTF8;\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n /** @override */\n decode(b, offset) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\nexports.Constant = Constant;\n/** Factory for {@link GreedyCount}. */\nexports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n/** Factory for {@link OffsetLayout}. */\nexports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nexports.u8 = ((property) => new UInt(1, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16 = ((property) => new UInt(2, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24 = ((property) => new UInt(3, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32 = ((property) => new UInt(4, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40 = ((property) => new UInt(5, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48 = ((property) => new UInt(6, property));\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64 = ((property) => new NearUInt64(property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16be = ((property) => new UIntBE(2, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24be = ((property) => new UIntBE(3, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32be = ((property) => new UIntBE(4, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40be = ((property) => new UIntBE(5, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48be = ((property) => new UIntBE(6, property));\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64be = ((property) => new NearUInt64BE(property));\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nexports.s8 = ((property) => new Int(1, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nexports.s16 = ((property) => new Int(2, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nexports.s24 = ((property) => new Int(3, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nexports.s32 = ((property) => new Int(4, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nexports.s40 = ((property) => new Int(5, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nexports.s48 = ((property) => new Int(6, property));\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64 = ((property) => new NearInt64(property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nexports.s16be = ((property) => new IntBE(2, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nexports.s24be = ((property) => new IntBE(3, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nexports.s32be = ((property) => new IntBE(4, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nexports.s40be = ((property) => new IntBE(5, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nexports.s48be = ((property) => new IntBE(6, property));\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64be = ((property) => new NearInt64BE(property));\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nexports.f32 = ((property) => new Float(property));\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nexports.f32be = ((property) => new FloatBE(property));\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nexports.f64 = ((property) => new Double(property));\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nexports.f64be = ((property) => new DoubleBE(property));\n/** Factory for {@link Structure} values. */\nexports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n/** Factory for {@link BitStructure} values. */\nexports.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n/** Factory for {@link Sequence} values. */\nexports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n/** Factory for {@link Union} values. */\nexports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nexports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n/** Factory for {@link Blob} values. */\nexports.blob = ((length, property) => new Blob(length, property));\n/** Factory for {@link CString} values. */\nexports.cstr = ((property) => new CString(property));\n/** Factory for {@link UTF8} values. */\nexports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n/** Factory for {@link Constant} values. */\nexports.constant = ((value, property) => new Constant(value, property));\n//# sourceMappingURL=Layout.js.map","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","const END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';\n\n/**\n * Delegates to `Array#shift`, but throws if the array is zero-length.\n */\nexport function guardedShift(byteArray: T[]): T {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift() as T;\n}\n\n/**\n * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of\n * the array.\n */\nexport function guardedSplice(\n byteArray: T[],\n ...args:\n | [start: number, deleteCount?: number]\n | [start: number, deleteCount: number, ...items: T[]]\n): T[] {\n const [start] = args;\n if (\n args.length === 2 // Implies that `deleteCount` was supplied\n ? start + (args[1] ?? 0) > byteArray.length\n : start >= byteArray.length\n ) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(\n ...(args as Parameters),\n );\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = guardedShift(byteArray);\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray),\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(\n byteArray,\n 0,\n accountKeyIndexesLength,\n );\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = guardedSplice(\n byteArray,\n 0,\n writableIndexesLength,\n );\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(\n byteArray,\n 0,\n readonlyIndexesLength,\n );\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet converter;\n/**\n * Convert a little-endian buffer into a BigInt.\n * @param buf The little-endian buffer to convert\n * @returns A BigInt with the little-endian representation of buf.\n */\nfunction toBigIntLE(buf) {\n {\n const reversed = Buffer.from(buf);\n reversed.reverse();\n const hex = reversed.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, false);\n}\nexports.toBigIntLE = toBigIntLE;\n/**\n * Convert a big-endian buffer into a BigInt\n * @param buf The big-endian buffer to convert.\n * @returns A BigInt with the big-endian representation of buf.\n */\nfunction toBigIntBE(buf) {\n {\n const hex = buf.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, true);\n}\nexports.toBigIntBE = toBigIntBE;\n/**\n * Convert a BigInt to a little-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A little-endian buffer representation of num.\n */\nfunction toBufferLE(num, width) {\n {\n const hex = num.toString(16);\n const buffer = Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n buffer.reverse();\n return buffer;\n }\n // Allocation is done here, since it is slower using napi in C\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);\n}\nexports.toBufferLE = toBufferLE;\n/**\n * Convert a BigInt to a big-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A big-endian buffer representation of num.\n */\nfunction toBufferBE(num, width) {\n {\n const hex = num.toString(16);\n return Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n }\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), true);\n}\nexports.toBufferBE = toBufferBE;\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a plain object.\n */\n\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options = {}) {\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const schemas = Structs.map(s => s.schema);\n const schema = Object.assign({}, ...schemas);\n return object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\n\nfunction deprecated(struct, log) {\n return new Struct({ ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n } else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n }\n\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\n\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\n\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n\n *entries(value, ctx) {\n var _struct;\n\n (_struct = struct) != null ? _struct : struct = fn();\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n var _struct2;\n\n (_struct2 = struct) != null ? _struct2 : struct = fn();\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n var _struct3;\n\n (_struct3 = struct) != null ? _struct3 : struct = fn();\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\n\nfunction omit(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = { ...schema\n };\n\n for (const key of keys) {\n delete subschema[key];\n }\n\n return object(subschema);\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\n\nfunction partial(struct) {\n const schema = struct instanceof Struct ? { ...struct.schema\n } : { ...struct\n };\n\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\n\nfunction pick(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = {};\n\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n\n return object(subschema);\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\n\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\n\nfunction date() {\n return define('date', value => {\n return value instanceof Date && !isNaN(value.getTime()) || \"Expected a valid `Date` object, but received: \" + print(value);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map(v => print(v)).join();\n\n for (const key of values) {\n schema[key] = key;\n }\n\n return new Struct({\n type: 'enums',\n schema,\n\n validator(value) {\n return values.includes(value) || \"Expected one of `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a function.\n */\n\nfunction func() {\n return define('func', value => {\n return typeof value === 'function' || \"Expected a function, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\n\nfunction instance(Class) {\n return define('instance', value => {\n return value instanceof Class || \"Expected a `\" + Class.name + \"` instance, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\n\nfunction integer() {\n return define('integer', value => {\n return typeof value === 'number' && !isNaN(value) && Number.isInteger(value) || \"Expected an integer, but received: \" + print(value);\n });\n}\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n }\n\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n\n validator(value) {\n return value instanceof Map || \"Expected a `Map` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\n\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n },\n\n coercer(value) {\n return isObject(value) ? { ...value\n } : value;\n }\n\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\n\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\n\nfunction regexp() {\n return define('regexp', value => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n\n validator(value) {\n return value instanceof Set || \"Expected a `Set` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\nfunction tuple(Elements) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Elements.length, value.length);\n\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Elements[i] || Never];\n }\n }\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\nfunction union(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), x => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n\n if (x === undefined) {\n return f;\n }\n\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x\n };\n let changed = false;\n\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n\n if (changed) {\n return ret;\n }\n }\n\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction trimmed(struct) {\n return coerce(struct, string(), x => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\n\nfunction empty(struct) {\n const expected = \"Expected an empty \" + struct.type;\n return refine(struct, 'empty', value => {\n if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return size === 0 || expected + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return length === 0 || expected + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\n\nfunction max(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'max', value => {\n return exclusive ? value < threshold : value <= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\n\nfunction min(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'min', value => {\n return exclusive ? value > threshold : value >= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\n\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', value => {\n return regexp.test(value) || \"Expected a \" + struct.type + \" matching `/\" + regexp.source + \"/` but received \\\"\" + value + \"\\\"\";\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\n\nfunction size(struct, min, max = min) {\n const expected = \"Expected a \" + struct.type;\n const of = min === max ? \"of `\" + min + \"`\" : \"between `\" + min + \"` and `\" + max + \"`\";\n return refine(struct, 'size', value => {\n if (typeof value === 'number' || value instanceof Date) {\n return min <= value && value <= max || expected + \" \" + of + \" but received `\" + value + \"`\";\n } else if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return min <= size && size <= max || expected + \" with a size \" + of + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return min <= length && length <= max || expected + \" with a length \" + of + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\n\nfunction refine(struct, name, refiner) {\n return new Struct({ ...struct,\n\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n\n for (const failure of failures) {\n yield { ...failure,\n refinement: name\n };\n }\n }\n\n });\n}\n\nexport { Struct, StructError, any, array, assert, assign, boolean, coerce, create, date, defaulted, define, deprecated, dynamic, empty, enums, func, instance, integer, intersection, is, lazy, literal, map, mask, max, min, never, nullable, number, object, omit, optional, partial, pattern, pick, record, refine, regexp, set, size, string, struct, trimmed, tuple, type, union, unknown, validate };\n//# sourceMappingURL=index.es.js.map\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","'use strict';\n\nconst uuid = require('uuid').v4;\n\n/**\n * Generates a JSON-RPC 1.0 or 2.0 request\n * @param {String} method Name of method to call\n * @param {Array|Object} params Array of parameters passed to the method as specified, or an object of parameter names and corresponding value\n * @param {String|Number|null} [id] Request ID can be a string, number, null for explicit notification or left out for automatic generation\n * @param {Object} [options]\n * @param {Number} [options.version=2] JSON-RPC version to use (1 or 2)\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @param {Function} [options.generator] Passed the request, and the options object and is expected to return a request ID\n * @throws {TypeError} If any of the parameters are invalid\n * @return {Object} A JSON-RPC 1.0 or 2.0 request\n * @memberOf Utils\n */\nconst generateRequest = function(method, params, id, options) {\n if(typeof method !== 'string') {\n throw new TypeError(method + ' must be a string');\n }\n\n options = options || {};\n\n // check valid version provided\n const version = typeof options.version === 'number' ? options.version : 2;\n if (version !== 1 && version !== 2) {\n throw new TypeError(version + ' must be 1 or 2');\n }\n\n const request = {\n method: method\n };\n\n if(version === 2) {\n request.jsonrpc = '2.0';\n }\n\n if(params) {\n // params given, but invalid?\n if(typeof params !== 'object' && !Array.isArray(params)) {\n throw new TypeError(params + ' must be an object, array or omitted');\n }\n request.params = params;\n }\n\n // if id was left out, generate one (null means explicit notification)\n if(typeof(id) === 'undefined') {\n const generator = typeof options.generator === 'function' ? options.generator : function() { return uuid(); };\n request.id = generator(request, options);\n } else if (version === 2 && id === null) {\n // we have a version 2 notification\n if (options.notificationIdNull) {\n request.id = null; // id will not be set at all unless option provided\n }\n } else {\n request.id = id;\n }\n\n return request;\n};\n\nmodule.exports = generateRequest;\n","'use strict';\n\nconst uuid = require('uuid').v4;\nconst generateRequest = require('../../generateRequest');\n\n/**\n * Constructor for a Jayson Browser Client that does not depend any node.js core libraries\n * @class ClientBrowser\n * @param {Function} callServer Method that calls the server, receives the stringified request and a regular node-style callback\n * @param {Object} [options]\n * @param {Function} [options.reviver] Reviver function for JSON\n * @param {Function} [options.replacer] Replacer function for JSON\n * @param {Number} [options.version=2] JSON-RPC version to use (1|2)\n * @param {Function} [options.generator] Function to use for generating request IDs\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @return {ClientBrowser}\n */\nconst ClientBrowser = function(callServer, options) {\n if(!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n\n if (!options) {\n options = {};\n }\n\n this.options = {\n reviver: typeof options.reviver !== 'undefined' ? options.reviver : null,\n replacer: typeof options.replacer !== 'undefined' ? options.replacer : null,\n generator: typeof options.generator !== 'undefined' ? options.generator : function() { return uuid(); },\n version: typeof options.version !== 'undefined' ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === 'boolean' ? options.notificationIdNull : false,\n };\n\n this.callServer = callServer;\n};\n\nmodule.exports = ClientBrowser;\n\n/**\n * Creates a request and dispatches it if given a callback.\n * @param {String|Array} method A batch request if passed an Array, or a method name if passed a String\n * @param {Array|Object} [params] Parameters for the method\n * @param {String|Number} [id] Optional id. If undefined an id will be generated. If null it creates a notification request\n * @param {Function} [callback] Request callback. If specified, executes the request rather than only returning it.\n * @throws {TypeError} Invalid parameters\n * @return {Object} JSON-RPC 1.0 or 2.0 compatible request\n */\nClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n\n // is this a batch request?\n const isBatch = Array.isArray(method) && typeof params === 'function';\n\n if (this.options.version === 1 && isBatch) {\n throw new TypeError('JSON-RPC 1.0 does not support batching');\n }\n\n // is this a raw request?\n const isRaw = !isBatch && method && typeof method === 'object' && typeof params === 'function';\n\n if(isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if(typeof id === 'function') {\n callback = id;\n // specifically undefined because \"null\" is a notification request\n id = undefined;\n }\n\n const hasCallback = typeof callback === 'function';\n\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull,\n });\n } catch(err) {\n if(hasCallback) {\n return callback(err);\n }\n throw err;\n }\n\n // no callback means we should just return a raw request\n if(!hasCallback) {\n return request;\n }\n\n }\n\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch(err) {\n return callback(err);\n }\n\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n\n // always return the raw request\n return request;\n};\n\n/**\n * Parses a response from a server\n * @param {Object} err Error to pass on that is unrelated to the actual response\n * @param {String} responseText JSON-RPC 1.0 or 2.0 response\n * @param {Function} callback Callback that will receive different arguments depending on the amount of parameters\n * @private\n */\nClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if(err) {\n callback(err);\n return;\n }\n\n if(!responseText) {\n // empty response text, assume that is correct because it could be a\n // notification which jayson does not give any body for\n return callback();\n }\n\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch(err) {\n return callback(err);\n }\n\n if(callback.length === 3) {\n // if callback length is 3, we split callback arguments on error and response\n\n // is batch response?\n if(Array.isArray(response)) {\n\n // neccesary to split strictly on validity according to spec here\n const isError = function(res) {\n return typeof res.error !== 'undefined';\n };\n\n const isNotError = function (res) {\n return !isError(res);\n };\n\n return callback(null, response.filter(isError), response.filter(isNotError));\n \n } else {\n\n // split regardless of validity\n return callback(null, response.error, response.result);\n \n }\n \n }\n\n callback(null, response);\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","export const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport default globalThis.fetch;\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) keys.push(key);\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * \"Client\" wraps \"ws\" or a browser-implemented \"WebSocket\" library\n * according to the environment providing JSON RPC 2.0 support on top.\n * @module Client\n */\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime/regenerator\"));\n\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime/helpers/asyncToGenerator\"));\n\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _eventemitter = require(\"eventemitter3\");\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}; // @ts-ignore\n\n\nvar CommonClient = /*#__PURE__*/function (_EventEmitter) {\n (0, _inherits2[\"default\"])(CommonClient, _EventEmitter);\n\n var _super = _createSuper(CommonClient);\n\n /**\n * Instantiate a Client class.\n * @constructor\n * @param {webSocketFactory} webSocketFactory - factory method for WebSocket\n * @param {String} address - url to a websocket server\n * @param {Object} options - ws options object with reconnect parameters\n * @param {Function} generate_request_id - custom generation request Id\n * @return {CommonClient}\n */\n function CommonClient(webSocketFactory) {\n var _this;\n\n var address = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"ws://localhost:8080\";\n\n var _a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var generate_request_id = arguments.length > 3 ? arguments[3] : undefined;\n (0, _classCallCheck2[\"default\"])(this, CommonClient);\n\n var _a$autoconnect = _a.autoconnect,\n autoconnect = _a$autoconnect === void 0 ? true : _a$autoconnect,\n _a$reconnect = _a.reconnect,\n reconnect = _a$reconnect === void 0 ? true : _a$reconnect,\n _a$reconnect_interval = _a.reconnect_interval,\n reconnect_interval = _a$reconnect_interval === void 0 ? 1000 : _a$reconnect_interval,\n _a$max_reconnects = _a.max_reconnects,\n max_reconnects = _a$max_reconnects === void 0 ? 5 : _a$max_reconnects,\n rest_options = __rest(_a, [\"autoconnect\", \"reconnect\", \"reconnect_interval\", \"max_reconnects\"]);\n\n _this = _super.call(this);\n _this.webSocketFactory = webSocketFactory;\n _this.queue = {};\n _this.rpc_id = 0;\n _this.address = address;\n _this.autoconnect = autoconnect;\n _this.ready = false;\n _this.reconnect = reconnect;\n _this.reconnect_timer_id = undefined;\n _this.reconnect_interval = reconnect_interval;\n _this.max_reconnects = max_reconnects;\n _this.rest_options = rest_options;\n _this.current_reconnects = 0;\n\n _this.generate_request_id = generate_request_id || function () {\n return ++_this.rpc_id;\n };\n\n if (_this.autoconnect) _this._connect(_this.address, Object.assign({\n autoconnect: _this.autoconnect,\n reconnect: _this.reconnect,\n reconnect_interval: _this.reconnect_interval,\n max_reconnects: _this.max_reconnects\n }, _this.rest_options));\n return _this;\n }\n /**\n * Connects to a defined server if not connected already.\n * @method\n * @return {Undefined}\n */\n\n\n (0, _createClass2[\"default\"])(CommonClient, [{\n key: \"connect\",\n value: function connect() {\n if (this.socket) return;\n\n this._connect(this.address, Object.assign({\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects\n }, this.rest_options));\n }\n /**\n * Calls a registered RPC method on server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object|Array} params - optional method parameters\n * @param {Number} timeout - RPC reply timeout value\n * @param {Object} ws_opts - options passed to ws\n * @return {Promise}\n */\n\n }, {\n key: \"call\",\n value: function call(method, params, timeout, ws_opts) {\n var _this2 = this;\n\n if (!ws_opts && \"object\" === (0, _typeof2[\"default\"])(timeout)) {\n ws_opts = timeout;\n timeout = null;\n }\n\n return new Promise(function (resolve, reject) {\n if (!_this2.ready) return reject(new Error(\"socket not ready\"));\n\n var rpc_id = _this2.generate_request_id(method, params);\n\n var message = {\n jsonrpc: \"2.0\",\n method: method,\n params: params || null,\n id: rpc_id\n };\n\n _this2.socket.send(JSON.stringify(message), ws_opts, function (error) {\n if (error) return reject(error);\n _this2.queue[rpc_id] = {\n promise: [resolve, reject]\n };\n\n if (timeout) {\n _this2.queue[rpc_id].timeout = setTimeout(function () {\n delete _this2.queue[rpc_id];\n reject(new Error(\"reply timeout\"));\n }, timeout);\n }\n });\n });\n }\n /**\n * Logins with the other side of the connection.\n * @method\n * @param {Object} params - Login credentials object\n * @return {Promise}\n */\n\n }, {\n key: \"login\",\n value: function () {\n var _login = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee(params) {\n var resp;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return this.call(\"rpc.login\", params);\n\n case 2:\n resp = _context.sent;\n\n if (resp) {\n _context.next = 5;\n break;\n }\n\n throw new Error(\"authentication failed\");\n\n case 5:\n return _context.abrupt(\"return\", resp);\n\n case 6:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function login(_x) {\n return _login.apply(this, arguments);\n }\n\n return login;\n }()\n /**\n * Fetches a list of client's methods registered on server.\n * @method\n * @return {Array}\n */\n\n }, {\n key: \"listMethods\",\n value: function () {\n var _listMethods = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2() {\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return this.call(\"__listMethods\");\n\n case 2:\n return _context2.abrupt(\"return\", _context2.sent);\n\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function listMethods() {\n return _listMethods.apply(this, arguments);\n }\n\n return listMethods;\n }()\n /**\n * Sends a JSON-RPC 2.0 notification to server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object} params - optional method parameters\n * @return {Promise}\n */\n\n }, {\n key: \"notify\",\n value: function notify(method, params) {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n if (!_this3.ready) return reject(new Error(\"socket not ready\"));\n var message = {\n jsonrpc: \"2.0\",\n method: method,\n params: params || null\n };\n\n _this3.socket.send(JSON.stringify(message), function (error) {\n if (error) return reject(error);\n resolve();\n });\n });\n }\n /**\n * Subscribes for a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"subscribe\",\n value: function () {\n var _subscribe = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee3(event) {\n var result;\n return _regenerator[\"default\"].wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n if (typeof event === \"string\") event = [event];\n _context3.next = 3;\n return this.call(\"rpc.on\", event);\n\n case 3:\n result = _context3.sent;\n\n if (!(typeof event === \"string\" && result[event] !== \"ok\")) {\n _context3.next = 6;\n break;\n }\n\n throw new Error(\"Failed subscribing to an event '\" + event + \"' with: \" + result[event]);\n\n case 6:\n return _context3.abrupt(\"return\", result);\n\n case 7:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function subscribe(_x2) {\n return _subscribe.apply(this, arguments);\n }\n\n return subscribe;\n }()\n /**\n * Unsubscribes from a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"unsubscribe\",\n value: function () {\n var _unsubscribe = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee4(event) {\n var result;\n return _regenerator[\"default\"].wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n if (typeof event === \"string\") event = [event];\n _context4.next = 3;\n return this.call(\"rpc.off\", event);\n\n case 3:\n result = _context4.sent;\n\n if (!(typeof event === \"string\" && result[event] !== \"ok\")) {\n _context4.next = 6;\n break;\n }\n\n throw new Error(\"Failed unsubscribing from an event with: \" + result);\n\n case 6:\n return _context4.abrupt(\"return\", result);\n\n case 7:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function unsubscribe(_x3) {\n return _unsubscribe.apply(this, arguments);\n }\n\n return unsubscribe;\n }()\n /**\n * Closes a WebSocket connection gracefully.\n * @method\n * @param {Number} code - socket close code\n * @param {String} data - optional data to be sent before closing\n * @return {Undefined}\n */\n\n }, {\n key: \"close\",\n value: function close(code, data) {\n this.socket.close(code || 1000, data);\n }\n /**\n * Connection/Message handler.\n * @method\n * @private\n * @param {String} address - WebSocket API address\n * @param {Object} options - ws options object\n * @return {Undefined}\n */\n\n }, {\n key: \"_connect\",\n value: function _connect(address, options) {\n var _this4 = this;\n\n clearTimeout(this.reconnect_timer_id);\n this.socket = this.webSocketFactory(address, options);\n this.socket.addEventListener(\"open\", function () {\n _this4.ready = true;\n\n _this4.emit(\"open\");\n\n _this4.current_reconnects = 0;\n });\n this.socket.addEventListener(\"message\", function (_ref) {\n var message = _ref.data;\n if (message instanceof ArrayBuffer) message = Buffer.from(message).toString();\n\n try {\n message = JSON.parse(message);\n } catch (error) {\n return;\n } // check if any listeners are attached and forward event\n\n\n if (message.notification && _this4.listeners(message.notification).length) {\n if (!Object.keys(message.params).length) return _this4.emit(message.notification);\n var args = [message.notification];\n if (message.params.constructor === Object) args.push(message.params);else // using for-loop instead of unshift/spread because performance is better\n for (var i = 0; i < message.params.length; i++) {\n args.push(message.params[i]);\n } // run as microtask so that pending queue messages are resolved first\n // eslint-disable-next-line prefer-spread\n\n return Promise.resolve().then(function () {\n _this4.emit.apply(_this4, args);\n });\n }\n\n if (!_this4.queue[message.id]) {\n // general JSON RPC 2.0 events\n if (message.method && message.params) {\n // run as microtask so that pending queue messages are resolved first\n return Promise.resolve().then(function () {\n _this4.emit(message.method, message.params);\n });\n }\n\n return;\n } // reject early since server's response is invalid\n\n\n if (\"error\" in message === \"result\" in message) _this4.queue[message.id].promise[1](new Error(\"Server response malformed. Response must include either \\\"result\\\"\" + \" or \\\"error\\\", but not both.\"));\n if (_this4.queue[message.id].timeout) clearTimeout(_this4.queue[message.id].timeout);\n if (message.error) _this4.queue[message.id].promise[1](message.error);else _this4.queue[message.id].promise[0](message.result);\n delete _this4.queue[message.id];\n });\n this.socket.addEventListener(\"error\", function (error) {\n return _this4.emit(\"error\", error);\n });\n this.socket.addEventListener(\"close\", function (_ref2) {\n var code = _ref2.code,\n reason = _ref2.reason;\n if (_this4.ready) // Delay close event until internal state is updated\n setTimeout(function () {\n return _this4.emit(\"close\", code, reason);\n }, 0);\n _this4.ready = false;\n _this4.socket = undefined;\n if (code === 1000) return;\n _this4.current_reconnects++;\n if (_this4.reconnect && (_this4.max_reconnects > _this4.current_reconnects || _this4.max_reconnects === 0)) _this4.reconnect_timer_id = setTimeout(function () {\n return _this4._connect(address, options);\n }, _this4.reconnect_interval);\n });\n }\n }]);\n return CommonClient;\n}(_eventemitter.EventEmitter);\n\nexports[\"default\"] = CommonClient;","/**\n * WebSocket implements a browser-side WebSocket specification.\n * @module Client\n */\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = _default;\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _eventemitter = require(\"eventemitter3\");\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nvar WebSocketBrowserImpl = /*#__PURE__*/function (_EventEmitter) {\n (0, _inherits2[\"default\"])(WebSocketBrowserImpl, _EventEmitter);\n\n var _super = _createSuper(WebSocketBrowserImpl);\n\n /** Instantiate a WebSocket class\n * @constructor\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @param {(String|Array)} protocols - a list of protocols\n * @return {WebSocketBrowserImpl} - returns a WebSocket instance\n */\n function WebSocketBrowserImpl(address, options, protocols) {\n var _this;\n\n (0, _classCallCheck2[\"default\"])(this, WebSocketBrowserImpl);\n _this = _super.call(this);\n _this.socket = new window.WebSocket(address, protocols);\n\n _this.socket.onopen = function () {\n return _this.emit(\"open\");\n };\n\n _this.socket.onmessage = function (event) {\n return _this.emit(\"message\", event.data);\n };\n\n _this.socket.onerror = function (error) {\n return _this.emit(\"error\", error);\n };\n\n _this.socket.onclose = function (event) {\n _this.emit(\"close\", event.code, event.reason);\n };\n\n return _this;\n }\n /**\n * Sends data through a websocket connection\n * @method\n * @param {(String|Object)} data - data to be sent via websocket\n * @param {Object} optionsOrCallback - ws options\n * @param {Function} callback - a callback called once the data is sent\n * @return {Undefined}\n */\n\n\n (0, _createClass2[\"default\"])(WebSocketBrowserImpl, [{\n key: \"send\",\n value: function send(data, optionsOrCallback, callback) {\n var cb = callback || optionsOrCallback;\n\n try {\n this.socket.send(data);\n cb();\n } catch (error) {\n cb(error);\n }\n }\n /**\n * Closes an underlying socket\n * @method\n * @param {Number} code - status code explaining why the connection is being closed\n * @param {String} reason - a description why the connection is closing\n * @return {Undefined}\n * @throws {Error}\n */\n\n }, {\n key: \"close\",\n value: function close(code, reason) {\n this.socket.close(code, reason);\n }\n }, {\n key: \"addEventListener\",\n value: function addEventListener(type, listener, options) {\n this.socket.addEventListener(type, listener, options);\n }\n }]);\n return WebSocketBrowserImpl;\n}(_eventemitter.EventEmitter);\n/**\n * factory method for common WebSocket instance\n * @method\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @return {Undefined}\n */\n\n\nfunction _default(address, options) {\n return new WebSocketBrowserImpl(address, options);\n}","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","const U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nexport function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nexport function split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nexport const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (h, l) => l;\nconst rotr32L = (h, l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\n// Removing \"export\" has 5% perf penalty -_-\nexport function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import assert from './_assert.js';\nimport u64 from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, } from './utils.js';\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _7n = BigInt(7);\nconst _256n = BigInt(256);\nconst _0x71n = BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = u64.split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => s > 32 ? u64.rotlBH(h, l, s) : u64.rotlSH(h, l, s);\nconst rotlL = (h, l, s) => s > 32 ? u64.rotlBL(h, l, s) : u64.rotlSL(h, l, s);\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n assert.number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n assert.exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n assert.exists(this, false);\n assert.bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n assert.number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n assert.output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = gen(0x06, 136, 256 / 8);\nexport const sha3_384 = gen(0x06, 104, 384 / 8);\nexport const sha3_512 = gen(0x06, 72, 512 / 8);\nexport const keccak_224 = gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = gen(0x01, 136, 256 / 8);\nexport const keccak_384 = gen(0x01, 104, 384 / 8);\nexport const keccak_512 = gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = genShake(0x1f, 168, 128 / 8);\nexport const shake256 = genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = wrapConstructor(() => new SHA256());\nexport const sha224 = wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error('ui8a expected');\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((c, point, isCompressed) => {\n const a = point.toAffine();\n return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n // Zero is valid point too!\n if (this.is0()) {\n if (CURVE.allowInfinityPoint)\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, _3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, _3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === _0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === _1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return mod.mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return mod.invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n const isYOdd = (y & _1n) === _1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size (nBitLength+64)\n * as per FIPS 186 B.4.1 with modulo bias being neglible.\n */\n randomPrivateKey: () => {\n const rand = CURVE.randomBytes(Fp.BYTES + 8);\n const num = mod.hashToPrivateScalar(rand, CURVE_ORDER);\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(ensureBytes('extraEntropy', e, Fp.BYTES)); // check for being of size BYTES\n }\n const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === _0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === _0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash (not message: you need to hash it by yourself).\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param opts `lowS, extraEntropy, prehash`\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const drbg = ut.createHmacDrbg(CURVE.hash.outputLen, CURVE.nByteLength, CURVE.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes('msgHash', msgHash);\n publicKey = ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || sg instanceof Uint8Array) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n// Implementation of the Shallue and van de Woestijne method for any Weierstrass curve\n// TODO: check if there is a way to merge this with uvRatio in Edwards && move to modular?\n// b = True and y = sqrt(u / v) if (u / v) is square in F, and\n// b = False and y = sqrt(Z * (u / v)) otherwise.\nexport function SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = _0n;\n for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n l += _1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n const c2 = (q - _1n) / _2n ** c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n ** c1 - _1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n ** (c1 - _1n); // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > _1n; i--) {\n let tv5 = _2n ** (i - _2n); // 18. tv5 = i - 2; 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n === _3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n// From draft-irtf-cfrg-hash-to-curve-16\nexport function mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map","import assert from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nclass HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assert.hash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new TypeError('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assert.exists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.bytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n return {\n hash,\n hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n randomBytes,\n };\n}\nexport function createCurve(curveDef, defHash) {\n const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport * as htf from './abstract/hash-to-curve.js';\nimport { createCurve } from './_shortw_utils.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N,\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = {\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n};\nconst isoMap = htf.isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j))));\nconst mapSWU = mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n});\nexport const { hashToCurve, encodeToCurve } = htf.createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n});\n//# sourceMappingURL=secp256k1.js.map","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\nimport {guardedShift, guardedSplice} from './utils/guarded-array-utils';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["base64Js","byteLength","toByteArray","fromByteArray","lookup","revLookup","Arr","Uint8Array","Array","code","i","len","length","charCodeAt","getLens","b64","Error","validLen","indexOf","placeHoldersLen","lens","_byteLength","tmp","arr","curByte","tripletToBase64","num","encodeChunk","uint8","start","end","output","push","join","extraBytes","parts","maxChunkLength","len2","ieee754","read","buffer","offset","isLE","mLen","nBytes","e","m","eLen","eMax","eBias","nBits","d","s","NaN","Infinity","Math","pow","write","value","c","rt","abs","isNaN","floor","log","LN2","base64","require$$0","require$$1","customInspectSymbol","Symbol","exports","Buffer","SlowBuffer","INSPECT_MAX_BYTES","K_MAX_LENGTH","kMaxLength","TYPED_ARRAY_SUPPORT","typedArraySupport","console","error","proto","foo","Object","setPrototypeOf","prototype","defineProperty","enumerable","get","isBuffer","this","undefined","byteOffset","createBuffer","RangeError","buf","arg","encodingOrOffset","TypeError","allocUnsafe","from","poolSize","fromString","ArrayBuffer","isView","fromArrayView","isInstance","fromArrayBuffer","SharedArrayBuffer","valueOf","b","fromObject","toPrimitive","assertSize","size","alloc","fill","encoding","checked","allocUnsafeSlow","string","isEncoding","actual","slice","fromArrayLike","array","arrayView","copy","obj","numberIsNaN","type","isArray","data","toString","_isBuffer","compare","a","x","y","min","String","toLowerCase","concat","list","pos","set","call","mustMatch","arguments","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","n","swap16","swap32","swap64","apply","toLocaleString","equals","inspect","str","max","replace","trim","target","thisStart","thisEnd","thisCopy","targetCopy","bidirectionalIndexOf","val","dir","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","found","j","includes","hexWrite","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","asciiToBytes","base64Write","ucs2Write","utf16leToBytes","isFinite","toJSON","_arr","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","MAX_ARGUMENTS_LENGTH","codePoints","fromCharCode","ret","out","hexSliceLookupTable","bytes","newBuf","subarray","checkOffset","ext","readUintLE","readUIntLE","noAssert","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","defineBigIntMethod","validateNumber","first","last","boundsError","lo","hi","BigInt","readBigUInt64BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","checkInt","writeUintLE","writeUIntLE","maxBytes","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeUInt32BE","wrtBigUInt64LE","checkIntBI","wrtBigUInt64BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeBigInt64LE","writeBigInt64BE","checkIEEE754","writeFloat","littleEndian","writeFloatLE","writeFloatBE","writeDouble","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","errors","E","sym","getMessage","Base","NodeError","constructor","super","writable","configurable","name","stack","message","range","input","msg","received","isInteger","addNumericalSeparator","checkBounds","ERR_OUT_OF_RANGE","ERR_INVALID_ARG_TYPE","ERR_BUFFER_OUT_OF_BOUNDS","INVALID_BASE64_RE","base64clean","split","units","leadSurrogate","byteArray","src","dst","alphabet","table","i16","fn","BufferBigIntNotDefined","number","isSafeInteger","bool","lengths","hash","create","outputLen","blockLen","exists","instance","checkFinished","destroyed","finished","assert","assert$5","crypto","globalThis","createView","DataView","rotr","word","shift","Uint32Array","v","padStart","TextEncoder","encode","toBytes","concatBytes","arrays","every","reduce","result","pad","Hash$1","Hash","clone","_cloneInto","wrapConstructor","hashConstructor","hashC","update","digest","randomBytes","bytesLength","getRandomValues","setBigUint64","view","_32n","_u32_max","wh","wl","h","l","setUint32","SHA2","padOffset","take","dataView","process","roundClean","digestInto","oview","outLen","state","destroy","to","U32_MASK64","fromBig","le","lst","Ah","Al","toBig","shrSH","shrSL","rotrSH","rotrSL","rotrBH","rotrBL","rotr32H","rotr32L","rotlSH","rotlSL","rotlBH","rotlBL","add","Bh","Bl","add3L","Cl","add3H","low","Ch","add4L","Dl","add4H","Dh","add5L","El","add5H","Eh","u64","u64$4","SHA512_Kh","SHA512_Kl","map","SHA512_W_H","SHA512_W_L","SHA512","Fh","Fl","Gh","Gl","Hh","Hl","getUint32","W15h","W15l","s0h","s0l","W2h","W2l","s1h","s1l","SUMl","SUMh","sigma1h","sigma1l","CHIh","CHIl","T1ll","T1h","T1l","sigma0h","sigma0l","MAJh","MAJl","All","SHA512_224","SHA512_256","SHA384","sha512","_0n","_1n","_2n","u8a","hexes","bytesToHex","hex","numberToHexUnpadded","hexToNumber","hexToBytes","hexByte","byte","bytesToNumberBE","bytesToNumberLE","reverse","numberToBytesBE","numberToBytesLE","numberToVarBytesBE","ensureBytes","title","expectedLength","arrs","r","sum","forEach","equalBytes","b1","b2","bitLen","bitGet","bitSet","bitMask","u8n","u8fr","createHmacDrbg","hashLen","qByteLen","hmacFn","k","reset","reseed","seed","gen","sl","genUntil","pred","validatorFns","bigint","function","boolean","field","object","Fp","isValid","validateObject","validators","optValidators","checkField","fieldName","isOptional","checkVal","entries","_3n","_4n","_5n","_8n","mod","power","modulo","pow2","invert","u","q","gcd","tonelliShanks","P","legendreC","Q","S","Z","p1div4","tonelliFast","root","eql","sqr","Q1div2","tonelliSlow","neg","ONE","g","ZERO","t2","ge","FpSqrt","sqrt3mod4","c1","sqrt5mod8","n2","nv","isNegativeLE","FIELD_FIELDS","validateField","initial","ORDER","MASK","BYTES","BITS","opts","FpPow","f","p","FpInvertBatch","nums","lastMultiplied","acc","is0","inverted","inv","reduceRight","nLength","nBitLength","_nBitLength","nByteLength","ceil","Field","redef","sqrtP","freeze","isOdd","lhs","rhs","div","sqrN","addN","subN","mulN","sqrt","invertBatch","cmov","fromBytes","FpSqrtEven","elm","hashToPrivateScalar","groupOrder","minLen","wNAF","bits","constTimeNegate","condition","item","negate","W","windows","windowSize","unsafeLadder","double","precomputeWindow","points","base","window","precomputes","BASE","mask","maxNumber","shiftBy","wbits","offset1","offset2","cond1","cond2","wNAFCached","precomputesMap","transform","_WINDOW_SIZE","comp","validateBasic","curve","Gx","Gy","VERIFY_DEFAULT","zip215","validateOpts","ut.validateObject","adjustScalarBytes","domain","uvRatio","mapToCurve","twistedEdwards","curveDef","CURVE","CURVE_ORDER","prehash","cHash","cofactor","modP","ctx","phflag","inBig","inRange","in0MaskRange","assertInRange","assertGE0","pointPrecomputes","Map","isPoint","other","Point","ex","ey","ez","et","toAffine","static","toInv","fromAffine","_setWindowSize","delete","assertValidity","X","Y","T","X2","Y2","Z2","Z4","aX2","left","right","XY","ZT","X1","Y1","Z1","X1Z2","X2Z1","Y1Z2","Y2Z1","A","B","C","D","x1y1","G","F","H","X3","Y3","T3","Z3","T1","T2","subtract","wnaf","normalizeZ","multiply","scalar","multiplyUnsafe","I","isSmallOrder","isTorsionFree","iz","z","ax","ay","zz","clearCofactor","normed","lastByte","ut.bytesToNumberLE","y2","isXOdd","isLastByteOdd","privKey","getExtendedPublicKey","point","toRawBytes","ut.numberToBytesLE","toHex","ut.bytesToHex","modN","modN_LE","key","hashed","head","prefix","pointBytes","getPublicKey","hashDomainToScalar","context","msgs","ut.concatBytes","sign","options","R","verifyOpts","verify","sig","publicKey","SB","fromHex","RkA","utils","randomPrivateKey","precompute","ExtendedPoint","montgomeryBits","powPminus2","Gu","montgomery","montgomeryBytes","fieldLen","cswap","x_2","x_3","dummy","assertFieldElement","a24","montgomeryLadder","pointU","x_1","z_2","z_3","sw","t","k_t","AA","BB","DA","CB","dacb","da_cb","z2","encodeUCoordinate","decodeUCoordinate","uEnc","decodeScalar","scalarMult","_scalar","pu","GuBytes","scalarMultBase","getSharedSecret","privateKey","validateDST","os2ip","i2osp","strxor","isBytes","isNum","expand_message_xmd","DST","lenInBytes","b_in_bytes","r_in_bytes","ell","DST_prime","Z_pad","l_i_b_str","b_0","args","pseudo_random_bytes","expand_message_xof","dkLen","hash_to_field","count","expand","_DST","log2p","L","len_in_bytes","prb","elm_offset","tv","isogenyMap","COEFF","xNum","xDen","yNum","yDen","createHasher","def","hashToCurve","u0","u1","encodeToCurve","encodeDST","ED25519_P","ED25519_SQRT_M1","_10n","_20n","_40n","_80n","ed25519_pow_2_252_3","x2","b4","b5","b10","b20","b40","b80","b160","b240","b250","pow_p_5_8","v3","v7","vx2","root1","root2","useRoot1","useRoot2","noRoot","ed25519Defaults","ed25519","ed25519_domain","ELL2_C1","ELL2_C2","ELL2_C3","ELL2_C4","ELL2_J","map_to_curve_elligator2_curve25519","tv1","xd","x1n","tv2","gxd","gx1","tv3","y11","y12","e1","y1","x2n","y21","y22","gx2","e2","e3","xn","e4","xMn","xMd","yMn","yMd","ELL2_C1_EDWARDS","map_to_curve_elligator2_edwards25519","yn","yd","htf.createHasher","scalars","assertRstPoint","RistrettoPoint","SQRT_M1","SQRT_AD_MINUS_ONE","INVSQRT_A_MINUS_D","ONE_MINUS_D_SQ","D_MINUS_ONE_SQ","invertSqrt","MAX_255B","bytes255ToNumberLE","calcElligatorRistrettoMap","r0","Ns","Ns_D_is_sq","s_","Nt","s2","W0","W1","W2","W3","ep","ap","r1","R1","r2","R2","emsg","u2","u1_2","u2_2","Dx","Dy","u2sq","invsqrt","D1","D2","zInv","_x","_y","one","two","generatePrivateKey","generateKeypair","privateScalar","secretKey","isOnCurve","_unused","toBuffer","module","inherits","ctor","superCtor","super_","TempCtor","BN","endian","isBN","negative","words","red","_init","wordSize","cmp","init","_initNumber","_initArray","_parseHex","_parseBase","toArray","w","off","_strip","parseHex4Bits","index","parseHexByte","lowerBound","parseLength","parseBase","limbLen","limbPow","total","imuln","_iaddn","dest","move","_move","_expand","strip","_normSign","for","zeros","groupSizes","groupBases","padding","carry","groupSize","groupBase","isZero","modrn","idivn","toNumber","toArrayLike","allocate","ArrayType","reqLength","postfix","_toArrayLikeLE","position","_toArrayLikeBE","clz32","_countBits","_zeroBits","bitLength","toBitArray","bit","wbit","zeroBits","toTwos","width","inotn","iaddn","fromTwos","testn","notn","ineg","isNeg","iuor","ior","or","uor","iuand","iand","and","uand","iuxor","ixor","xor","uxor","bytesNeeded","bitsLeft","setn","iadd","isub","smallMulTo","self","ncarry","rword","maxJ","comb10MulTo","o","mid","a0","al0","ah0","a1","al1","ah1","a2","al2","ah2","a3","al3","ah3","a4","al4","ah4","a5","al5","ah5","a6","al6","ah6","a7","al7","ah7","a8","al8","ah8","a9","al9","ah9","b0","bl0","bh0","bl1","bh1","bl2","bh2","b3","bl3","bh3","bl4","bh4","bl5","bh5","b6","bl6","bh6","b7","bl7","bh7","b8","bl8","bh8","b9","bl9","bh9","imul","w0","w1","w2","w3","w4","w5","w6","w7","w8","w9","w10","w11","w12","w13","w14","w15","w16","w17","w18","bigMulTo","hncarry","jumboMulTo","mulTo","mulf","isNegNum","muln","isqr","iushln","carryMask","newCarry","ishln","iushrn","hint","extended","maskedWords","ishrn","shln","ushln","shrn","ushrn","imaskn","maskn","isubn","addn","subn","iabs","_ishlnsubmul","_wordDiv","mode","bhi","bhiBits","diff","qj","divmod","positive","divn","umod","divRound","dm","half","andln","modn","egcd","isEven","yp","xp","im","jm","_invmp","x1","delta","cmpn","invm","bincn","ucmp","gtn","gt","gten","gte","ltn","lt","lten","lte","eqn","eq","Red","toRed","convertTo","_forceRed","fromRed","convertFrom","forceRed","redAdd","redIAdd","redSub","redISub","redShl","shl","redMul","_verify2","redIMul","redSqr","_verify1","redISqr","redSqrt","redInvm","redNeg","redPow","primes","k256","p224","p192","p25519","MPrime","_tmp","ireduce","rlen","imulK","K256","prev","next","P224","P192","P25519","_prime","prime","imod","mod3","nOne","lpow","wnd","current","currentLen","mont","Mont","rinv","minv","copyProps","SafeBuffer","_Buffer","ALPHABET","BASE_MAP","charAt","xc","LEADER","FACTOR","iFACTOR","source","zeroes","pbegin","pend","b58","it1","it2","repeat","decodeUnsafe","psz","b256","it3","it4","vch","decode","basex","bs58","assert$3","u32","hashCons","wrapXOFConstructorWithOpts","Chi","Maj","SHA256_K","IV","SHA256_W","SHA256","W15","s0","s1","sigma1","sigma0","SHA224","sha256","ToDictionary","stringToCodePoints","codePointsToString","code_points","cp","end_of_stream","Stream","tokens","endOfStream","prepend","token","unshift","pop","decoderError","fatal","opt_code_point","DEFAULT_ENCODING","TextDecoder","_streaming","_BOMseen","_decoder","_fatal","Boolean","_ignoreBOM","TextDecoder$1","UTF8Decoder","input_stream","handler","_encoder","_options","TextEncoder$1","opt_string","UTF8Encoder","utf8_code_point","utf8_bytes_seen","utf8_bytes_needed","utf8_lower_boundary","utf8_upper_boundary","stream","bite","code_point","temp","encoding_lib","__createBinding","k2","__setModuleDefault","__decorate","decorators","desc","getOwnPropertyDescriptor","Reflect","decorate","__importStar","__esModule","hasOwnProperty","__importDefault","default","lib","deserializeUnchecked_1","deserializeUnchecked","deserialize_1","deserialize","serialize_1","serialize","BinaryWriter","BorshError","baseDecode","bn_js_1","bs58_1","require$$2","ResolvedTextDecoder","textDecoder","baseEncode","INITIAL_LENGTH","fieldPath","originalMessage","addToFieldPath","splice","maybeResize","writeU8","writeU16","writeU32","writeU64","writeBuffer","writeU128","writeU256","writeU512","writeString","writeFixedArray","writeArray","elem","handlingRangeError","propertyKey","propertyDescriptor","originalMethod","BinaryReader","readU8","readU16","readU32","readU64","readBuffer","readU128","readU256","readU512","readString","readFixedArray","readArray","capitalizeFirstLetter","toUpperCase","serializeField","schema","fieldType","writer","kind","serializeStruct","borshSerialize","structSchema","fields","idx","values","Writer","deserializeField","reader","option","deserializeStruct","classType","borshDeserialize","fieldValue","Reader","Struct","properties","_classCallCheck","assign","_createClass","SOLANA_SCHEMA","decodeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","keys","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","uniquePublicKeyCounter","_Symbol$toStringTag","toStringTag","PublicKey","decoded","toBase58","zeroPad","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","programId","publicKeyBytes","wrap","_callee$","_context","abrupt","stop","createWithSeed","_x2","_x3","createProgramAddressSync","seeds","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","Layout_1","Layout$1","s16","nu64be","u48be","u40be","u32be","u16be","nu64","u40","u24","u16","u8","greedy","Constant","UTF8","Blob","BitStructure","VariantLayout","Union","UnionLayoutDiscriminator","Structure","Sequence","DoubleBE","Double","Float","NearInt64BE","NearUInt64BE","NearUInt64","IntBE","Int","UInt","OffsetLayout","GreedyCount","ExternalLayout","nameWithProperty","Layout","uint8ArrayToBuffer","checkUint8Array","constant","cstr","blob","unionLayoutDiscriminator","union","seq","struct","f64","f32be","f32","ns64be","s40be","s32be","s24be","s16be","ns64","s48","s40","s32","s24","buffer_1","span","property","makeDestinationObject","getSpan","replicate","rv","fromArray","bindConstructorLayout","Class","layout","layout_","boundConstructor_","isCount","elementSpan","rem","UIntBE","V2E32","divmodInt64","hi32","lo32","roundedInt64","NearInt64","FloatBE","elementLayout","elo","decodePrefixes","fd","fsp","firstOffset","lastOffset","lastWrote","fv","layoutFor","offsetOf","UnionDiscriminator","discr","defaultLayout","discriminator","usesPrefixDiscriminator","registry","boundGetSourceVariant","defaultGetSourceVariant","bind","getSourceVariant","configGetSourceVariant","gsv","vlo","getVariant","tag","dlo","clo","contentOffset","addVariant","variant","vb","fixBitwiseResult","msb","_packedSetValue","_packedGetValue","addField","bf","BitField","addBoolean","fieldFor","container","totalBits","usedBits","valueMask","wordMask","wordValue","srcBuffer","CString","srcb","maxSpan","u48","u24be","s8","s48be","f64be","utf8","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","readonly","_iterator","_createForOfIteratorHelper","_step","done","keySegment","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","BufferLayout","rustString","rsl","_decode","_encode","rslShim","chars","authorized","lockup","voteInit","voteAuthorizeWithSeedArgs","getAlloc","getItemAlloc","decodeLength","encodeLength","rem_len","assert$1","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","END_OF_BUFFER_ERROR_MESSAGE","guardedShift","guardedSplice","_args$","_len","_key","Message","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","signDataLayout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","accountCount","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","TransactionInstruction","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","minContextSlot","blockhash","nonceInstruction","signers","items","compileMessage","JSON","stringify","warn","accountMetas","_objectSpread","uniqueMetas","pubkeyString","uniqueIndex","sort","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","signedKeys","unsignedKeys","invariant","_compile","valid","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","browser","toBigIntLE","reversed","toBigIntLE_1","toBigIntBE","browser$1","toBufferLE","toBufferLE_1","toBufferBE","encodeDecode","bigInt","_encodeDecode","bigIntLayout","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","UpgradeNonceAccount","createAccount","params","transfer","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","CHUNK_SIZE","Loader","getMinNumSignatures","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","owner","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","objToString","objKeys","isArrayProp","propVal","toStr","fastStableStringify","returnVal","StructError","failure","failures","cached","rest","path","_cached","isIterable","isObject","iterator","print","shiftIterator","toFailure","branch","refinement","toFailures","run","coerce","coercer","validator","ts","refiner","props","is","validate","tuples","tuple","define","any","Element","literal","description","never","nullable","optional","record","Key","Value","Elements","Never","Structs","unknown","rnds8","rng","msCrypto","REGEX","uuid","test","byteToHex","_nodeId","_clockseq","_lastMSecs","_lastNSecs","v1","node","clockseq","seedBytes","random","msecs","Date","now","nsecs","dt","tl","tmh","parse","stringToBytes","unescape","encodeURIComponent","DNS","URL","v35","hashfunc","generateUUID","namespace","md5","md5ToHexEncodedArray","wordsToMd5","bytesToWords","length32","hexTab","getOutputLength","inputLength8","olda","oldb","oldc","oldd","md5ff","md5gg","md5hh","md5ii","safeAdd","length8","lsw","msw","bitRotateLeft","cnt","md5cmn","v3$1","v4","rnds","ROTL","sha1","K","N","M","_t","_t2","v5","v5$1","nil","generateRequest","method","id","request","jsonrpc","generator","notificationIdNull","generateRequest_1","ClientBrowser","callServer","reviver","replacer","callback","isBatch","isRaw","hasCallback","response","_parseResponse","responseText","isError","isNotError","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","getFirstSlotInEpoch","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","fetch","_interopRequireDefault","_typeof","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","innerFn","outerFn","tryLocsList","protoGenerator","Generator","Context","makeInvokeMethod","tryCatch","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","_invoke","AsyncIterator","PromiseImpl","invoke","reject","__await","then","unwrapped","previousPromise","callInvokeWithMethodAndArg","doneResult","delegate","delegateResult","maybeInvokeDelegate","_sent","dispatchException","methodName","info","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","displayName","isGeneratorFunction","genFun","__proto__","awrap","async","iter","skipTempReset","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","_catch","thrown","delegateYield","runtime","regenerator","regeneratorRuntime","accidentalStrictMode","Function","asyncGeneratorStep","_next","_throw","Constructor","_toPrimitive","prim","_toPropertyKey","toPropertyKey","_defineProperties","descriptor","protoProps","staticProps","_setPrototypeOf","subClass","superClass","_assertThisInitialized","ReferenceError","assertThisInitialized","_possibleConstructorReturn","_getPrototypeOf","Events","EE","once","addListener","emitter","event","listener","evt","_events","_eventsCount","clearEvent","EventEmitter","eventNames","names","events","getOwnPropertySymbols","listeners","handlers","ee","listenerCount","emit","removeListener","on","removeAllListeners","prefixed","_regenerator","_asyncToGenerator2","_typeof2","require$$3","_classCallCheck2","require$$4","_createClass2","require$$5","_inherits2","require$$6","_possibleConstructorReturn2","require$$7","_getPrototypeOf2","require$$8","_eventemitter","require$$9","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","NewTarget","construct","sham","Proxy","__rest","propertyIsEnumerable","CommonClient","_EventEmitter","webSocketFactory","_a","generate_request_id","_a$autoconnect","autoconnect","_a$reconnect","reconnect","_a$reconnect_interval","reconnect_interval","_a$max_reconnects","max_reconnects","rest_options","queue","rpc_id","ready","reconnect_timer_id","current_reconnects","_connect","connect","socket","timeout","ws_opts","send","promise","_login","resp","login","_listMethods","listMethods","notify","_subscribe","subscribe","_unsubscribe","_callee4","_callee4$","_context4","unsubscribe","close","_this4","clearTimeout","addEventListener","notification","reason","_default","WebSocketBrowserImpl","protocols","WebSocket","onopen","onmessage","onerror","onclose","optionsOrCallback","cb","RpcWebSocketClient","_RpcWebSocketCommonCl","url","rpc","createRpc","underlyingSocket","_this$underlyingSocke","readyState","_get2","_get","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","protocol","startsWith","startPort","websocketPort","PublicKeyFromString","RawAccountDataResult","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","pick","UnknownRpcResult","jsonRpcResult","jsonRpcResultAndContext","notificationResultAndContext","versionedMessageFromResponse","GetInflationGovernorResult","foundation","foundationTerm","taper","terminal","GetInflationRewardResult","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","GetLeaderScheduleResult","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","fetchWithMiddleware","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","too_many_requests_retries","waitTime","text","body","headers","COMMON_HTTP_HEADERS","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_requestPromises$requ","_extractCommitmentFro","requestHash","_buildArgs","unsafeRes","wsEndpoint","confirmTransactionInitialTimeout","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","u64$1","SHA3_PI","SHA3_ROTL","_SHA3_IOTA","_7n","_256n","_0x71n","SHA3_IOTA_H","SHA3_IOTA_L","rotlH","rotlL","keccakP","rounds","idx1","idx0","B0","B1","Th","Tl","curH","curL","PI","Keccak","suffix","enableXOF","posOut","state32","keccak","writeInto","bufferOut","xofInto","xof","keccak_256","genShake","validatePointOpts","allowedPrivateKeyLengths","wrapPrivateKey","allowInfinityPoint","endo","beta","splitScalar","b2n","h2b","ut","DER","Err","DERErr","_parseInt","toSig","sBytes","rBytesLeft","hexFromSig","rhl","rl","weierstrassPoints","isCompressed","tail","weierstrassEquation","x3","isWithinCurveOrder","assertGE","normPrivateKeyToScalar","ut.bytesToNumberBE","mod.mod","assertPrjPoint","px","py","pz","hasEvenY","U1","U2","t3","t4","t5","k1neg","k1","k2neg","k1p","k2p","fake","f1p","f2p","multiplyAndAddUnsafe","_bits","ProjectivePoint","hmac","bits2int","bits2int_modN","lowS","weierstrass","compressedLen","uncompressedLen","isValidFieldElement","invN","mod.invert","cat","isYOdd","isHeadOdd","numToNByteStr","ut.numberToBytesBE","isBiggerThanHalfOrder","HALF","normalizeS","slcNum","Signature","recovery","addRecoveryBit","recoverPublicKey","msgHash","rec","radj","ir","hasHighS","toDERRawBytes","ut.hexToBytes","toDERHex","toCompactRawBytes","toCompactHex","isValidPrivateKey","rand","mod.hashToPrivateScalar","fromPrivateKey","isProbPub","privateA","publicB","ORDER_MASK","ut.bitMask","int2octets","prepSig","defaultSigOpts","extraEntropy","ent","h1int","seedArgs","k2sig","kBytes","ik","normS","defaultVerOpts","drbg","ut.createHmacDrbg","sg","_sig","fromDER","derError","fromCompact","SWUFpSqrtRatio","c2","c3","c4","c5","c6","c7","sqrtRatio","tv5","tv4","isQR","tvv5","mapToCurveSimpleSWU","mod.validateField","tv6","HMAC","iHash","oHash","getHash","createCurve","defHash","secp256k1P","secp256k1N","divNearest","sqrtMod","_6n","_11n","_22n","_23n","_44n","_88n","b11","b22","b44","b88","b176","b220","b223","secp256k1","POW_2_128","fe","TAGGED_HASH_PREFIXES","taggedHash","messages","tagP","tagH","pointToBytes","numTo32b","GmulAdd","schnorrGetExtPubKey","priv","d_","lift_x","xx","challenge","schnorrGetPublicKey","schnorrSign","auxRand","k_","rx","schnorrVerify","pub","isoMap","htf.isogenyMap","mapSWU","ecdsaSign","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","authorize","authorizeWithSeed","splitInstruction","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":"4+pBAEAA,SAAAC,WAAqBA,WACrBD,SAAAE,YAAsBA,YACtBF,SAAAG,cAAwBA,cAExB,IAAIC,OAAS,GACb,IAAIC,UAAY,GAChB,IAAIC,WAAaC,aAAe,YAAcA,WAAaC,MAE3D,IAAIC,KAAO,mEACX,IAAK,IAAIC,IAAI,EAAGC,IAAMF,KAAKG,OAAQF,IAAIC,MAAOD,IAAG,CAC/CN,OAAOM,KAAKD,KAAKC,KACjBL,UAAUI,KAAKI,WAAWH,MAAMA,GAClC,CAIAL,UAAU,IAAIQ,WAAW,IAAM,GAC/BR,UAAU,IAAIQ,WAAW,IAAM,GAE/B,SAASC,QAASC,KAChB,IAAIJ,IAAMI,IAAIH,OAEd,GAAID,IAAM,EAAI,EAAG,CACf,MAAM,IAAIK,MAAM,iDACjB,CAID,IAAIC,SAAWF,IAAIG,QAAQ,KAC3B,GAAID,YAAc,EAAGA,SAAWN,IAEhC,IAAIQ,gBAAkBF,WAAaN,IAC/B,EACA,EAAKM,SAAW,EAEpB,MAAO,CAACA,SAAUE,gBACpB,CAGA,SAASlB,WAAYc,KACnB,IAAIK,KAAON,QAAQC,KACnB,IAAIE,SAAWG,KAAK,GACpB,IAAID,gBAAkBC,KAAK,GAC3B,OAASH,SAAWE,iBAAmB,EAAI,EAAKA,eAClD,CAEA,SAASE,YAAaN,IAAKE,SAAUE,iBACnC,OAASF,SAAWE,iBAAmB,EAAI,EAAKA,eAClD,CAEA,SAASjB,YAAaa,KACpB,IAAIO,IACJ,IAAIF,KAAON,QAAQC,KACnB,IAAIE,SAAWG,KAAK,GACpB,IAAID,gBAAkBC,KAA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AAe9sC,QAAQ8sC,cACvBC,oBAAqB/sC,QAAQ+sC,qBAAuB/sC,QAAQgtC,WAC5D7G,eAAgBnmC,QAAQmmC,gBACzB1Z,SAAAlO,KAAA,EAAA,OAEuB8pB,WAAWmhD,mBACjCM,eACAn9C,aACD,KAAA,EAHK/U,UAASnL,SAAA8b,KAKTyE,WAAahtC,SAAWA,QAAQgtC,WAChCw+B,oBAAsBogC,qBACxBvjE,WAAW8E,mBAAmBy+D,qBAAsB5+D,YACpD3E,WAAW8E,mBAAmBvV,UAAWoV,YAAWvgB,SAAAlO,KAAA,EAAA,OAClCitD,oBAAmB,KAAA,EAAnC5+B,OAAMngB,SAAA8b,KAA+Bv1D,MAAK,IAE5C45D,OAAOhf,IAAG,CAAAnB,SAAAlO,KAAA,GAAA,KAAA,CAAA,MACN,IAAIjuC,MAAK,mBAAA8H,OACMw/C,UAASx/C,aAAAA,OAAYquD,KAAKC,UAAUkG,cACxD,KAAA,GAAA,OAAAngB,SAAAC,OAAA,SAGIkL,WAAS,KAAA,GAAA,IAAA,MAAA,OAAAnL,SAAAE,OAAA,GAAAR,QACjB,KAAA,OAAAs/E,8BAAA/xH,MAAA1E,KAAA0D,UAAA,CC9EM,IAAMmzH,iBAAmB","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18,19,20,21,22,23,24,25,26,27,32,54,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,106,107,108,109,110,111,112]} -\ No newline at end of file -diff --git a/lib/index.native.js b/lib/index.native.js -index 6eaf6f414c36b3f1448982d36ca852c97e8e3124..614f236d8cbcb93780f36dd8d1606a75d822601b 100644 ---- a/lib/index.native.js -+++ b/lib/index.native.js -@@ -974,6 +974,35 @@ var CompiledKeys = /*#__PURE__*/function () { - return CompiledKeys; - }(); - -+var END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly'; -+ -+/** -+ * Delegates to `Array#shift`, but throws if the array is zero-length. -+ */ -+function guardedShift(byteArray) { -+ if (byteArray.length === 0) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.shift(); -+} -+ -+/** -+ * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of -+ * the array. -+ */ -+function guardedSplice(byteArray) { -+ var _args$; -+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { -+ args[_key - 1] = arguments[_key]; -+ } -+ var start = args[0]; -+ if (args.length === 2 // Implies that `deleteCount` was supplied -+ ? start + ((_args$ = args[1]) !== null && _args$ !== void 0 ? _args$ : 0) > byteArray.length : start >= byteArray.length) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.splice.apply(byteArray, _toConsumableArray__default.default(args)); -+} -+ - /** - * An instruction to execute by a program - * -@@ -1157,32 +1186,28 @@ var Message = /*#__PURE__*/function () { - value: function from(buffer$1) { - // Slice up wire data - var byteArray = _toConsumableArray__default.default(buffer$1); -- var numRequiredSignatures = byteArray.shift(); -+ var numRequiredSignatures = guardedShift(byteArray); - if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) { - throw new Error('Versioned messages must be deserialized with VersionedMessage.deserialize()'); - } -- var numReadonlySignedAccounts = byteArray.shift(); -- var numReadonlyUnsignedAccounts = byteArray.shift(); -+ var numReadonlySignedAccounts = guardedShift(byteArray); -+ var numReadonlyUnsignedAccounts = guardedShift(byteArray); - var accountCount = decodeLength(byteArray); - var accountKeys = []; - for (var i = 0; i < accountCount; i++) { -- var account = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - accountKeys.push(new PublicKey(buffer.Buffer.from(account))); - } -- var recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ var recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - var instructionCount = decodeLength(byteArray); - var instructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var _accountCount = decodeLength(byteArray); -- var accounts = byteArray.slice(0, _accountCount); -- byteArray = byteArray.slice(_accountCount); -+ var accounts = guardedSplice(byteArray, 0, _accountCount); - var dataLength = decodeLength(byteArray); -- var dataSlice = byteArray.slice(0, dataLength); -+ var dataSlice = guardedSplice(byteArray, 0, dataLength); - var data = bs58__default.default.encode(buffer.Buffer.from(dataSlice)); -- byteArray = byteArray.slice(dataLength); - instructions.push({ - programIdIndex: programIdIndex, - accounts: accounts, -@@ -1493,30 +1518,30 @@ var MessageV0 = /*#__PURE__*/function () { - key: "deserialize", - value: function deserialize(serializedMessage) { - var byteArray = _toConsumableArray__default.default(serializedMessage); -- var prefix = byteArray.shift(); -+ var prefix = guardedShift(byteArray); - var maskedPrefix = prefix & VERSION_PREFIX_MASK; - assert(prefix !== maskedPrefix, "Expected versioned message but received legacy message"); - var version = maskedPrefix; - assert(version === 0, "Expected versioned message with version 0 but found version ".concat(version)); - var header = { -- numRequiredSignatures: byteArray.shift(), -- numReadonlySignedAccounts: byteArray.shift(), -- numReadonlyUnsignedAccounts: byteArray.shift() -+ numRequiredSignatures: guardedShift(byteArray), -+ numReadonlySignedAccounts: guardedShift(byteArray), -+ numReadonlyUnsignedAccounts: guardedShift(byteArray) - }; - var staticAccountKeys = []; - var staticAccountKeysLength = decodeLength(byteArray); - for (var i = 0; i < staticAccountKeysLength; i++) { -- staticAccountKeys.push(new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH))); -+ staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH))); - } -- var recentBlockhash = bs58__default.default.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var recentBlockhash = bs58__default.default.encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var instructionCount = decodeLength(byteArray); - var compiledInstructions = []; - for (var _i = 0; _i < instructionCount; _i++) { -- var programIdIndex = byteArray.shift(); -+ var programIdIndex = guardedShift(byteArray); - var accountKeyIndexesLength = decodeLength(byteArray); -- var accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength); -+ var accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength); - var dataLength = decodeLength(byteArray); -- var data = new Uint8Array(byteArray.splice(0, dataLength)); -+ var data = new Uint8Array(guardedSplice(byteArray, 0, dataLength)); - compiledInstructions.push({ - programIdIndex: programIdIndex, - accountKeyIndexes: accountKeyIndexes, -@@ -1526,11 +1551,11 @@ var MessageV0 = /*#__PURE__*/function () { - var addressTableLookupsCount = decodeLength(byteArray); - var addressTableLookups = []; - for (var _i2 = 0; _i2 < addressTableLookupsCount; _i2++) { -- var accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ var accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); - var writableIndexesLength = decodeLength(byteArray); -- var writableIndexes = byteArray.splice(0, writableIndexesLength); -+ var writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength); - var readonlyIndexesLength = decodeLength(byteArray); -- var readonlyIndexes = byteArray.splice(0, readonlyIndexesLength); -+ var readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength); - addressTableLookups.push({ - accountKey: accountKey, - writableIndexes: writableIndexes, -@@ -2409,8 +2434,7 @@ var Transaction = /*#__PURE__*/function () { - var signatureCount = decodeLength(byteArray); - var signatures = []; - for (var i = 0; i < signatureCount; i++) { -- var signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES); -- byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES); -+ var signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES); - signatures.push(bs58__default.default.encode(buffer.Buffer.from(signature))); - } - return Transaction.populate(Message.from(byteArray), signatures); -@@ -2665,7 +2689,7 @@ var VersionedTransaction = /*#__PURE__*/function () { - var signatures = []; - var signaturesLength = decodeLength(byteArray); - for (var i = 0; i < signaturesLength; i++) { -- signatures.push(new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES))); -+ signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES))); - } - var message = VersionedMessage.deserialize(new Uint8Array(byteArray)); - return new VersionedTransaction(message, signatures); -@@ -5977,7 +6001,7 @@ var LogsNotificationResult = superstruct.type({ - - /** @internal */ - var COMMON_HTTP_HEADERS = { -- 'solana-client': "js/".concat((_process$env$npm_pack = "0.0.0-development") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') -+ 'solana-client': "js/".concat((_process$env$npm_pack = "1.78.4") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN') - }; - - /** -@@ -13290,10 +13314,8 @@ var ValidatorInfo = /*#__PURE__*/function () { - if (configKeyCount !== 2) return null; - var configKeys = []; - for (var i = 0; i < 2; i++) { -- var publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH)); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -- var isSigner = byteArray.slice(0, 1)[0] === 1; -- byteArray = byteArray.slice(1); -+ var publicKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)); -+ var isSigner = guardedShift(byteArray) === 1; - configKeys.push({ - publicKey: publicKey, - isSigner: isSigner -diff --git a/lib/index.native.js.map b/lib/index.native.js.map -index 42418be59fb9062dde88577f9cdd9a69e116b92c..f21a46bbc7806eee3f24d5ae07f99c727d7ea4c2 100644 ---- a/lib/index.native.js.map -+++ b/lib/index.native.js.map -@@ -1 +1 @@ --{"version":3,"file":"index.native.js","sources":["../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/__forks__/react-native/fetch-impl.ts","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = byteArray.shift()!;\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = byteArray.shift()!;\n const numReadonlyUnsignedAccounts = byteArray.shift()!;\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH);\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift()!;\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = byteArray.slice(0, accountCount);\n byteArray = byteArray.slice(accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = byteArray.slice(0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n byteArray = byteArray.slice(dataLength);\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = byteArray.shift() as number;\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: byteArray.shift() as number,\n numReadonlySignedAccounts: byteArray.shift() as number,\n numReadonlyUnsignedAccounts: byteArray.shift() as number,\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = byteArray.shift() as number;\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength);\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(byteArray.splice(0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = byteArray.splice(0, writableIndexesLength);\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = byteArray.splice(0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);\n byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","export const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport default globalThis.fetch;\n","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH));\n byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);\n const isSigner = byteArray.slice(0, 1)[0] === 1;\n byteArray = byteArray.slice(1);\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toBytes","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","sha256","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","blob","rustString","rsl","struct","u32","offset","_decode","bind","_encode","rslShim","str","chars","span","authorized","lockup","ns64","voteInit","u8","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","bytes","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","assert","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","Message","args","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","seq","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","byteArray","accountCount","i","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","splice","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","add","_len","items","_key","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","nu64","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","encodeDecode","bigInt","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","u64","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","number","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","fetchWithMiddleware","info","init","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","hash","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","u16","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","split","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAMO,IAAMA,kBAAkB,GAAGC,eAAO,CAACC,KAAK,CAACC,gBAAgB,CAAA;AACzD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAyB;EACnD,IAAMC,aAAa,GAAGJ,eAAO,CAACC,KAAK,CAACC,gBAAgB,EAAE,CAAA;AACtD,EAAA,IAAMG,SAAS,GAAGC,YAAY,CAACF,aAAa,CAAC,CAAA;AAC7C,EAAA,IAAMG,SAAS,GAAG,IAAIC,UAAU,CAAC,EAAE,CAAC,CAAA;AACpCD,EAAAA,SAAS,CAACE,GAAG,CAACL,aAAa,CAAC,CAAA;AAC5BG,EAAAA,SAAS,CAACE,GAAG,CAACJ,SAAS,EAAE,EAAE,CAAC,CAAA;EAC5B,OAAO;AAC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,kBAAkB,CAAC5Y,SAAS,EAAEyY,UAAU,CAAC,CAAA;AAAA1b,UAAAA,QAAA,CAAAE,IAAA,GAAA,CAAA,CAAA;AAAA,UAAA,OAClC0oC,mBAAmB,CAAA;AAAA,QAAA,KAAA,CAAA;AAAnCttB,UAAAA,MAAM,GAAAtb,QAAA,CAAAiX,IAAA,CAA+B7a,KAAK,CAAA;UAAA,IAE5Ckf,CAAAA,MAAM,CAAC3Z,GAAG,EAAA;AAAA3B,YAAAA,QAAA,CAAAE,IAAA,GAAA,EAAA,CAAA;AAAA,YAAA,MAAA;AAAA,WAAA;AAAA,UAAA,MACN,IAAI5C,KAAK,CAAA,kBAAA,CAAA4B,MAAA,CACM+D,SAAS,EAAA/D,WAAAA,CAAAA,CAAAA,MAAA,CAAYyV,IAAI,CAACC,SAAS,CAAC0G,MAAM,CAAC,MAChE,CAAC,CAAA;AAAA,QAAA,KAAA,EAAA;AAAA,UAAA,OAAAtb,QAAA,CAAAI,MAAA,CAAA,QAAA,EAGI6C,SAAS,CAAA,CAAA;AAAA,QAAA,KAAA,EAAA,CAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAjD,QAAA,CAAAK,IAAA,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA,EAAAZ,OAAA,CAAA,CAAA;GACjB,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAi+D,6BAAA,CAAAh9D,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA;;ACjFD;AACA;AACA;AACO,IAAMm9D,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[30]} -\ No newline at end of file -+{"version":3,"file":"index.native.js","sources":["../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/utils/guarded-array-utils.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../../../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../src/epoch-schedule.ts","../src/errors.ts","../src/__forks__/react-native/fetch-impl.ts","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["import {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","const END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';\n\n/**\n * Delegates to `Array#shift`, but throws if the array is zero-length.\n */\nexport function guardedShift(byteArray: T[]): T {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift() as T;\n}\n\n/**\n * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of\n * the array.\n */\nexport function guardedSplice(\n byteArray: T[],\n ...args:\n | [start: number, deleteCount?: number]\n | [start: number, deleteCount: number, ...items: T[]]\n): T[] {\n const [start] = args;\n if (\n args.length === 2 // Implies that `deleteCount` was supplied\n ? start + (args[1] ?? 0) > byteArray.length\n : start >= byteArray.length\n ) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(\n ...(args as Parameters),\n );\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = guardedShift(byteArray);\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray),\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(\n byteArray,\n 0,\n accountKeyIndexesLength,\n );\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = guardedSplice(\n byteArray,\n 0,\n writableIndexesLength,\n );\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(\n byteArray,\n 0,\n readonlyIndexesLength,\n );\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures?: boolean): boolean {\n return this._verifySignatures(\n this.serializeMessage(),\n requireAllSignatures === undefined ? true : requireAllSignatures,\n );\n }\n\n /**\n * @internal\n */\n _verifySignatures(\n signData: Uint8Array,\n requireAllSignatures: boolean,\n ): boolean {\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n return false;\n }\n } else {\n if (!verify(signature, signData, publicKey.toBytes())) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (\n verifySignatures &&\n !this._verifySignatures(signData, requireAllSignatures)\n ) {\n throw new Error('Signature verification failed');\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {toBigIntLE, toBufferLE} from 'bigint-buffer';\n\ninterface EncodeDecode {\n decode(buffer: Buffer, offset?: number): T;\n encode(src: T, buffer: Buffer, offset?: number): number;\n}\n\nconst encodeDecode = (layout: Layout): EncodeDecode => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {decode, encode};\n};\n\nconst bigInt =\n (length: number) =>\n (property?: string): Layout => {\n const layout = blob(length, property);\n const {encode, decode} = encodeDecode(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n\n return bigIntLayout;\n };\n\nexport const u64 = bigInt(8);\n\nexport const u128 = bigInt(16);\n\nexport const u192 = bigInt(24);\n\nexport const u256 = bigInt(32);\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export class SendTransactionError extends Error {\n logs: string[] | undefined;\n\n constructor(message: string, logs?: string[]) {\n super(message);\n\n this.logs = logs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","export const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport default globalThis.fetch;\n","import RpcWebSocketCommonClient from 'rpc-websockets/dist/lib/client';\nimport RpcWebSocketBrowserFactory from 'rpc-websockets/dist/lib/client/websocket.browser';\nimport {\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n} from 'rpc-websockets/dist/lib/client/client.types';\n\nimport createRpc from './rpc-websocket-factory';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends RpcWebSocketCommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = (\n rpc as ReturnType\n ).socket;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explictly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to solana-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remark If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of account addresses to return post simulation state for */\n accounts?: {\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n};\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.log(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: ConfirmedTransactionMetaResult,\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n };\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n configWithoutEncoding,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since v1.13.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since Solana v1.8.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getConfirmedTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\n 'failed to simulate transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(\n disableCache,\n );\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError(\n 'failed to send transaction: ' + res.error.message,\n logs,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(\n `${method} error for argument`,\n args,\n e.message,\n );\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify(\n [subscriptionConfig.method, args],\n true /* isArrayProp */,\n );\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param commitment Specify the commitment level account changes must reach before notification\n * @param filters The program account filters to pass into the RPC method\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n filters ? {filters: filters} : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param id client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param id client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import {toBufferLE} from 'bigint-buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeState::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params: SplitStakeParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: 0,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params: SplitStakeWithSeedParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: false,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n 'Authorize' | 'AuthorizeWithSeed' | 'InitializeAccount' | 'Withdraw';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = process.env.TEST_LIVE ? 3762 : 3731;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insuffcient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\nimport {guardedShift, guardedSplice} from './utils/guarded-array-utils';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","_unused","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","Struct","properties","_classCallCheck","Object","assign","_createClass","key","value","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","_Struct","_inherits","_super","_createSuper","_this","call","keys","length","Error","map","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","_bn","undefined","uniquePublicKeyCounter","_Symbol$toStringTag","Symbol","toStringTag","PublicKey","decoded","bs58","BN","equals","eq","toBase58","toBytes","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","get","concat","toString","unique","_createWithSeed","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fromPublicKey","seed","programId","publicKeyBytes","wrap","_callee$","_context","prev","next","sha256","abrupt","stop","createWithSeed","_x","_x2","_x3","apply","arguments","createProgramAddressSync","seeds","forEach","TypeError","_createProgramAddress","_callee2","_callee2$","_context2","createProgramAddress","_x4","_x5","findProgramAddressSync","nonce","address","seedsWithNonce","err","_findProgramAddress","_callee3","_callee3$","_context3","findProgramAddress","_x6","_x7","pubkeyData","pubkey","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","_Error","signature","_wrapNativeSuper","defineProperty","prototype","TransactionExpiredTimeoutError","_Error2","_super2","timeoutSeconds","_this2","toFixed","TransactionExpiredNonceInvalidError","_Error3","_super3","_this3","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","index","_iterator","_createForOfIteratorHelper","_step","s","n","done","keySegment","e","f","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","blob","rustString","rsl","struct","u32","offset","_decode","bind","_encode","rslShim","str","chars","span","authorized","lockup","ns64","voteInit","u8","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","bytes","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","getMessageComponents","mapEntries","_toConsumableArray","entries","assert","writableSigners","filter","_ref","_ref2","_slicedToArray","isSigner","isWritable","readonlySigners","_ref3","_ref4","writableNonSigners","_ref5","_ref6","readonlyNonSigners","_ref7","_ref8","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","_writableSigners$","payerAddress","_ref9","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","extractTableLookup","lookupTable","_this$drainKeysFoundI","drainKeysFoundInLookupTable","state","addresses","keyMeta","isInvoked","_this$drainKeysFoundI2","writableIndexes","drainedWritableKeys","_this$drainKeysFoundI3","_this$drainKeysFoundI4","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","_loop","_step$value","lookupTableIndex","findIndex","entry","compile","getOrInsertDefault","payerKeyMeta","_iterator2","_step2","ix","_iterator3","_step3","accountMeta","END_OF_BUFFER_ERROR_MESSAGE","guardedShift","byteArray","guardedSplice","_args$","_len","args","_key","start","splice","Message","accountKeys","recentBlockhash","indexToProgramIds","account","accounts","getAccountKeys","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","seq","signDataLayout","Layout","transaction","signData","compiledKeys","payerKey","_compiledKeys$getMess","_compiledKeys$getMess2","accountCount","i","dataSlice","messageArgs","MessageV0","compiledInstructions","addressTableLookups","count","lookup","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","_iterator4","_step4","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","_iterator5","_step5","encodedAccountKeyIndexesLength","encodedDataLength","_iterator6","_step6","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","lookupTableAccounts","_iterator7","_step7","extractResult","_accountKeysFromLooku","_accountKeysFromLooku2","_extractResult","addressTableLookup","_extractResult$","maskedPrefix","version","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","minContextSlot","blockhash","nonceInstruction","signers","add","items","compileMessage","JSON","stringify","console","warn","accountMetas","_objectSpread","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","_uniqueMetas$splice","_uniqueMetas$splice2","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","_getEstimatedFee","connection","getFeeForMessage","sent","getEstimatedFee","setSigners","_len2","_key2","seen","Set","_len3","_key3","uniqueSigners","_i","_signers","signer","_partialSign","partialSign","_len4","_key4","_i2","_signers2","_len5","_key5","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","_verifySignatures","_step2$value","config","_Object$assign","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","compileToLegacyMessage","compileToV0Message","decompile","compiledIx","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","messageData","signerPubkeys","signerIndex","signaturesLength","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","sendAndConfirmTransaction","_sendAndConfirmTransaction","sendOptions","status","nonceAccountPubkey","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","confirmTransaction","abortSignal","nonceValue","sleep","ms","Promise","resolve","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","nu64","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","encodeDecode","bigInt","_encodeDecode","bigIntLayout","src","toBigIntLE","toBufferLE","u64","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","_Object$entries","SYSTEM_INSTRUCTION_LAYOUTS","_Object$entries$_i","ixType","decodeCreateAccount","checkKeyLength","_decodeData","Create","lamports","space","fromPubkey","newAccountPubkey","decodeTransfer","_decodeData2","Transfer","toPubkey","decodeTransferWithSeed","_decodeData3","TransferWithSeed","basePubkey","decodeAllocate","_decodeData4","Allocate","accountPubkey","decodeAllocateWithSeed","_decodeData5","AllocateWithSeed","base","decodeAssign","_decodeData6","Assign","decodeAssignWithSeed","_decodeData7","AssignWithSeed","decodeCreateWithSeed","_decodeData8","CreateWithSeed","decodeNonceInitialize","_decodeData9","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","_decodeData10","WithdrawNonceAccount","decodeNonceAuthorize","_decodeData11","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","_load","program","balanceNeeded","programInfo","dataLayout","array","transactions","_data","_transaction","REQUESTS_PER_SECOND","_dataLayout","_data2","_transaction2","deployCommitment","finalizeSignature","_yield$connection$con","context","currentSlot","getMinimumBalanceForRentExemption","getAccountInfo","executable","error","owner","bytesLength","bytesLengthPadding","_rpcEndpoint","all","getSlot","slot","t0","round","load","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","SendTransactionError","logs","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","customMessage","code","name","globalThis","fetch","RpcWebSocketClient","_RpcWebSocketCommonCl","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","_this$underlyingSocke","readyState","_get2","_get","_getPrototypeOf","reject","notify","_this$underlyingSocke2","_get3","RpcWebSocketCommonClient","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","_BufferLayout$struct$","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","_matches","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","_objectWithoutProperties","_excluded","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","number","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","fetchWithMiddleware","info","init","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","too_many_requests_retries","res","waitTime","text","method","body","headers","COMMON_HTTP_HEADERS","log","statusText","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","parsed","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","innerInstructions","preBalances","postBalances","logMessages","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_process$env$npm_pack","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_callee4","_requestPromises$requ","_extractCommitmentFro","requestHash","_callee4$","_context4","_buildArgs","fastStableStringify","unsafeRes","finish","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","_getBalanceAndContext","_callee5","_extractCommitmentFro2","_callee5$","_context5","getBalanceAndContext","_getBalance","_callee6","_callee6$","_context6","then","getBalance","_x8","_x9","_getBlockTime","_callee7","_callee7$","_context7","getBlockTime","_x10","_getMinimumLedgerSlot","_callee8","_callee8$","_context8","getMinimumLedgerSlot","_getFirstAvailableBlock","_callee9","_callee9$","_context9","getFirstAvailableBlock","_getSupply","_callee10","configArg","_callee10$","_context10","getSupply","_x11","_getTokenSupply","_callee11","tokenMintAddress","_callee11$","_context11","getTokenSupply","_x12","_x13","_getTokenAccountBalance","_callee12","tokenAddress","_callee12$","_context12","getTokenAccountBalance","_x14","_x15","_getTokenAccountsByOwner","_callee13","ownerAddress","_extractCommitmentFro3","_args","_callee13$","_context13","getTokenAccountsByOwner","_x16","_x17","_x18","_getParsedTokenAccountsByOwner","_callee14","_callee14$","_context14","getParsedTokenAccountsByOwner","_x19","_x20","_x21","_getLargestAccounts","_callee15","arg","_callee15$","_context15","getLargestAccounts","_x22","_getTokenLargestAccounts","_callee16","mintAddress","_callee16$","_context16","getTokenLargestAccounts","_x23","_x24","_getAccountInfoAndContext","_callee17","_extractCommitmentFro4","_callee17$","_context17","getAccountInfoAndContext","_x25","_x26","_getParsedAccountInfo","_callee18","_extractCommitmentFro5","_callee18$","_context18","getParsedAccountInfo","_x27","_x28","_getAccountInfo","_callee19","_callee19$","_context19","_x29","_x30","_getMultipleParsedAccounts","_callee20","publicKeys","rawConfig","_extractCommitmentFro6","_callee20$","_context20","getMultipleParsedAccounts","_x31","_x32","_getMultipleAccountsInfoAndContext","_callee21","_extractCommitmentFro7","_callee21$","_context21","getMultipleAccountsInfoAndContext","_x33","_x34","_getMultipleAccountsInfo","_callee22","_callee22$","_context22","getMultipleAccountsInfo","_x35","_x36","_getStakeActivation","_callee23","_extractCommitmentFro8","_callee23$","_context23","getStakeActivation","_x37","_x38","_x39","_getProgramAccounts","_callee24","configOrCommitment","_extractCommitmentFro9","encoding","configWithoutEncoding","baseSchema","_callee24$","_context24","_excluded2","withContext","getProgramAccounts","_x40","_x41","_getParsedProgramAccounts","_callee25","_extractCommitmentFro10","_callee25$","_context25","getParsedProgramAccounts","_x42","_x43","_confirmTransaction","_callee26","strategy","rawSignature","_config$abortSignal","_config","decodedSignature","_callee26$","_context26","aborted","reason","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","_x44","_x45","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","_callee27","_callee27$","_context27","getSignatureStatus","abortConfirmation","removeSignatureListener","_confirmTransactionUsingBlockHeightExceedanceStrategy","_callee30","_ref8$strategy","expiryPromise","_this$getTransactionC","cancellationPromise","outcome","_callee30$","_context30","checkBlockHeight","_callee28","_callee28$","_context28","_callee29","currentBlockHeight","_callee29$","_context29","BLOCKHEIGHT_EXCEEDED","race","_x46","_confirmTransactionUsingDurableNonceStrategy","_callee33","_this4","_ref11$strategy","_this$getTransactionC2","_signatureStatus","signatureStatus","_outcome$slotInWhichN","commitmentForStatus","_callee33$","_context34","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","_callee31","_yield$_this4$getNonc","_context31","_callee31$","_context32","getNonceAndContext","_callee32","_callee32$","_context33","NONCE_INVALID","slotInWhichNonceDidAdvance","_x47","_confirmTransactionUsingLegacyTimeoutStrategy","_callee34","_this5","timeoutId","_this$getTransactionC3","_callee34$","_context35","timeoutMs","TIMED_OUT","clearTimeout","_x48","_getClusterNodes","_callee35","_callee35$","_context36","getClusterNodes","_getVoteAccounts","_callee36","_callee36$","_context37","getVoteAccounts","_x49","_getSlot","_callee37","_extractCommitmentFro11","_callee37$","_context38","_x50","_getSlotLeader","_callee38","_extractCommitmentFro12","_callee38$","_context39","getSlotLeader","_x51","_getSlotLeaders","_callee39","startSlot","limit","_callee39$","_context40","getSlotLeaders","_x52","_x53","_getSignatureStatus","_callee40","_yield$this$getSignat","_callee40$","_context41","getSignatureStatuses","_x54","_x55","_getSignatureStatuses","_callee41","_callee41$","_context42","_x56","_x57","_getTransactionCount","_callee42","_extractCommitmentFro13","_callee42$","_context43","getTransactionCount","_x58","_getTotalSupply","_callee43","_callee43$","_context44","excludeNonCirculatingAccountsList","getTotalSupply","_x59","_getInflationGovernor","_callee44","_callee44$","_context45","getInflationGovernor","_x60","_getInflationReward","_callee45","_extractCommitmentFro14","_callee45$","_context46","getInflationReward","_x61","_x62","_x63","_getInflationRate","_callee46","_callee46$","_context47","getInflationRate","_getEpochInfo","_callee47","_extractCommitmentFro15","_callee47$","_context48","getEpochInfo","_x64","_getEpochSchedule","_callee48","epochSchedule","_callee48$","_context49","getEpochSchedule","_getLeaderSchedule","_callee49","_callee49$","_context50","getLeaderSchedule","_getMinimumBalanceForRentExemption","_callee50","_callee50$","_context51","_x65","_x66","_getRecentBlockhashAndContext","_callee51","_callee51$","_context52","getRecentBlockhashAndContext","_x67","_getRecentPerformanceSamples","_callee52","_callee52$","_context53","getRecentPerformanceSamples","_x68","_getFeeCalculatorForBlockhash","_callee53","_res$result","_callee53$","_context54","getFeeCalculatorForBlockhash","_x69","_x70","_getFeeForMessage","_callee54","wireMessage","_callee54$","_context55","_x71","_x72","_getRecentPrioritizationFees","_callee55","_config$lockedWritabl","_callee55$","_context56","lockedWritableAccounts","getRecentPrioritizationFees","_x73","_getRecentBlockhash","_callee56","_callee56$","_context57","getRecentBlockhash","_x74","_getLatestBlockhash","_callee57","_callee57$","_context58","getLatestBlockhashAndContext","getLatestBlockhash","_x75","_getLatestBlockhashAndContext","_callee58","_extractCommitmentFro16","_callee58$","_context59","_x76","_isBlockhashValid","_callee59","_extractCommitmentFro17","_callee59$","_context60","isBlockhashValid","_x77","_x78","_getVersion","_callee60","_callee60$","_context61","getVersion","_getGenesisHash","_callee61","_callee61$","_context62","getGenesisHash","_getBlock","_callee62","_extractCommitmentFro18","_res","_res2","_callee62$","_context63","_buildArgsAtLeastConfirmed","transactionDetails","t1","getBlock","_x79","_x80","_getParsedBlock","_callee63","_extractCommitmentFro19","_res3","_res4","_callee63$","_context64","getParsedBlock","_x81","_x82","_getBlockProduction","_callee64","extra","c","_callee64$","_context65","_excluded3","getBlockProduction","_x83","_getTransaction","_callee65","_extractCommitmentFro20","_callee65$","_context66","getTransaction","_x84","_x85","_getParsedTransaction","_callee66","_extractCommitmentFro21","_callee66$","_context67","getParsedTransaction","_x86","_x87","_getParsedTransactions","_callee67","_this6","_extractCommitmentFro22","_callee67$","_context68","getParsedTransactions","_x88","_x89","_getTransactions","_callee68","_this7","_extractCommitmentFro23","_callee68$","_context69","getTransactions","_x90","_x91","_getConfirmedBlock","_callee69","block","_callee69$","_context70","_ref17","getConfirmedBlock","_x92","_x93","_getBlocks","_callee70","endSlot","_callee70$","_context71","getBlocks","_x94","_x95","_x96","_getBlockSignatures","_callee71","_callee71$","_context72","getBlockSignatures","_x97","_x98","_getConfirmedBlockSignatures","_callee72","_callee72$","_context73","getConfirmedBlockSignatures","_x99","_x100","_getConfirmedTransaction","_callee73","_callee73$","_context74","getConfirmedTransaction","_x101","_x102","_getParsedConfirmedTransaction","_callee74","_callee74$","_context75","getParsedConfirmedTransaction","_x103","_x104","_getParsedConfirmedTransactions","_callee75","_this8","_callee75$","_context76","getParsedConfirmedTransactions","_x105","_x106","_getConfirmedSignaturesForAddress","_callee76","firstAvailableBlock","highestConfirmedRoot","_block","confirmedSignatureInfo","_callee76$","_context77","until","before","getConfirmedSignaturesForAddress2","getConfirmedSignaturesForAddress","_x107","_x108","_x109","_getConfirmedSignaturesForAddress2","_callee77","_callee77$","_context78","_x110","_x111","_x112","_getSignaturesForAddress","_callee78","_callee78$","_context79","getSignaturesForAddress","_x113","_x114","_x115","_getAddressLookupTable","_callee79","_yield$this$getAccoun","accountInfo","_callee79$","_context80","getAddressLookupTable","_x116","_x117","_getNonceAndContext","_callee80","_yield$this$getAccoun2","_callee80$","_context81","_x118","_x119","_getNonce","_callee81","_callee81$","_context82","getNonce","_x120","_x121","_requestAirdrop","_callee82","to","_callee82$","_context83","requestAirdrop","_x122","_x123","_blockhashWithExpiryBlockHeight2","_callee83","disableCache","timeSinceFetch","expired","_callee83$","_context84","Date","now","_pollNewBlockhash","_blockhashWithExpiryBlockHeight","_x124","_pollNewBlockhash2","_callee84","startTime","cachedLatestBlockhash","cachedBlockhash","_callee84$","_context85","_getStakeMinimumDelegation","_callee85","_extractCommitmentFro24","_callee85$","_context86","getStakeMinimumDelegation","_x125","_simulateTransaction","_callee86","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","_wireTransaction","_encodedTransaction","_config2","_args87","_unsafeRes","_res5","originalTx","_signature","encodedTransaction","_logs","traceIndent","logTrace","_callee86$","_context87","sigVerify","join","simulateTransaction","_x126","_x127","_x128","_sendTransaction","_callee87","signersOrOptions","_wireTransaction2","_signature2","_callee87$","_context88","sendRawTransaction","_x129","_x130","_x131","_sendRawTransaction","_callee88","rawTransaction","_callee88$","_context89","sendEncodedTransaction","_x132","_x133","_sendEncodedTransaction","_callee89","_logs2","_callee89$","_context90","_x134","_x135","_this9","setInterval","_callee90","_callee90$","_context91","_updateSubscriptions","_this10","Number","MAX_SAFE_INTEGER","clearInterval","_ref19","_ref20","hash","_setSubscription","nextSubscription","_this$_subscriptionsB","prevState","stateChangeCallbacks","cb","_unused2","clientSubscriptionId","_this$_subscriptionSt","_this11","_updateSubscriptions2","_callee94","_this12","activeWebSocketGeneration","isCurrentConnectionStillActive","_callee94$","_context95","close","connect","_ref21","_callee93","_callee93$","_context94","callbacks","serverSubscriptionId","_callee91","_serverSubscriptionId","_callee91$","_context92","_callee92","unsubscribeMethod","_callee92$","_context93","_x136","_handleServerNotification","callbackArgs","notification","_create","_makeSubscription","subscriptionConfig","_this13","existingSubscription","_callee95","_callee95$","_context96","onAccountChange","_removeAccountChangeListener","_callee96","_callee96$","_context97","_unsubscribeClientSubscription","removeAccountChangeListener","_x137","_create2","accountId","onProgramAccountChange","filters","_removeProgramAccountChangeListener","_callee97","_callee97$","_context98","removeProgramAccountChangeListener","_x138","onLogs","_typeof","mentions","_removeOnLogsListener","_callee98","_callee98$","_context99","removeOnLogsListener","_x139","_create3","_create4","onSlotChange","_removeSlotChangeListener","_callee99","_callee99$","_context100","removeSlotChangeListener","_x140","_create5","onSlotUpdate","_removeSlotUpdateListener","_callee100","_callee100$","_context101","removeSlotUpdateListener","_x141","_unsubscribeClientSubscription2","_callee101","subscriptionName","dispose","_callee101$","_context102","_x142","_x143","override","_create6","_this14","_err","onSignatureWithOptions","_this15","_options$commitment","_excluded4","_removeSignatureListener","_callee102","_callee102$","_context103","_x144","_create7","onRootChange","_removeRootChangeListener","_callee103","_callee103$","_context104","removeRootChangeListener","_x145","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","_PublicKey$findProgra","_PublicKey$findProgra2","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","RequestUnits","units","additionalFee","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","SetComputeUnitPrice","microLamports","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","u16","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","_params$instructionIn","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","_ecdsaSign","_ecdsaSign2","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","Authorize","newAuthorized","stakeAuthorizationType","o","custodianPubkey","decodeAuthorizeWithSeed","AuthorizeWithSeed","authoritySeed","authorityOwner","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","split","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","_decodeData3$voteAuth","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","VALIDATOR_INFO_KEY","InfoString","website","details","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","_sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAMO,IAAMA,kBAAkB,GAAGC,eAAO,CAACC,KAAK,CAACC,gBAAgB,CAAA;AACzD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAyB;EACnD,IAAMC,aAAa,GAAGJ,eAAO,CAACC,KAAK,CAACC,gBAAgB,EAAE,CAAA;AACtD,EAAA,IAAMG,SAAS,GAAGC,YAAY,CAACF,aAAa,CAAC,CAAA;AAC7C,EAAA,IAAMG,SAAS,GAAG,IAAIC,UAAU,CAAC,EAAE,CAAC,CAAA;AACpCD,EAAAA,SAAS,CAACE,GAAG,CAACL,aAAa,CAAC,CAAA;AAC5BG,EAAAA,SAAS,CAACE,GAAG,CAACJ,SAAS,EAAE,EAAE,CAAC,CAAA;EAC5B,OAAO;AACLA,IAAAA,SAAS,EAATA,SAAS;AACTE,IAAAA,SAAS,EAATA,SAAAA;GACD,CAAA;AACH,CAAC,CAAA;AACM,IAAMD,YAAY,GAAGN,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EAAA/D,WAAAA,CAAAA,CAAAA,MAAA,CAAY8V,IAAI,CAACC,SAAS,CAAC0G,MAAM,CAAC,MAChE,CAAC,CAAA;AAAA,QAAA,KAAA,EAAA;AAAA,UAAA,OAAA3b,QAAA,CAAAI,MAAA,CAAA,QAAA,EAGI6C,SAAS,CAAA,CAAA;AAAA,QAAA,KAAA,EAAA,CAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAjD,QAAA,CAAAK,IAAA,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA,EAAAZ,OAAA,CAAA,CAAA;GACjB,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAs+D,6BAAA,CAAAr9D,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA;;ACjFD;AACA;AACA;AACO,IAAMw9D,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[31]} -\ No newline at end of file -diff --git a/package.json b/package.json -index 9b1778cb0e61bb983f80dc753d2c8915be0ecd72..24ffe3b8068ef11f7c370c7786df43d8554c5492 100644 ---- a/package.json -+++ b/package.json -@@ -36,23 +36,6 @@ - "/lib", - "/src" - ], -- "scripts": { -- "compile:docs": "typedoc --treatWarningsAsErrors", -- "compile:js": "cross-env NODE_ENV=production rollup -c", -- "compile:typedefs": "./scripts/typegen.sh", -- "build:fixtures": "set -ex; ./test/fixtures/noop-program/build.sh", -- "clean": "rimraf ./doc ./declarations ./lib", -- "dev": "cross-env NODE_ENV=development rollup -c --watch", -- "publish-packages": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git", -- "test:lint": "eslint src/ test/ --ext .js,.ts", -- "test:lint:fix": "eslint src/ test/ --fix --ext .js,.ts", -- "test:live": "TEST_LIVE=1 pnpm run test:unit:node", -- "test:live-with-test-validator": "start-server-and-test '../../scripts/start-shared-test-validator.sh' http://127.0.0.1:8899/health test:live", -- "test:prettier": "prettier --check '{,{src,test}/**/}*.{j,t}s'", -- "test:prettier:fix": "prettier --write '{,{src,test}/**/}*.{j,t}s'", -- "test:typecheck": "tsc --noEmit", -- "test:unit:node": "cross-env NODE_ENV=test TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\", \"target\": \"es2019\" }' ts-mocha --require esm './test/**/*.test.ts'" -- }, - "dependencies": { - "@babel/runtime": "^7.22.6", - "@noble/curves": "^1.0.0", -@@ -123,9 +106,26 @@ - "start-server-and-test": "^2.0.0", - "ts-mocha": "^10.0.0", - "ts-node": "^10.9.1", -- "tsconfig": "workspace:*", - "tslib": "^2.6.1", - "typedoc": "^0.24.8", -- "typescript": "^5.1.6" -+ "typescript": "^5.1.6", -+ "tsconfig": "0.0.0" -+ }, -+ "scripts": { -+ "compile:docs": "typedoc --treatWarningsAsErrors", -+ "compile:js": "cross-env NODE_ENV=production rollup -c", -+ "compile:typedefs": "./scripts/typegen.sh", -+ "build:fixtures": "set -ex; ./test/fixtures/noop-program/build.sh", -+ "clean": "rimraf ./doc ./declarations ./lib", -+ "dev": "cross-env NODE_ENV=development rollup -c --watch", -+ "publish-packages": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git", -+ "test:lint": "eslint src/ test/ --ext .js,.ts", -+ "test:lint:fix": "eslint src/ test/ --fix --ext .js,.ts", -+ "test:live": "TEST_LIVE=1 pnpm run test:unit:node", -+ "test:live-with-test-validator": "start-server-and-test '../../scripts/start-shared-test-validator.sh' http://127.0.0.1:8899/health test:live", -+ "test:prettier": "prettier --check '{,{src,test}/**/}*.{j,t}s'", -+ "test:prettier:fix": "prettier --write '{,{src,test}/**/}*.{j,t}s'", -+ "test:typecheck": "tsc --noEmit", -+ "test:unit:node": "cross-env NODE_ENV=test TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\", \"target\": \"es2019\" }' ts-mocha --require esm './test/**/*.test.ts'" - } - } -\ No newline at end of file -diff --git a/src/message/legacy.ts b/src/message/legacy.ts -index 98b9500354fc2325c7e1b005f875709458d495ad..6b8ee132967aeedac18c586415f3b197ea3fb627 100644 ---- a/src/message/legacy.ts -+++ b/src/message/legacy.ts -@@ -16,6 +16,7 @@ import { - import {TransactionInstruction} from '../transaction'; - import {CompiledKeys} from './compiled-keys'; - import {MessageAccountKeys} from './account-keys'; -+import {guardedShift, guardedSplice} from '../utils/guarded-array-utils'; - - /** - * An instruction to execute by a program -@@ -268,7 +269,7 @@ export class Message { - // Slice up wire data - let byteArray = [...buffer]; - -- const numRequiredSignatures = byteArray.shift()!; -+ const numRequiredSignatures = guardedShift(byteArray); - if ( - numRequiredSignatures !== - (numRequiredSignatures & VERSION_PREFIX_MASK) -@@ -278,31 +279,27 @@ export class Message { - ); - } - -- const numReadonlySignedAccounts = byteArray.shift()!; -- const numReadonlyUnsignedAccounts = byteArray.shift()!; -+ const numReadonlySignedAccounts = guardedShift(byteArray); -+ const numReadonlyUnsignedAccounts = guardedShift(byteArray); - - const accountCount = shortvec.decodeLength(byteArray); - let accountKeys = []; - for (let i = 0; i < accountCount; i++) { -- const account = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - accountKeys.push(new PublicKey(Buffer.from(account))); - } - -- const recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -+ const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH); - - const instructionCount = shortvec.decodeLength(byteArray); - let instructions: CompiledInstruction[] = []; - for (let i = 0; i < instructionCount; i++) { -- const programIdIndex = byteArray.shift()!; -+ const programIdIndex = guardedShift(byteArray); - const accountCount = shortvec.decodeLength(byteArray); -- const accounts = byteArray.slice(0, accountCount); -- byteArray = byteArray.slice(accountCount); -+ const accounts = guardedSplice(byteArray, 0, accountCount); - const dataLength = shortvec.decodeLength(byteArray); -- const dataSlice = byteArray.slice(0, dataLength); -+ const dataSlice = guardedSplice(byteArray, 0, dataLength); - const data = bs58.encode(Buffer.from(dataSlice)); -- byteArray = byteArray.slice(dataLength); - instructions.push({ - programIdIndex, - accounts, -diff --git a/src/message/v0.ts b/src/message/v0.ts -index 10156568676c7d001d26bb646b02240fd3e88172..c4263389aee02faeca8c33a8f2dfe9814d887892 100644 ---- a/src/message/v0.ts -+++ b/src/message/v0.ts -@@ -16,6 +16,7 @@ import {TransactionInstruction} from '../transaction'; - import {AddressLookupTableAccount} from '../programs'; - import {CompiledKeys} from './compiled-keys'; - import {AccountKeysFromLookups, MessageAccountKeys} from './account-keys'; -+import {guardedShift, guardedSplice} from '../utils/guarded-array-utils'; - - /** - * Message constructor arguments -@@ -426,7 +427,7 @@ export class MessageV0 { - static deserialize(serializedMessage: Uint8Array): MessageV0 { - let byteArray = [...serializedMessage]; - -- const prefix = byteArray.shift() as number; -+ const prefix = guardedShift(byteArray); - const maskedPrefix = prefix & VERSION_PREFIX_MASK; - assert( - prefix !== maskedPrefix, -@@ -440,29 +441,35 @@ export class MessageV0 { - ); - - const header: MessageHeader = { -- numRequiredSignatures: byteArray.shift() as number, -- numReadonlySignedAccounts: byteArray.shift() as number, -- numReadonlyUnsignedAccounts: byteArray.shift() as number, -+ numRequiredSignatures: guardedShift(byteArray), -+ numReadonlySignedAccounts: guardedShift(byteArray), -+ numReadonlyUnsignedAccounts: guardedShift(byteArray), - }; - - const staticAccountKeys = []; - const staticAccountKeysLength = shortvec.decodeLength(byteArray); - for (let i = 0; i < staticAccountKeysLength; i++) { - staticAccountKeys.push( -- new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)), -+ new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)), - ); - } - -- const recentBlockhash = bs58.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ const recentBlockhash = bs58.encode( -+ guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH), -+ ); - - const instructionCount = shortvec.decodeLength(byteArray); - const compiledInstructions: MessageCompiledInstruction[] = []; - for (let i = 0; i < instructionCount; i++) { -- const programIdIndex = byteArray.shift() as number; -+ const programIdIndex = guardedShift(byteArray); - const accountKeyIndexesLength = shortvec.decodeLength(byteArray); -- const accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength); -+ const accountKeyIndexes = guardedSplice( -+ byteArray, -+ 0, -+ accountKeyIndexesLength, -+ ); - const dataLength = shortvec.decodeLength(byteArray); -- const data = new Uint8Array(byteArray.splice(0, dataLength)); -+ const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength)); - compiledInstructions.push({ - programIdIndex, - accountKeyIndexes, -@@ -473,11 +480,21 @@ export class MessageV0 { - const addressTableLookupsCount = shortvec.decodeLength(byteArray); - const addressTableLookups: MessageAddressTableLookup[] = []; - for (let i = 0; i < addressTableLookupsCount; i++) { -- const accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)); -+ const accountKey = new PublicKey( -+ guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH), -+ ); - const writableIndexesLength = shortvec.decodeLength(byteArray); -- const writableIndexes = byteArray.splice(0, writableIndexesLength); -+ const writableIndexes = guardedSplice( -+ byteArray, -+ 0, -+ writableIndexesLength, -+ ); - const readonlyIndexesLength = shortvec.decodeLength(byteArray); -- const readonlyIndexes = byteArray.splice(0, readonlyIndexesLength); -+ const readonlyIndexes = guardedSplice( -+ byteArray, -+ 0, -+ readonlyIndexesLength, -+ ); - addressTableLookups.push({ - accountKey, - writableIndexes, -diff --git a/src/transaction/legacy.ts b/src/transaction/legacy.ts -index a87ea6fe0cc7c3325dc09691ead1aa4419e6f918..091838d59e2c1f9315b9f0986cd55ad7be1dd50d 100644 ---- a/src/transaction/legacy.ts -+++ b/src/transaction/legacy.ts -@@ -12,6 +12,7 @@ import type {Signer} from '../keypair'; - import type {Blockhash} from '../blockhash'; - import type {CompiledInstruction} from '../message'; - import {sign, verify} from '../utils/ed25519'; -+import {guardedSplice} from '../utils/guarded-array-utils'; - - /** - * Transaction signature as base-58 encoded string -@@ -882,8 +883,7 @@ export class Transaction { - const signatureCount = shortvec.decodeLength(byteArray); - let signatures = []; - for (let i = 0; i < signatureCount; i++) { -- const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES); -- byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES); -+ const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES); - signatures.push(bs58.encode(Buffer.from(signature))); - } - -diff --git a/src/transaction/versioned.ts b/src/transaction/versioned.ts -index 53e78ade1fff090c9043a9e976b87d6761e8d915..a810beff798610bf849f14bcf500382d7f70390f 100644 ---- a/src/transaction/versioned.ts -+++ b/src/transaction/versioned.ts -@@ -8,6 +8,7 @@ import * as shortvec from '../utils/shortvec-encoding'; - import * as Layout from '../layout'; - import {sign} from '../utils/ed25519'; - import {PublicKey} from '../publickey'; -+import {guardedSplice} from '../utils/guarded-array-utils'; - - export type TransactionVersion = 'legacy' | 0; - -@@ -82,7 +83,7 @@ export class VersionedTransaction { - const signaturesLength = shortvec.decodeLength(byteArray); - for (let i = 0; i < signaturesLength; i++) { - signatures.push( -- new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES)), -+ new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)), - ); - } - -diff --git a/src/utils/guarded-array-utils.ts b/src/utils/guarded-array-utils.ts -new file mode 100644 -index 0000000000000000000000000000000000000000..847f1f9aae43d20a6dc2ecd641d951a4c217abb1 ---- /dev/null -+++ b/src/utils/guarded-array-utils.ts -@@ -0,0 +1,34 @@ -+const END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly'; -+ -+/** -+ * Delegates to `Array#shift`, but throws if the array is zero-length. -+ */ -+export function guardedShift(byteArray: T[]): T { -+ if (byteArray.length === 0) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.shift() as T; -+} -+ -+/** -+ * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of -+ * the array. -+ */ -+export function guardedSplice( -+ byteArray: T[], -+ ...args: -+ | [start: number, deleteCount?: number] -+ | [start: number, deleteCount: number, ...items: T[]] -+): T[] { -+ const [start] = args; -+ if ( -+ args.length === 2 // Implies that `deleteCount` was supplied -+ ? start + (args[1] ?? 0) > byteArray.length -+ : start >= byteArray.length -+ ) { -+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE); -+ } -+ return byteArray.splice( -+ ...(args as Parameters), -+ ); -+} -diff --git a/src/validator-info.ts b/src/validator-info.ts -index 7a1e0a868d5712dc8cf0fba57f1db53756f65ce7..7e681003d70562fd9c8ad8a00f52c3916f5069da 100644 ---- a/src/validator-info.ts -+++ b/src/validator-info.ts -@@ -9,6 +9,7 @@ import { - import * as Layout from './layout'; - import * as shortvec from './utils/shortvec-encoding'; - import {PublicKey, PUBLIC_KEY_LENGTH} from './publickey'; -+import {guardedShift, guardedSplice} from './utils/guarded-array-utils'; - - export const VALIDATOR_INFO_KEY = new PublicKey( - 'Va1idator1nfo111111111111111111111111111111', -@@ -83,10 +84,10 @@ export class ValidatorInfo { - - const configKeys: Array = []; - for (let i = 0; i < 2; i++) { -- const publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH)); -- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH); -- const isSigner = byteArray.slice(0, 1)[0] === 1; -- byteArray = byteArray.slice(1); -+ const publicKey = new PublicKey( -+ guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH), -+ ); -+ const isSigner = guardedShift(byteArray) === 1; - configKeys.push({publicKey, isSigner}); - } - diff --git a/packages/distributor-oracle/yarn.deploy.lock b/packages/distributor-oracle/yarn.deploy.lock index ad731329c..c4e782fa3 100644 --- a/packages/distributor-oracle/yarn.deploy.lock +++ b/packages/distributor-oracle/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -312,7 +312,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -322,15 +322,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -412,7 +412,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -667,8 +667,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -685,7 +685,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/docsite/yarn.deploy.lock b/packages/docsite/yarn.deploy.lock index e3315475d..1f1c1dc9b 100644 --- a/packages/docsite/yarn.deploy.lock +++ b/packages/docsite/yarn.deploy.lock @@ -51,11 +51,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.2": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.23.9 + resolution: "@babel/runtime@npm:7.23.9" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 6bbebe8d27c0c2dd275d1ac197fc1a6c00e18dab68cc7aaff0adc3195b45862bae9c4cc58975629004b0213955b2ed91e99eccb3d9b39cabea246c657323d667 languageName: node linkType: hard @@ -129,13 +129,13 @@ __metadata: linkType: hard "@jridgewell/gen-mapping@npm:^0.3.2": - version: 0.3.5 - resolution: "@jridgewell/gen-mapping@npm:0.3.5" + version: 0.3.3 + resolution: "@jridgewell/gen-mapping@npm:0.3.3" dependencies: - "@jridgewell/set-array": ^1.2.1 + "@jridgewell/set-array": ^1.0.1 "@jridgewell/sourcemap-codec": ^1.4.10 - "@jridgewell/trace-mapping": ^0.3.24 - checksum: ff7a1764ebd76a5e129c8890aa3e2f46045109dabde62b0b6c6a250152227647178ff2069ea234753a690d8f3c4ac8b5e7b267bbee272bffb7f3b0a370ab6e52 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: 4a74944bd31f22354fc01c3da32e83c19e519e3bbadafa114f6da4522ea77dd0c2842607e923a591d60a76699d819a2fbb6f3552e277efdb9b58b081390b60ab languageName: node linkType: hard @@ -146,10 +146,10 @@ __metadata: languageName: node linkType: hard -"@jridgewell/set-array@npm:^1.2.1": - version: 1.2.1 - resolution: "@jridgewell/set-array@npm:1.2.1" - checksum: 832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 +"@jridgewell/set-array@npm:^1.0.1": + version: 1.1.2 + resolution: "@jridgewell/set-array@npm:1.1.2" + checksum: 69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e languageName: node linkType: hard @@ -160,13 +160,13 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.24": - version: 0.3.25 - resolution: "@jridgewell/trace-mapping@npm:0.3.25" +"@jridgewell/trace-mapping@npm:^0.3.9": + version: 0.3.22 + resolution: "@jridgewell/trace-mapping@npm:0.3.22" dependencies: "@jridgewell/resolve-uri": ^3.1.0 "@jridgewell/sourcemap-codec": ^1.4.14 - checksum: 9d3c40d225e139987b50c48988f8717a54a8c994d8a948ee42e1412e08988761d0754d7d10b803061cc3aebf35f92a5dbbab493bd0e1a9ef9e89a2130e83ba34 + checksum: ac7dd2cfe0b479aa1b81776d40d789243131cc792dc8b6b6a028c70fcd6171958ae1a71bf67b618ffe3c0c3feead9870c095ee46a5e30319410d92976b28f498 languageName: node linkType: hard @@ -313,9 +313,9 @@ __metadata: linkType: hard "@rushstack/eslint-patch@npm:^1.1.3": - version: 1.8.0 - resolution: "@rushstack/eslint-patch@npm:1.8.0" - checksum: 25ba5f5dc8828f9a5499045b28d33c642e3db7cd32b3e5f4fbfa5cc6695c28b3967981d662cf37df4e945ba7f874df9bd559c9b2770a1e7d3b5b36afb45246c3 + version: 1.7.2 + resolution: "@rushstack/eslint-patch@npm:1.7.2" + checksum: 9c773e712cef97d4e9defbd80eb25430e727137acda45d5236c620da7b93d93ae00901f7e10e893f5a8445312f2a7ff74c241024109c066bffb423f5e3ed0b1c languageName: node linkType: hard @@ -362,21 +362,21 @@ __metadata: linkType: hard "@tanstack/react-virtual@npm:^3.0.0-beta.60": - version: 3.2.0 - resolution: "@tanstack/react-virtual@npm:3.2.0" + version: 3.0.4 + resolution: "@tanstack/react-virtual@npm:3.0.4" dependencies: - "@tanstack/virtual-core": 3.2.0 + "@tanstack/virtual-core": 3.0.0 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 09bf6db0f3dbfa2245c7d78ed425bb7c0e169cbe5024cc6bfc53005505a472b36a0b5506d6fa4b8a47c07296c5982b1ac49acd4f32c48547aef7556f9ed2ed1d + checksum: d01ea51d8a130c8f2cf87941d312a8d7929e19334bbe85a3ab125b935742cf58ee76d71f590cbd5c50b4fbdbbd6a7b8e58f7c0538c43aa4d5ccab20914246b28 languageName: node linkType: hard -"@tanstack/virtual-core@npm:3.2.0": - version: 3.2.0 - resolution: "@tanstack/virtual-core@npm:3.2.0" - checksum: 33ce09ba65852413251156e3e70ef3bd320e60f586b734b0ae36ff07259f99b5e4c1082e2ba7870364438a8be306ad9eed28a3c1b5e1d9022645c556bc4ff0c3 +"@tanstack/virtual-core@npm:3.0.0": + version: 3.0.0 + resolution: "@tanstack/virtual-core@npm:3.0.0" + checksum: 7283d50fc7b7a56608c37a8e94a93b85890ff7e39c6281633a19c4d6f6f4fbf25f8418f1eec302a008a8746a0d1d0cd00630137b55e6cf019818d68af8ed16b6 languageName: node linkType: hard @@ -630,16 +630,15 @@ __metadata: linkType: hard "array-includes@npm:^3.1.6, array-includes@npm:^3.1.7": - version: 3.1.8 - resolution: "array-includes@npm:3.1.8" + version: 3.1.7 + resolution: "array-includes@npm:3.1.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-abstract: ^1.23.2 - es-object-atoms: ^1.0.0 - get-intrinsic: ^1.2.4 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 is-string: ^1.0.7 - checksum: eb39ba5530f64e4d8acab39297c11c1c5be2a4ea188ab2b34aba5fb7224d918f77717a9d57a3e2900caaa8440e59431bdaf5c974d5212ef65d97f132e38e2d91 + checksum: 06f9e4598fac12a919f7c59a3f04f010ea07f0b7f0585465ed12ef528a60e45f374e79d1bddbb34cdd4338357d00023ddbd0ac18b0be36964f5e726e8965d7fc languageName: node linkType: hard @@ -650,31 +649,29 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlast@npm:^1.2.4": - version: 1.2.5 - resolution: "array.prototype.findlast@npm:1.2.5" +"array.prototype.filter@npm:^1.0.3": + version: 1.0.3 + resolution: "array.prototype.filter@npm:1.0.3" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-abstract: ^1.23.2 - es-errors: ^1.3.0 - es-object-atoms: ^1.0.0 - es-shim-unscopables: ^1.0.2 - checksum: 83ce4ad95bae07f136d316f5a7c3a5b911ac3296c3476abe60225bc4a17938bf37541972fcc37dd5adbc99cbb9c928c70bbbfc1c1ce549d41a415144030bb446 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-array-method-boxes-properly: ^1.0.0 + is-string: ^1.0.7 + checksum: 5443cde6ad64596649e5751252b1b2f5242b41052980c2fb2506ba485e3ffd7607e8f6f2f1aefa0cb1cfb9b8623b2b2be103579cb367a161a3426400619b6e73 languageName: node linkType: hard "array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.5 - resolution: "array.prototype.findlastindex@npm:1.2.5" + version: 1.2.4 + resolution: "array.prototype.findlastindex@npm:1.2.4" dependencies: - call-bind: ^1.0.7 + call-bind: ^1.0.5 define-properties: ^1.2.1 - es-abstract: ^1.23.2 + es-abstract: ^1.22.3 es-errors: ^1.3.0 - es-object-atoms: ^1.0.0 es-shim-unscopables: ^1.0.2 - checksum: 2c81cff2a75deb95bf1ed89b6f5f2bfbfb882211e3b7cc59c3d6b87df774cd9d6b36949a8ae39ac476e092c1d4a4905f5ee11a86a456abb10f35f8211ae4e710 + checksum: cc8dce27a06dddf6d9c40a15d4c573f96ac5ca3583f89f8d8cd7d7ffdb96a71d819890a5bdb211f221bda8fafa0d97d1d8cbb5460a5cbec1fff57ae80b8abc31 languageName: node linkType: hard @@ -690,7 +687,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.flatmap@npm:^1.3.2": +"array.prototype.flatmap@npm:^1.3.1, array.prototype.flatmap@npm:^1.3.2": version: 1.3.2 resolution: "array.prototype.flatmap@npm:1.3.2" dependencies: @@ -702,19 +699,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.toreversed@npm:^1.1.2": - version: 1.1.2 - resolution: "array.prototype.toreversed@npm:1.1.2" - dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - es-shim-unscopables: ^1.0.0 - checksum: 58598193426282155297bedf950dc8d464624a0d81659822fb73124286688644cb7e0e4927a07f3ab2daaeb6617b647736cc3a5e6ca7ade5bb8e573b284e6240 - languageName: node - linkType: hard - -"array.prototype.tosorted@npm:^1.1.3": +"array.prototype.tosorted@npm:^1.1.1": version: 1.1.3 resolution: "array.prototype.tosorted@npm:1.1.3" dependencies: @@ -750,12 +735,21 @@ __metadata: languageName: node linkType: hard +"asynciterator.prototype@npm:^1.0.0": + version: 1.0.0 + resolution: "asynciterator.prototype@npm:1.0.0" + dependencies: + has-symbols: ^1.0.3 + checksum: e8ebfd9493ac651cf9b4165e9d64030b3da1d17181bb1963627b59e240cdaf021d9b59d44b827dc1dde4e22387ec04c2d0f8720cf58a1c282e34e40cc12721b3 + languageName: node + linkType: hard + "autoprefixer@npm:^10.4.12": - version: 10.4.19 - resolution: "autoprefixer@npm:10.4.19" + version: 10.4.17 + resolution: "autoprefixer@npm:10.4.17" dependencies: - browserslist: ^4.23.0 - caniuse-lite: ^1.0.30001599 + browserslist: ^4.22.2 + caniuse-lite: ^1.0.30001578 fraction.js: ^4.3.7 normalize-range: ^0.1.2 picocolors: ^1.0.0 @@ -764,7 +758,7 @@ __metadata: postcss: ^8.1.0 bin: autoprefixer: bin/autoprefixer - checksum: 3a4bc5bace05e057396dca2b306503efc175e90e8f2abf5472d3130b72da1d54d97c0ee05df21bf04fe66a7df93fd8c8ec0f1aca72a165f4701a02531abcbf11 + checksum: 1b4cf4097507f9dc48cef3194f18a05901311c881380cc634b308fce54a6554cf2dcd20aec8384b44e994d4665ab12c63dc89492523f8d74ff5d4d5eb1469f8c languageName: node linkType: hard @@ -775,12 +769,10 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.7": - version: 1.0.7 - resolution: "available-typed-arrays@npm:1.0.7" - dependencies: - possible-typed-array-names: ^1.0.0 - checksum: 1aa3ffbfe6578276996de660848b6e95669d9a95ad149e3dd0c0cda77db6ee1dbd9d1dd723b65b6d277b882dd0c4b91a654ae9d3cf9e1254b7e93e4908d78fd3 +"available-typed-arrays@npm:^1.0.6": + version: 1.0.6 + resolution: "available-typed-arrays@npm:1.0.6" + checksum: 8295571eb86447138adf64a0df0c08ae61250b17190bba30e1fae8c80a816077a6d028e5506f602c382c0197d3080bae131e92e331139d55460989580eeae659 languageName: node linkType: hard @@ -815,28 +807,28 @@ __metadata: linkType: hard "bare-events@npm:^2.0.0, bare-events@npm:^2.2.0": - version: 2.2.2 - resolution: "bare-events@npm:2.2.2" - checksum: 154d3fc044cc171d3b85a89b768e626417b60c050123ac2ac10fc002152b4bdeb359ed1453ad54c0f1d05a7786f780d3b976af68e55c09fe4579d8466d3ff256 + version: 2.2.0 + resolution: "bare-events@npm:2.2.0" + checksum: b3001d61cbb7e6c91c7e47ed1d5701512f94c68955a88c1fe368ff313ba68f372fd701f422d1604fd6ac6e2237024d99373aa14e43a92696755a1f7ae46a8626 languageName: node linkType: hard "bare-fs@npm:^2.1.1": - version: 2.2.2 - resolution: "bare-fs@npm:2.2.2" + version: 2.1.5 + resolution: "bare-fs@npm:2.1.5" dependencies: bare-events: ^2.0.0 bare-os: ^2.0.0 bare-path: ^2.0.0 streamx: ^2.13.0 - checksum: 5b6d26690ee4de93b559f6a1187b6ff553224fe4faea5ef9cbd235b13e033ef96a598dc28eb10aad17d1f35baed24e14e18436534041913f905a0c50ed27713a + checksum: 268bc03dd97c2e039f3396d79993640a10bbb5ad30bc7a3a2d406ceb538333b0f79eab33f1db288bcf55fde52c767fa1f25332ac606c27555cc62951c236d346 languageName: node linkType: hard "bare-os@npm:^2.0.0, bare-os@npm:^2.1.0": - version: 2.2.1 - resolution: "bare-os@npm:2.2.1" - checksum: 7d870d8955531809253dfbceeda5b68e8396ef640166f8ff6c4c5e344f18a6bc9253f6d5e7d9ae2841426b66e9b7b1a39b2a102e6b23e1ddff26ad8a8981af81 + version: 2.2.0 + resolution: "bare-os@npm:2.2.0" + checksum: ed78e2f3ea498e35c7565532ae3aa3b85a7e5e223ab6353de64864823cadff02a2a8b7722e9a6c1a0ff56cb9f21f23ada8e88a085cc0a5d38a7c1bcf65e8f7fd languageName: node linkType: hard @@ -909,7 +901,7 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.23.0": +"browserslist@npm:^4.22.2": version: 4.23.0 resolution: "browserslist@npm:4.23.0" dependencies: @@ -999,10 +991,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001587, caniuse-lite@npm:^1.0.30001599": - version: 1.0.30001600 - resolution: "caniuse-lite@npm:1.0.30001600" - checksum: 1aae03be0e9f96163e88b9305531ef8db0e01f224aff545c61a32ce0b0ca323e22531bf680bacac3e34f98e23f71ac31a21b328fa0fcbbecea65a2c2638c70c4 +"caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001578, caniuse-lite@npm:^1.0.30001587": + version: 1.0.30001587 + resolution: "caniuse-lite@npm:1.0.30001587" + checksum: fb50aa9beaaae42f9feae92ce038f6ff71e97510f024ef1bef2666f3adcfd36d6c59e5675442e5fe795575193f71bc826cb7721d4b0f6d763e82d193bea57863 languageName: node linkType: hard @@ -1170,39 +1162,6 @@ __metadata: languageName: node linkType: hard -"data-view-buffer@npm:^1.0.1": - version: 1.0.1 - resolution: "data-view-buffer@npm:1.0.1" - dependencies: - call-bind: ^1.0.6 - es-errors: ^1.3.0 - is-data-view: ^1.0.1 - checksum: ce24348f3c6231223b216da92e7e6a57a12b4af81a23f27eff8feabdf06acfb16c00639c8b705ca4d167f761cfc756e27e5f065d0a1f840c10b907fdaf8b988c - languageName: node - linkType: hard - -"data-view-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "data-view-byte-length@npm:1.0.1" - dependencies: - call-bind: ^1.0.7 - es-errors: ^1.3.0 - is-data-view: ^1.0.1 - checksum: dbb3200edcb7c1ef0d68979834f81d64fd8cab2f7691b3a4c6b97e67f22182f3ec2c8602efd7b76997b55af6ff8bce485829c1feda4fa2165a6b71fb7baa4269 - languageName: node - linkType: hard - -"data-view-byte-offset@npm:^1.0.0": - version: 1.0.0 - resolution: "data-view-byte-offset@npm:1.0.0" - dependencies: - call-bind: ^1.0.6 - es-errors: ^1.3.0 - is-data-view: ^1.0.1 - checksum: 7f0bf8720b7414ca719eedf1846aeec392f2054d7af707c5dc9a753cc77eb8625f067fa901e0b5127e831f9da9056138d894b9c2be79c27a21f6db5824f009c2 - languageName: node - linkType: hard - "debug@npm:4, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" @@ -1247,7 +1206,7 @@ __metadata: languageName: node linkType: hard -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.2": version: 1.1.4 resolution: "define-data-property@npm:1.1.4" dependencies: @@ -1293,20 +1252,13 @@ __metadata: languageName: node linkType: hard -"detect-libc@npm:^2.0.0": +"detect-libc@npm:^2.0.0, detect-libc@npm:^2.0.2": version: 2.0.2 resolution: "detect-libc@npm:2.0.2" checksum: 2b2cd3649b83d576f4be7cc37eb3b1815c79969c8b1a03a40a4d55d83bc74d010753485753448eacb98784abf22f7dbd3911fd3b60e29fda28fed2d1a997944d languageName: node linkType: hard -"detect-libc@npm:^2.0.2": - version: 2.0.3 - resolution: "detect-libc@npm:2.0.3" - checksum: 2ba6a939ae55f189aea996ac67afceb650413c7a34726ee92c40fb0deb2400d57ef94631a8a3f052055eea7efb0f99a9b5e6ce923415daa3e68221f963cfc27d - languageName: node - linkType: hard - "didyoumean@npm:^1.2.2": version: 1.2.2 resolution: "didyoumean@npm:1.2.2" @@ -1356,9 +1308,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.668": - version: 1.4.715 - resolution: "electron-to-chromium@npm:1.4.715" - checksum: b3ccbd571ecaa3b74b2c098b705416e15e36f9338f75fea062ba48397ac379972f915c29437286914d05ea9d3454b0fa74e9606becd6c221879c6fc139a09284 + version: 1.4.671 + resolution: "electron-to-chromium@npm:1.4.671" + checksum: a40461d15a9b5c0bc0f186bf781a97d4c1c58bea1ab95fd9e844a061de6b615bfa3e901a0522fc0e4629994f33c5bdfd33bc84495c94800f5f5f5082b9192062 languageName: node linkType: hard @@ -1415,21 +1367,17 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.2": - version: 1.23.2 - resolution: "es-abstract@npm:1.23.2" +"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.22.4": + version: 1.22.4 + resolution: "es-abstract@npm:1.22.4" dependencies: array-buffer-byte-length: ^1.0.1 arraybuffer.prototype.slice: ^1.0.3 - available-typed-arrays: ^1.0.7 + available-typed-arrays: ^1.0.6 call-bind: ^1.0.7 - data-view-buffer: ^1.0.1 - data-view-byte-length: ^1.0.1 - data-view-byte-offset: ^1.0.0 es-define-property: ^1.0.0 es-errors: ^1.3.0 - es-object-atoms: ^1.0.0 - es-set-tostringtag: ^2.0.3 + es-set-tostringtag: ^2.0.2 es-to-primitive: ^1.2.1 function.prototype.name: ^1.1.6 get-intrinsic: ^1.2.4 @@ -1437,16 +1385,15 @@ __metadata: globalthis: ^1.0.3 gopd: ^1.0.1 has-property-descriptors: ^1.0.2 - has-proto: ^1.0.3 + has-proto: ^1.0.1 has-symbols: ^1.0.3 - hasown: ^2.0.2 + hasown: ^2.0.1 internal-slot: ^1.0.7 is-array-buffer: ^3.0.4 is-callable: ^1.2.7 - is-data-view: ^1.0.1 - is-negative-zero: ^2.0.3 + is-negative-zero: ^2.0.2 is-regex: ^1.1.4 - is-shared-array-buffer: ^1.0.3 + is-shared-array-buffer: ^1.0.2 is-string: ^1.0.7 is-typed-array: ^1.1.13 is-weakref: ^1.0.2 @@ -1454,18 +1401,25 @@ __metadata: object-keys: ^1.1.1 object.assign: ^4.1.5 regexp.prototype.flags: ^1.5.2 - safe-array-concat: ^1.1.2 + safe-array-concat: ^1.1.0 safe-regex-test: ^1.0.3 - string.prototype.trim: ^1.2.9 - string.prototype.trimend: ^1.0.8 + string.prototype.trim: ^1.2.8 + string.prototype.trimend: ^1.0.7 string.prototype.trimstart: ^1.0.7 - typed-array-buffer: ^1.0.2 - typed-array-byte-length: ^1.0.1 - typed-array-byte-offset: ^1.0.2 - typed-array-length: ^1.0.5 + typed-array-buffer: ^1.0.1 + typed-array-byte-length: ^1.0.0 + typed-array-byte-offset: ^1.0.0 + typed-array-length: ^1.0.4 unbox-primitive: ^1.0.2 - which-typed-array: ^1.1.15 - checksum: cc6410cb58ba90e3f0f84d83297c372ca545017b94e50fd0020119e82b26f0dbf9885c72335f0063b93669393c505712c6fe82bef7ae4d3d29d770c0dbfb1340 + which-typed-array: ^1.1.14 + checksum: c254102395bd59315b713d72a1ce07980c0f71c9edcac6b036868740789ab5344020e940d6321fc1b31aecf6b27941fdd9655b602696e08f170986dd4d75ddc6 + languageName: node + linkType: hard + +"es-array-method-boxes-properly@npm:^1.0.0": + version: 1.0.0 + resolution: "es-array-method-boxes-properly@npm:1.0.0" + checksum: 2537fcd1cecf187083890bc6f5236d3a26bf39237433587e5bf63392e88faae929dbba78ff0120681a3f6f81c23fe3816122982c160d63b38c95c830b633b826 languageName: node linkType: hard @@ -1478,52 +1432,44 @@ __metadata: languageName: node linkType: hard -"es-errors@npm:^1.1.0, es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": +"es-errors@npm:^1.0.0, es-errors@npm:^1.1.0, es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": version: 1.3.0 resolution: "es-errors@npm:1.3.0" checksum: ec1414527a0ccacd7f15f4a3bc66e215f04f595ba23ca75cdae0927af099b5ec865f9f4d33e9d7e86f512f252876ac77d4281a7871531a50678132429b1271b5 languageName: node linkType: hard -"es-iterator-helpers@npm:^1.0.15, es-iterator-helpers@npm:^1.0.17": - version: 1.0.18 - resolution: "es-iterator-helpers@npm:1.0.18" +"es-iterator-helpers@npm:^1.0.12, es-iterator-helpers@npm:^1.0.15": + version: 1.0.17 + resolution: "es-iterator-helpers@npm:1.0.17" dependencies: + asynciterator.prototype: ^1.0.0 call-bind: ^1.0.7 define-properties: ^1.2.1 - es-abstract: ^1.23.0 + es-abstract: ^1.22.4 es-errors: ^1.3.0 - es-set-tostringtag: ^2.0.3 + es-set-tostringtag: ^2.0.2 function-bind: ^1.1.2 get-intrinsic: ^1.2.4 globalthis: ^1.0.3 has-property-descriptors: ^1.0.2 - has-proto: ^1.0.3 + has-proto: ^1.0.1 has-symbols: ^1.0.3 internal-slot: ^1.0.7 iterator.prototype: ^1.1.2 - safe-array-concat: ^1.1.2 - checksum: 1594324ff3ca8890fe30c98b2419d3007d2b14b35f9773f188114408ff973e13c526f6045d88209e932f58dc0c55fc9a4ae1554636f8938ed7d926ffc27d3e1a + safe-array-concat: ^1.1.0 + checksum: f0962abbf120c37516c9008716fcaffeacf7bc6147a07e63cda3c3ac8be94b88e4ef8d71234c4b8873d1fc209f65c6d9e11a7faac78f59b5d3bcfa399affed7b languageName: node linkType: hard -"es-object-atoms@npm:^1.0.0": - version: 1.0.0 - resolution: "es-object-atoms@npm:1.0.0" - dependencies: - es-errors: ^1.3.0 - checksum: 26f0ff78ab93b63394e8403c353842b2272836968de4eafe97656adfb8a7c84b9099bf0fe96ed58f4a4cddc860f6e34c77f91649a58a5daa4a9c40b902744e3c - languageName: node - linkType: hard - -"es-set-tostringtag@npm:^2.0.3": - version: 2.0.3 - resolution: "es-set-tostringtag@npm:2.0.3" +"es-set-tostringtag@npm:^2.0.2": + version: 2.0.2 + resolution: "es-set-tostringtag@npm:2.0.2" dependencies: - get-intrinsic: ^1.2.4 - has-tostringtag: ^1.0.2 - hasown: ^2.0.1 - checksum: 7227fa48a41c0ce83e0377b11130d324ac797390688135b8da5c28994c0165be8b252e15cd1de41e1325e5a5412511586960213e88f9ab4a5e7d028895db5129 + get-intrinsic: ^1.2.2 + has-tostringtag: ^1.0.0 + hasown: ^2.0.0 + checksum: afcec3a4c9890ae14d7ec606204858441c801ff84f312538e1d1ccf1e5493c8b17bd672235df785f803756472cb4f2d49b87bde5237aef33411e74c22f194e07 languageName: node linkType: hard @@ -1619,14 +1565,14 @@ __metadata: linkType: hard "eslint-module-utils@npm:^2.8.0": - version: 2.8.1 - resolution: "eslint-module-utils@npm:2.8.1" + version: 2.8.0 + resolution: "eslint-module-utils@npm:2.8.0" dependencies: debug: ^3.2.7 peerDependenciesMeta: eslint: optional: true - checksum: 3cecd99b6baf45ffc269167da0f95dcb75e5aa67b93d73a3bab63e2a7eedd9cdd6f188eed048e2f57c1b77db82c9cbf2adac20b512fa70e597d863dd3720170d + checksum: 74c6dfea7641ebcfe174be61168541a11a14aa8d72e515f5f09af55cd0d0862686104b0524aa4b8e0ce66418a44aa38a94d2588743db5fd07a6b49ffd16921d2 languageName: node linkType: hard @@ -1693,30 +1639,28 @@ __metadata: linkType: hard "eslint-plugin-react@npm:^7.31.7": - version: 7.34.1 - resolution: "eslint-plugin-react@npm:7.34.1" + version: 7.33.2 + resolution: "eslint-plugin-react@npm:7.33.2" dependencies: - array-includes: ^3.1.7 - array.prototype.findlast: ^1.2.4 - array.prototype.flatmap: ^1.3.2 - array.prototype.toreversed: ^1.1.2 - array.prototype.tosorted: ^1.1.3 + array-includes: ^3.1.6 + array.prototype.flatmap: ^1.3.1 + array.prototype.tosorted: ^1.1.1 doctrine: ^2.1.0 - es-iterator-helpers: ^1.0.17 + es-iterator-helpers: ^1.0.12 estraverse: ^5.3.0 jsx-ast-utils: ^2.4.1 || ^3.0.0 minimatch: ^3.1.2 - object.entries: ^1.1.7 - object.fromentries: ^2.0.7 - object.hasown: ^1.1.3 - object.values: ^1.1.7 + object.entries: ^1.1.6 + object.fromentries: ^2.0.6 + object.hasown: ^1.1.2 + object.values: ^1.1.6 prop-types: ^15.8.1 - resolve: ^2.0.0-next.5 + resolve: ^2.0.0-next.4 semver: ^6.3.1 - string.prototype.matchall: ^4.0.10 + string.prototype.matchall: ^4.0.8 peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 82f391c5a093235c3bc2f664c54e009c49460778ee7d1b86c1536df9ac4d2a80d1dedc9241ac797df4a9dced936e955d9c89042fb3ac8d017b5359d1320d3c0f + checksum: b4c3d76390b0ae6b6f9fed78170604cc2c04b48e6778a637db339e8e3911ec9ef22510b0ae77c429698151d0f1b245f282177f384105b6830e7b29b9c9b26610 languageName: node linkType: hard @@ -1964,9 +1908,9 @@ __metadata: linkType: hard "flatted@npm:^3.2.9": - version: 3.3.1 - resolution: "flatted@npm:3.3.1" - checksum: 85ae7181650bb728c221e7644cbc9f4bf28bc556f2fc89bb21266962bdf0ce1029cc7acc44bb646cd469d9baac7c317f64e841c4c4c00516afa97320cdac7f94 + version: 3.2.9 + resolution: "flatted@npm:3.2.9" + checksum: f14167fbe26a9d20f6fca8d998e8f1f41df72c8e81f9f2c9d61ed2bea058248f5e1cbd05e7f88c0e5087a6a0b822a1e5e2b446e879f3cfbe0b07ba2d7f80b026 languageName: node linkType: hard @@ -2122,7 +2066,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": +"get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": version: 1.2.4 resolution: "get-intrinsic@npm:1.2.4" dependencies: @@ -2307,7 +2251,7 @@ __metadata: languageName: node linkType: hard -"has-property-descriptors@npm:^1.0.2": +"has-property-descriptors@npm:^1.0.1, has-property-descriptors@npm:^1.0.2": version: 1.0.2 resolution: "has-property-descriptors@npm:1.0.2" dependencies: @@ -2323,13 +2267,6 @@ __metadata: languageName: node linkType: hard -"has-proto@npm:^1.0.3": - version: 1.0.3 - resolution: "has-proto@npm:1.0.3" - checksum: fe7c3d50b33f50f3933a04413ed1f69441d21d2d2944f81036276d30635cad9279f6b43bc8f32036c31ebdfcf6e731150f46c1907ad90c669ffe9b066c3ba5c4 - languageName: node - linkType: hard - "has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": version: 1.0.3 resolution: "has-symbols@npm:1.0.3" @@ -2346,7 +2283,7 @@ __metadata: languageName: node linkType: hard -"has-tostringtag@npm:^1.0.2": +"has-tostringtag@npm:^1.0.1": version: 1.0.2 resolution: "has-tostringtag@npm:1.0.2" dependencies: @@ -2371,12 +2308,12 @@ __metadata: languageName: node linkType: hard -"hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": - version: 2.0.2 - resolution: "hasown@npm:2.0.2" +"hasown@npm:^2.0.0, hasown@npm:^2.0.1": + version: 2.0.1 + resolution: "hasown@npm:2.0.1" dependencies: function-bind: ^1.1.2 - checksum: e8516f776a15149ca6c6ed2ae3110c417a00b62260e222590e54aa367cbcd6ed99122020b37b7fbdf05748df57b265e70095d7bf35a47660587619b15ffb93db + checksum: 9081c382a4fe8a62639a8da5c7d3322b203c319147e48783763dd741863d9f2dcaa743574fe2a1283871c445d8ba99ea45d5fff384e5ad27ca9dd7a367d79de0 languageName: node linkType: hard @@ -2528,7 +2465,7 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.7": +"internal-slot@npm:^1.0.5, internal-slot@npm:^1.0.7": version: 1.0.7 resolution: "internal-slot@npm:1.0.7" dependencies: @@ -2625,15 +2562,6 @@ __metadata: languageName: node linkType: hard -"is-data-view@npm:^1.0.1": - version: 1.0.1 - resolution: "is-data-view@npm:1.0.1" - dependencies: - is-typed-array: ^1.1.13 - checksum: 4ba4562ac2b2ec005fefe48269d6bd0152785458cd253c746154ffb8a8ab506a29d0cfb3b74af87513843776a88e4981ae25c89457bf640a33748eab1a7216b5 - languageName: node - linkType: hard - "is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" @@ -2698,10 +2626,10 @@ __metadata: languageName: node linkType: hard -"is-negative-zero@npm:^2.0.3": - version: 2.0.3 - resolution: "is-negative-zero@npm:2.0.3" - checksum: c1e6b23d2070c0539d7b36022d5a94407132411d01aba39ec549af824231f3804b1aea90b5e4e58e807a65d23ceb538ed6e355ce76b267bdd86edb757ffcbdcd +"is-negative-zero@npm:^2.0.2": + version: 2.0.2 + resolution: "is-negative-zero@npm:2.0.2" + checksum: f3232194c47a549da60c3d509c9a09be442507616b69454716692e37ae9f37c4dea264fb208ad0c9f3efd15a796a46b79df07c7e53c6227c32170608b809149a languageName: node linkType: hard @@ -2754,15 +2682,6 @@ __metadata: languageName: node linkType: hard -"is-shared-array-buffer@npm:^1.0.3": - version: 1.0.3 - resolution: "is-shared-array-buffer@npm:1.0.3" - dependencies: - call-bind: ^1.0.7 - checksum: a4fff602c309e64ccaa83b859255a43bb011145a42d3f56f67d9268b55bc7e6d98a5981a1d834186ad3105d6739d21547083fe7259c76c0468483fc538e716d8 - languageName: node - linkType: hard - "is-string@npm:^1.0.5, is-string@npm:^1.0.7": version: 1.0.7 resolution: "is-string@npm:1.0.7" @@ -2781,7 +2700,16 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.13": +"is-typed-array@npm:^1.1.10": + version: 1.1.12 + resolution: "is-typed-array@npm:1.1.12" + dependencies: + which-typed-array: "npm:^1.1.11" + checksum: 4c89c4a3be07186caddadf92197b17fda663a9d259ea0d44a85f171558270d36059d1c386d34a12cba22dfade5aba497ce22778e866adc9406098c8fc4771796 + languageName: node + linkType: hard + +"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.9": version: 1.1.13 resolution: "is-typed-array@npm:1.1.13" dependencies: @@ -2999,9 +2927,9 @@ __metadata: linkType: hard "lilconfig@npm:^3.0.0": - version: 3.1.1 - resolution: "lilconfig@npm:3.1.1" - checksum: dc8a4f4afde3f0fac6bd36163cc4777a577a90759b8ef1d0d766b19ccf121f723aa79924f32af5b954f3965268215e046d0f237c41c76e5ef01d4e6d1208a15e + version: 3.1.0 + resolution: "lilconfig@npm:3.1.0" + checksum: 114fdf6bfde357ced5e314fe238042f02524191ee2032cf567542f5a13955c3a5fdde7518a86d6b2fcdf0cb99abc52635117077c6f6e9e2e83367513416559fb languageName: node linkType: hard @@ -3397,11 +3325,11 @@ __metadata: linkType: hard "node-abi@npm:^3.3.0": - version: 3.56.0 - resolution: "node-abi@npm:3.56.0" + version: 3.54.0 + resolution: "node-abi@npm:3.54.0" dependencies: semver: ^7.3.5 - checksum: 76a9f705f88b217fe8b23c0003333256d695c0417bee745392524b9444df6e843a3c5cfad90e06a1e00f26cdf91db8d6efa11b1468929ffb6d2e8ac2aa364008 + checksum: 260caae87299bb2fac6a269ba5dd378dbe1d99030396832fca7199b6cb5fd46556d2ec0d431f4a76ab2d53e49948047543afe3f1d70d0e6ebad04d33139650da languageName: node linkType: hard @@ -3538,41 +3466,42 @@ __metadata: languageName: node linkType: hard -"object.entries@npm:^1.1.7": - version: 1.1.8 - resolution: "object.entries@npm:1.1.8" +"object.entries@npm:^1.1.6, object.entries@npm:^1.1.7": + version: 1.1.7 + resolution: "object.entries@npm:1.1.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-object-atoms: ^1.0.0 - checksum: 5314877cb637ef3437a30bba61d9bacdb3ce74bf73ac101518be0633c37840c8cc67407edb341f766e8093b3d7516d5c3358f25adfee4a2c697c0ec4c8491907 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: da287d434e7e32989586cd734382364ba826a2527f2bc82e6acbf9f9bfafa35d51018b66ec02543ffdfa2a5ba4af2b6f1ca6e588c65030cb4fd9c67d6ced594c languageName: node linkType: hard -"object.fromentries@npm:^2.0.7": - version: 2.0.8 - resolution: "object.fromentries@npm:2.0.8" +"object.fromentries@npm:^2.0.6, object.fromentries@npm:^2.0.7": + version: 2.0.7 + resolution: "object.fromentries@npm:2.0.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-abstract: ^1.23.2 - es-object-atoms: ^1.0.0 - checksum: 29b2207a2db2782d7ced83f93b3ff5d425f901945f3665ffda1821e30a7253cd1fd6b891a64279976098137ddfa883d748787a6fea53ecdb51f8df8b8cec0ae1 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 7341ce246e248b39a431b87a9ddd331ff52a454deb79afebc95609f94b1f8238966cf21f52188f2a353f0fdf83294f32f1ebf1f7826aae915ebad21fd0678065 languageName: node linkType: hard "object.groupby@npm:^1.0.1": - version: 1.0.3 - resolution: "object.groupby@npm:1.0.3" + version: 1.0.2 + resolution: "object.groupby@npm:1.0.2" dependencies: - call-bind: ^1.0.7 + array.prototype.filter: ^1.0.3 + call-bind: ^1.0.5 define-properties: ^1.2.1 - es-abstract: ^1.23.2 - checksum: 0d30693ca3ace29720bffd20b3130451dca7a56c612e1926c0a1a15e4306061d84410bdb1456be2656c5aca53c81b7a3661eceaa362db1bba6669c2c9b6d1982 + es-abstract: ^1.22.3 + es-errors: ^1.0.0 + checksum: 5f95c2a3a5f60a1a8c05fdd71455110bd3d5e6af0350a20b133d8cd70f9c3385d5c7fceb6a17b940c3c61752d9c202d10d5e2eb5ce73b89002656a87e7bf767a languageName: node linkType: hard -"object.hasown@npm:^1.1.3": +"object.hasown@npm:^1.1.2": version: 1.1.3 resolution: "object.hasown@npm:1.1.3" dependencies: @@ -3583,13 +3512,13 @@ __metadata: linkType: hard "object.values@npm:^1.1.6, object.values@npm:^1.1.7": - version: 1.2.0 - resolution: "object.values@npm:1.2.0" + version: 1.1.7 + resolution: "object.values@npm:1.1.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-object-atoms: ^1.0.0 - checksum: 51fef456c2a544275cb1766897f34ded968b22adfc13ba13b5e4815fdaf4304a90d42a3aee114b1f1ede048a4890381d47a5594d84296f2767c6a0364b9da8fa + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: f3e4ae4f21eb1cc7cebb6ce036d4c67b36e1c750428d7b7623c56a0db90edced63d08af8a316d81dfb7c41a3a5fa81b05b7cc9426e98d7da986b1682460f0777 languageName: node linkType: hard @@ -3725,13 +3654,6 @@ __metadata: languageName: node linkType: hard -"possible-typed-array-names@npm:^1.0.0": - version: 1.0.0 - resolution: "possible-typed-array-names@npm:1.0.0" - checksum: b32d403ece71e042385cc7856385cecf1cd8e144fa74d2f1de40d1e16035dba097bc189715925e79b67bdd1472796ff168d3a90d296356c9c94d272d5b95f3ae - languageName: node - linkType: hard - "postcss-focus-visible@npm:^6.0.4": version: 6.0.4 resolution: "postcss-focus-visible@npm:6.0.4" @@ -3820,12 +3742,12 @@ __metadata: linkType: hard "postcss-selector-parser@npm:^6.0.11, postcss-selector-parser@npm:^6.0.9": - version: 6.0.16 - resolution: "postcss-selector-parser@npm:6.0.16" + version: 6.0.15 + resolution: "postcss-selector-parser@npm:6.0.15" dependencies: cssesc: ^3.0.0 util-deprecate: ^1.0.2 - checksum: e1cd68e33a39e3dc1e1e5bd8717be5bbe3cc23a4cecb466c3acb2f3a77daad7a47df4d6137a76f8db74cf160d2fb16b2cfdb4ccbebdfda844690f8d545fe281d + checksum: 57decb94152111004f15e27b9c61131eb50ee10a3288e7fcf424cebbb4aba82c2817517ae718f8b5d704ee9e02a638d4a2acff8f47685c295a33ecee4fd31055 languageName: node linkType: hard @@ -3848,19 +3770,19 @@ __metadata: linkType: hard "postcss@npm:^8.4.23": - version: 8.4.38 - resolution: "postcss@npm:8.4.38" + version: 8.4.35 + resolution: "postcss@npm:8.4.35" dependencies: nanoid: ^3.3.7 picocolors: ^1.0.0 - source-map-js: ^1.2.0 - checksum: 649f9e60a763ca4b5a7bbec446a069edf07f057f6d780a5a0070576b841538d1ecf7dd888f2fbfd1f76200e26c969e405aeeae66332e6927dbdc8bdcb90b9451 + source-map-js: ^1.0.2 + checksum: cf3c3124d3912a507603f6d9a49b3783f741075e9aa73eb592a6dd9194f9edab9d20a8875d16d137d4f779fe7b6fbd1f5727e39bfd1c3003724980ee4995e1da languageName: node linkType: hard "prebuild-install@npm:^7.1.1": - version: 7.1.2 - resolution: "prebuild-install@npm:7.1.2" + version: 7.1.1 + resolution: "prebuild-install@npm:7.1.1" dependencies: detect-libc: ^2.0.0 expand-template: ^2.0.3 @@ -3876,7 +3798,7 @@ __metadata: tunnel-agent: ^0.6.0 bin: prebuild-install: bin.js - checksum: 543dadf8c60e004ae9529e6013ca0cbeac8ef38b5f5ba5518cb0b622fe7f8758b34e4b5cb1a791db3cdc9d2281766302df6088bd1a225f206925d6fee17d6c5c + checksum: dbf96d0146b6b5827fc8f67f72074d2e19c69628b9a7a0a17d0fad1bf37e9f06922896972e074197fc00a52eae912993e6ef5a0d471652f561df5cb516f3f467 languageName: node linkType: hard @@ -4094,17 +4016,17 @@ __metadata: linkType: hard "reflect.getprototypeof@npm:^1.0.4": - version: 1.0.6 - resolution: "reflect.getprototypeof@npm:1.0.6" + version: 1.0.5 + resolution: "reflect.getprototypeof@npm:1.0.5" dependencies: - call-bind: ^1.0.7 + call-bind: ^1.0.5 define-properties: ^1.2.1 - es-abstract: ^1.23.1 - es-errors: ^1.3.0 - get-intrinsic: ^1.2.4 + es-abstract: ^1.22.3 + es-errors: ^1.0.0 + get-intrinsic: ^1.2.3 globalthis: ^1.0.3 which-builtin-type: ^1.1.3 - checksum: 88e9e65a7eaa0bf8e9a8bbf8ac07571363bc333ba8b6769ed5e013e0042ed7c385e97fae9049510b3b5fe4b42472d8f32de9ce8ce84902bc4297d4bbe3777dba + checksum: c7176be030b89b9e55882f4da3288de5ffd187c528d79870e27d2c8a713a82b3fa058ca2d0c9da25f6d61240e2685c42d7daa32cdf3d431d8207ee1b9ed30993 languageName: node linkType: hard @@ -4115,6 +4037,17 @@ __metadata: languageName: node linkType: hard +"regexp.prototype.flags@npm:^1.5.0": + version: 1.5.0 + resolution: "regexp.prototype.flags@npm:1.5.0" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + functions-have-names: "npm:^1.2.3" + checksum: c541687cdbdfff1b9a07f6e44879f82c66bbf07665f9a7544c5fd16acdb3ec8d1436caab01662d2fbcad403f3499d49ab0b77fbc7ef29ef961d98cc4bc9755b4 + languageName: node + linkType: hard + "regexp.prototype.flags@npm:^1.5.2": version: 1.5.2 resolution: "regexp.prototype.flags@npm:1.5.2" @@ -4154,7 +4087,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^2.0.0-next.5": +"resolve@npm:^2.0.0-next.4": version: 2.0.0-next.5 resolution: "resolve@npm:2.0.0-next.5" dependencies: @@ -4180,7 +4113,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^2.0.0-next.5#~builtin": +"resolve@patch:resolve@^2.0.0-next.4#~builtin": version: 2.0.0-next.5 resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#~builtin::version=2.0.0-next.5&hash=c3c19d" dependencies: @@ -4227,15 +4160,15 @@ __metadata: languageName: node linkType: hard -"safe-array-concat@npm:^1.1.2": - version: 1.1.2 - resolution: "safe-array-concat@npm:1.1.2" +"safe-array-concat@npm:^1.1.0": + version: 1.1.0 + resolution: "safe-array-concat@npm:1.1.0" dependencies: - call-bind: ^1.0.7 - get-intrinsic: ^1.2.4 + call-bind: ^1.0.5 + get-intrinsic: ^1.2.2 has-symbols: ^1.0.3 isarray: ^2.0.5 - checksum: a3b259694754ddfb73ae0663829e396977b99ff21cbe8607f35a469655656da8e271753497e59da8a7575baa94d2e684bea3e10ddd74ba046c0c9b4418ffa0c4 + checksum: 5c71eaa999168ee7474929f1cd3aae80f486353a651a094d9968936692cf90aa065224929a6486dcda66334a27dce4250a83612f9e0fef6dced1a925d3ac7296 languageName: node linkType: hard @@ -4301,28 +4234,27 @@ __metadata: linkType: hard "set-function-length@npm:^1.2.1": - version: 1.2.2 - resolution: "set-function-length@npm:1.2.2" + version: 1.2.1 + resolution: "set-function-length@npm:1.2.1" dependencies: - define-data-property: ^1.1.4 + define-data-property: ^1.1.2 es-errors: ^1.3.0 function-bind: ^1.1.2 - get-intrinsic: ^1.2.4 + get-intrinsic: ^1.2.3 gopd: ^1.0.1 - has-property-descriptors: ^1.0.2 - checksum: a8248bdacdf84cb0fab4637774d9fb3c7a8e6089866d04c817583ff48e14149c87044ce683d7f50759a8c50fb87c7a7e173535b06169c87ef76f5fb276dfff72 + has-property-descriptors: ^1.0.1 + checksum: 23742476d695f2eae86348c069bd164d4f25fa7c26546a46a2b5f370f1f84b98ec64366d2cd17785d5b41bbf16b95855da4b7eb188e7056fe3b0248d61f6afda languageName: node linkType: hard -"set-function-name@npm:^2.0.1, set-function-name@npm:^2.0.2": - version: 2.0.2 - resolution: "set-function-name@npm:2.0.2" +"set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1": + version: 2.0.1 + resolution: "set-function-name@npm:2.0.1" dependencies: - define-data-property: ^1.1.4 - es-errors: ^1.3.0 + define-data-property: ^1.0.1 functions-have-names: ^1.2.3 - has-property-descriptors: ^1.0.2 - checksum: d6229a71527fd0404399fc6227e0ff0652800362510822a291925c9d7b48a1ca1a468b11b281471c34cd5a2da0db4f5d7ff315a61d26655e77f6e971e6d0c80f + has-property-descriptors: ^1.0.0 + checksum: 4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 languageName: node linkType: hard @@ -4370,18 +4302,6 @@ __metadata: languageName: node linkType: hard -"side-channel@npm:^1.0.6": - version: 1.0.6 - resolution: "side-channel@npm:1.0.6" - dependencies: - call-bind: ^1.0.7 - es-errors: ^1.3.0 - get-intrinsic: ^1.2.4 - object-inspect: ^1.13.1 - checksum: bfc1afc1827d712271453e91b7cd3878ac0efd767495fd4e594c4c2afaa7963b7b510e249572bfd54b0527e66e4a12b61b80c061389e129755f34c493aad9b97 - languageName: node - linkType: hard - "signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" @@ -4467,10 +4387,10 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.0.2, source-map-js@npm:^1.2.0": - version: 1.2.0 - resolution: "source-map-js@npm:1.2.0" - checksum: 791a43306d9223792e84293b00458bf102a8946e7188f3db0e4e22d8d530b5f80a4ce468eb5ec0bf585443ad55ebbd630bf379c98db0b1f317fd902500217f97 +"source-map-js@npm:^1.0.2": + version: 1.0.2 + resolution: "source-map-js@npm:1.0.2" + checksum: c049a7fc4deb9a7e9b481ae3d424cc793cb4845daa690bc5a05d428bf41bf231ced49b4cf0c9e77f9d42fdb3d20d6187619fc586605f5eabe995a316da8d377c languageName: node linkType: hard @@ -4491,8 +4411,8 @@ __metadata: linkType: hard "streamx@npm:^2.13.0, streamx@npm:^2.15.0": - version: 2.16.1 - resolution: "streamx@npm:2.16.1" + version: 2.15.8 + resolution: "streamx@npm:2.15.8" dependencies: bare-events: ^2.2.0 fast-fifo: ^1.1.0 @@ -4500,7 +4420,7 @@ __metadata: dependenciesMeta: bare-events: optional: true - checksum: 6bbb4c38c0ab6ddbe0857d55e72f71288f308f2a9f4413b7b07391cdf9f94232ffc2bbe40a1212d2e09634ecdbd5052b444c73cc8d67ae1c97e2b7e553dad559 + checksum: 3068407bb3a856e247dbb32a68d0830170f8c014b8c5123b11c5ee9e4a75905ff80d5b676283bcae2f48d8de61464a71d851e080b5288d18fc3ee94b3ff474e8 languageName: node linkType: hard @@ -4526,57 +4446,53 @@ __metadata: languageName: node linkType: hard -"string.prototype.matchall@npm:^4.0.10": - version: 4.0.11 - resolution: "string.prototype.matchall@npm:4.0.11" +"string.prototype.matchall@npm:^4.0.8": + version: 4.0.10 + resolution: "string.prototype.matchall@npm:4.0.10" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-abstract: ^1.23.2 - es-errors: ^1.3.0 - es-object-atoms: ^1.0.0 - get-intrinsic: ^1.2.4 - gopd: ^1.0.1 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 has-symbols: ^1.0.3 - internal-slot: ^1.0.7 - regexp.prototype.flags: ^1.5.2 - set-function-name: ^2.0.2 - side-channel: ^1.0.6 - checksum: 6ac6566ed065c0c8489c91156078ca077db8ff64d683fda97ae652d00c52dfa5f39aaab0a710d8243031a857fd2c7c511e38b45524796764d25472d10d7075ae + internal-slot: ^1.0.5 + regexp.prototype.flags: ^1.5.0 + set-function-name: ^2.0.0 + side-channel: ^1.0.4 + checksum: 3c78bdeff39360c8e435d7c4c6ea19f454aa7a63eda95fa6fadc3a5b984446a2f9f2c02d5c94171ce22268a573524263fbd0c8edbe3ce2e9890d7cc036cdc3ed languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.9": - version: 1.2.9 - resolution: "string.prototype.trim@npm:1.2.9" +"string.prototype.trim@npm:^1.2.8": + version: 1.2.8 + resolution: "string.prototype.trim@npm:1.2.8" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-abstract: ^1.23.0 - es-object-atoms: ^1.0.0 - checksum: ea2df6ec1e914c9d4e2dc856fa08228e8b1be59b59e50b17578c94a66a176888f417264bb763d4aac638ad3b3dad56e7a03d9317086a178078d131aa293ba193 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 49eb1a862a53aba73c3fb6c2a53f5463173cb1f4512374b623bcd6b43ad49dd559a06fb5789bdec771a40fc4d2a564411c0a75d35fb27e76bbe738c211ecff07 languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.8": - version: 1.0.8 - resolution: "string.prototype.trimend@npm:1.0.8" +"string.prototype.trimend@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimend@npm:1.0.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-object-atoms: ^1.0.0 - checksum: cc3bd2de08d8968a28787deba9a3cb3f17ca5f9f770c91e7e8fa3e7d47f079bad70fadce16f05dda9f261788be2c6e84a942f618c3bed31e42abc5c1084f8dfd + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 2375516272fd1ba75992f4c4aa88a7b5f3c7a9ca308d963bcd5645adf689eba6f8a04ebab80c33e30ec0aefc6554181a3a8416015c38da0aa118e60ec896310c languageName: node linkType: hard "string.prototype.trimstart@npm:^1.0.7": - version: 1.0.8 - resolution: "string.prototype.trimstart@npm:1.0.8" + version: 1.0.7 + resolution: "string.prototype.trimstart@npm:1.0.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-object-atoms: ^1.0.0 - checksum: df1007a7f580a49d692375d996521dc14fd103acda7f3034b3c558a60b82beeed3a64fa91e494e164581793a8ab0ae2f59578a49896a7af6583c1f20472bce96 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 13d0c2cb0d5ff9e926fa0bec559158b062eed2b68cd5be777ffba782c96b2b492944e47057274e064549b94dd27cf81f48b27a31fee8af5b574cff253e7eb613 languageName: node linkType: hard @@ -4881,55 +4797,50 @@ __metadata: languageName: node linkType: hard -"typed-array-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "typed-array-buffer@npm:1.0.2" +"typed-array-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "typed-array-buffer@npm:1.0.1" dependencies: - call-bind: ^1.0.7 + call-bind: ^1.0.6 es-errors: ^1.3.0 is-typed-array: ^1.1.13 - checksum: 02ffc185d29c6df07968272b15d5319a1610817916ec8d4cd670ded5d1efe72901541ff2202fcc622730d8a549c76e198a2f74e312eabbfb712ed907d45cbb0b + checksum: 1d65e46b2b9b7ec2a30df39b9ddf32e55ad08d6119aec33975506a3dba56057796bdc3c64dbeb7fdb61bf340a75e279dfd55b48ce8f3b874f01731e1da6833d2 languageName: node linkType: hard -"typed-array-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "typed-array-byte-length@npm:1.0.1" +"typed-array-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-length@npm:1.0.0" dependencies: - call-bind: ^1.0.7 + call-bind: ^1.0.2 for-each: ^0.3.3 - gopd: ^1.0.1 - has-proto: ^1.0.3 - is-typed-array: ^1.1.13 - checksum: f65e5ecd1cf76b1a2d0d6f631f3ea3cdb5e08da106c6703ffe687d583e49954d570cc80434816d3746e18be889ffe53c58bf3e538081ea4077c26a41055b216d + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: b03db16458322b263d87a702ff25388293f1356326c8a678d7515767ef563ef80e1e67ce648b821ec13178dd628eb2afdc19f97001ceae7a31acf674c849af94 languageName: node linkType: hard -"typed-array-byte-offset@npm:^1.0.2": - version: 1.0.2 - resolution: "typed-array-byte-offset@npm:1.0.2" +"typed-array-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-offset@npm:1.0.0" dependencies: - available-typed-arrays: ^1.0.7 - call-bind: ^1.0.7 + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.2 for-each: ^0.3.3 - gopd: ^1.0.1 - has-proto: ^1.0.3 - is-typed-array: ^1.1.13 - checksum: c8645c8794a621a0adcc142e0e2c57b1823bbfa4d590ad2c76b266aa3823895cf7afb9a893bf6685e18454ab1b0241e1a8d885a2d1340948efa4b56add4b5f67 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: 04f6f02d0e9a948a95fbfe0d5a70b002191fae0b8fe0fe3130a9b2336f043daf7a3dda56a31333c35a067a97e13f539949ab261ca0f3692c41603a46a94e960b languageName: node linkType: hard -"typed-array-length@npm:^1.0.5": - version: 1.0.6 - resolution: "typed-array-length@npm:1.0.6" +"typed-array-length@npm:^1.0.4": + version: 1.0.4 + resolution: "typed-array-length@npm:1.0.4" dependencies: - call-bind: ^1.0.7 + call-bind: ^1.0.2 for-each: ^0.3.3 - gopd: ^1.0.1 - has-proto: ^1.0.3 - is-typed-array: ^1.1.13 - possible-typed-array-names: ^1.0.0 - checksum: f0315e5b8f0168c29d390ff410ad13e4d511c78e6006df4a104576844812ee447fcc32daab1f3a76c9ef4f64eff808e134528b5b2439de335586b392e9750e5c + is-typed-array: ^1.1.9 + checksum: 2228febc93c7feff142b8c96a58d4a0d7623ecde6c7a24b2b98eb3170e99f7c7eff8c114f9b283085cd59dcd2bd43aadf20e25bba4b034a53c5bb292f71f8956 languageName: node linkType: hard @@ -5038,20 +4949,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15": - version: 1.1.15 - resolution: "which-typed-array@npm:1.1.15" - dependencies: - available-typed-arrays: ^1.0.7 - call-bind: ^1.0.7 - for-each: ^0.3.3 - gopd: ^1.0.1 - has-tostringtag: ^1.0.2 - checksum: 65227dcbfadf5677aacc43ec84356d17b5500cb8b8753059bb4397de5cd0c2de681d24e1a7bd575633f976a95f88233abfd6549c2105ef4ebd58af8aa1807c75 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.9": +"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.9": version: 1.1.11 resolution: "which-typed-array@npm:1.1.11" dependencies: @@ -5064,6 +4962,19 @@ __metadata: languageName: node linkType: hard +"which-typed-array@npm:^1.1.14": + version: 1.1.14 + resolution: "which-typed-array@npm:1.1.14" + dependencies: + available-typed-arrays: ^1.0.6 + call-bind: ^1.0.5 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-tostringtag: ^1.0.1 + checksum: efe30c143c58630dde8ab96f9330e20165bacd77ca843c602b510120a415415573bcdef3ccbc30a0e5aaf20f257360cfe24712aea0008f149ce5bb99834c0c0b + languageName: node + linkType: hard + "which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" @@ -5121,11 +5032,9 @@ __metadata: linkType: hard "yaml@npm:^2.3.4": - version: 2.4.1 - resolution: "yaml@npm:2.4.1" - bin: - yaml: bin.mjs - checksum: 4c391d07a5d5e935e058babb71026c9cdc9a6fd889e35dd91b53cfb0a12691b67c6c5c740858e71345fef18cd9c13c554a6dda9196f59820d769d94041badb0b + version: 2.3.4 + resolution: "yaml@npm:2.3.4" + checksum: e6d1dae1c6383bcc8ba11796eef3b8c02d5082911c6723efeeb5ba50fc8e881df18d645e64de68e421b577296000bea9c75d6d9097c2f6699da3ae0406c030d8 languageName: node linkType: hard diff --git a/packages/entity-invalidator/yarn.deploy.lock b/packages/entity-invalidator/yarn.deploy.lock index 31ff694bb..c3d99c0bc 100644 --- a/packages/entity-invalidator/yarn.deploy.lock +++ b/packages/entity-invalidator/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -242,7 +242,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -252,15 +252,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -326,7 +326,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -544,8 +544,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -562,7 +562,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/fanout-metadata-service/yarn.deploy.lock b/packages/fanout-metadata-service/yarn.deploy.lock index 92a5045fb..cf04884e0 100644 --- a/packages/fanout-metadata-service/yarn.deploy.lock +++ b/packages/fanout-metadata-service/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -431,8 +431,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -449,7 +449,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/fanout-sdk/yarn.deploy.lock b/packages/fanout-sdk/yarn.deploy.lock index 1f2ea68f1..c62d06555 100644 --- a/packages/fanout-sdk/yarn.deploy.lock +++ b/packages/fanout-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -255,8 +255,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -273,7 +273,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/faucet-service/yarn.deploy.lock b/packages/faucet-service/yarn.deploy.lock index 10df452ec..0bab781c7 100644 --- a/packages/faucet-service/yarn.deploy.lock +++ b/packages/faucet-service/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -415,8 +415,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -433,7 +433,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index e875c6033..603fd0d91 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -49,7 +49,7 @@ "@helium/helium-sub-daos-sdk": "^0.7.6", "@helium/lazy-distributor-sdk": "^0.7.6", "@helium/mobile-entity-manager-sdk": "^0.7.6", - "@helium/nft-delegation-sdk": "0.0.8-next.12+f1b0c8c", + "@helium/nft-proxy-sdk": "0.0.8-next.16+ace2c47", "@helium/price-oracle-sdk": "^0.7.6", "@helium/spl-utils": "^0.7.6", "@helium/treasury-management-sdk": "^0.7.6", diff --git a/packages/helium-admin-cli/src/create-dao.ts b/packages/helium-admin-cli/src/create-dao.ts index fac86dd8e..779030eb7 100644 --- a/packages/helium-admin-cli/src/create-dao.ts +++ b/packages/helium-admin-cli/src/create-dao.ts @@ -56,7 +56,7 @@ import { parseEmissionsSchedule, sendInstructionsOrSquads, } from "./utils"; -import { init } from "@helium/nft-delegation-sdk"; +import { init } from "@helium/nft-proxy-sdk"; const SECS_PER_DAY = 86400; const SECS_PER_YEAR = 365 * SECS_PER_DAY; @@ -278,12 +278,12 @@ export async function run(args: any = process.argv) { const delProgram = await init(provider); const { - pubkeys: { delegationConfig }, + pubkeys: { proxyConfig }, instruction, } = await delProgram.methods - .initializeDelegationConfigV0({ + .initializeProxyConfigV0({ // Set max time to 2 years, though seasons should take precedent - maxDelegationTime: new anchor.BN(24 * 60 * 60 * 365 * 2), + maxProxyTime: new anchor.BN(24 * 60 * 60 * 365 * 2), seasons, name: "Helium", }) @@ -292,7 +292,7 @@ export async function run(args: any = process.argv) { }) .prepare(); - if (!(await exists(provider.connection, delegationConfig!))) { + if (!(await exists(provider.connection, proxyConfig!))) { console.log("Creating delegation config"); await sendInstructions(provider, [instruction]); } @@ -349,7 +349,7 @@ export async function run(args: any = process.argv) { .accounts({ realm, realmGoverningTokenMint: hntKeypair.publicKey, - delegationConfig, + proxyConfig, }) .instruction() ); diff --git a/packages/helium-admin-cli/src/create-subdao.ts b/packages/helium-admin-cli/src/create-subdao.ts index d0ff83ced..ff300774b 100644 --- a/packages/helium-admin-cli/src/create-subdao.ts +++ b/packages/helium-admin-cli/src/create-subdao.ts @@ -51,7 +51,7 @@ import { parseEmissionsSchedule, sendInstructionsOrSquads, } from "./utils"; -import { init } from "@helium/nft-delegation-sdk"; +import { init } from "@helium/nft-proxy-sdk"; import BN from "bn.js" const SECS_PER_DAY = 86400; @@ -299,12 +299,12 @@ export async function run(args: any = process.argv) { const delProgram = await init(provider); const { - pubkeys: { delegationConfig }, + pubkeys: { proxyConfig }, instruction, } = await delProgram.methods - .initializeDelegationConfigV0({ + .initializeProxyConfigV0({ // Set max time to 2 years, though seasons should take precedent - maxDelegationTime: new anchor.BN(24 * 60 * 60 * 365 * 2), + maxProxyTime: new anchor.BN(24 * 60 * 60 * 365 * 2), seasons, name: "Helium", }) @@ -313,7 +313,7 @@ export async function run(args: any = process.argv) { }) .prepare(); - if (!(await exists(provider.connection, delegationConfig!))) { + if (!(await exists(provider.connection, proxyConfig!))) { console.log("Creating delegation config"); await sendInstructions(provider, [instruction]); } @@ -366,7 +366,7 @@ export async function run(args: any = process.argv) { .accounts({ realm, realmGoverningTokenMint: subdaoKeypair.publicKey, - delegationConfig, + proxyConfig, }) .instruction() ); diff --git a/packages/helium-admin-cli/src/set-delegation-config.ts b/packages/helium-admin-cli/src/set-delegation-config.ts index 02ffd34d9..281acf73d 100644 --- a/packages/helium-admin-cli/src/set-delegation-config.ts +++ b/packages/helium-admin-cli/src/set-delegation-config.ts @@ -2,7 +2,7 @@ import yargs from "yargs/yargs"; import { exists, loadKeypair, sendInstructionsOrSquads } from "./utils"; import os from "os"; import * as anchor from "@coral-xyz/anchor"; -import { init } from "@helium/nft-delegation-sdk"; +import { init } from "@helium/nft-proxy-sdk"; import { init as initVsr } from "@helium/voter-stake-registry-sdk"; import fs from "fs"; import { sendInstructions } from "@helium/spl-utils"; @@ -70,12 +70,12 @@ export async function run(args: any = process.argv) { ); const { - pubkeys: { delegationConfig }, + pubkeys: { proxyConfig }, instruction, } = await delProgram.methods - .initializeDelegationConfigV0({ + .initializeProxyConfigV0({ // Set max time to 2 years, though seasons should take precedent - maxDelegationTime: new anchor.BN(24 * 60 * 60 * 365 * 2), + maxProxyTime: new anchor.BN(24 * 60 * 60 * 365 * 2), seasons, name: "Helium", }) @@ -84,7 +84,7 @@ export async function run(args: any = process.argv) { }) .prepare(); - if (!(await exists(provider.connection, delegationConfig!))) { + if (!(await exists(provider.connection, proxyConfig!))) { console.log("Creating delegation config"); await sendInstructions(provider, [instruction]); } @@ -96,7 +96,7 @@ export async function run(args: any = process.argv) { await vsrProgram.methods .updateRegistrarV0() .accounts({ - delegationConfig, + proxyConfig, registrar, realmAuthority: authority, }) diff --git a/packages/helium-admin-cli/yarn.deploy.lock b/packages/helium-admin-cli/yarn.deploy.lock index 90ce00c0a..b0fa039ae 100644 --- a/packages/helium-admin-cli/yarn.deploy.lock +++ b/packages/helium-admin-cli/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -325,7 +325,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.7.6 "@helium/lazy-distributor-sdk": ^0.7.6 "@helium/mobile-entity-manager-sdk": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/price-oracle-sdk": ^0.7.6 "@helium/spl-utils": ^0.7.6 "@helium/treasury-management-sdk": ^0.7.6 @@ -450,7 +450,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -460,15 +460,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -565,7 +565,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -835,8 +835,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -853,7 +853,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/helium-entity-manager-sdk/yarn.deploy.lock b/packages/helium-entity-manager-sdk/yarn.deploy.lock index 96b29a828..b248c7f07 100644 --- a/packages/helium-entity-manager-sdk/yarn.deploy.lock +++ b/packages/helium-entity-manager-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -211,7 +211,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -221,15 +221,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -295,7 +295,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -513,8 +513,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -531,7 +531,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/helium-react-hooks/yarn.deploy.lock b/packages/helium-react-hooks/yarn.deploy.lock index b7dc64fb3..fa6d2fa05 100644 --- a/packages/helium-react-hooks/yarn.deploy.lock +++ b/packages/helium-react-hooks/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -366,8 +366,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -384,7 +384,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/helium-sub-daos-sdk/yarn.deploy.lock b/packages/helium-sub-daos-sdk/yarn.deploy.lock index b709eb30a..b49847b7f 100644 --- a/packages/helium-sub-daos-sdk/yarn.deploy.lock +++ b/packages/helium-sub-daos-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -163,7 +163,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -173,15 +173,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -231,7 +231,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -449,8 +449,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -467,7 +467,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/helium-vote-service/src/model.ts b/packages/helium-vote-service/src/model.ts index cc3eca139..e6a64c015 100644 --- a/packages/helium-vote-service/src/model.ts +++ b/packages/helium-vote-service/src/model.ts @@ -104,7 +104,7 @@ export class VoteMarker extends Model { declare mint: string; declare choices: number[]; declare weight: string; - declare delegationIndex: number; + declare proxyIndex: number; declare created_at: Date; } @@ -120,7 +120,7 @@ VoteMarker.init( mint: DataTypes.STRING, choices: DataTypes.JSONB, weight: DataTypes.DECIMAL(38, 0).UNSIGNED, - delegationIndex: DataTypes.INTEGER, + proxyIndex: DataTypes.INTEGER, }, { sequelize, @@ -290,7 +290,7 @@ export class Delegation extends Model { declare nextOwner: string; declare index: number; declare asset: string; - declare delegationConfig: string + declare proxyConfig: string declare rentRefund: string; declare bumpSeed: number; } @@ -304,7 +304,7 @@ Delegation.init( nextOwner: DataTypes.STRING, index: DataTypes.INTEGER, asset: DataTypes.STRING, - delegationConfig: DataTypes.STRING, + proxyConfig: DataTypes.STRING, rentRefund: DataTypes.STRING, bumpSeed: DataTypes.INTEGER, expirationTime: DataTypes.DECIMAL.UNSIGNED diff --git a/packages/helium-vote-service/yarn.deploy.lock b/packages/helium-vote-service/yarn.deploy.lock index aaae15cda..54c3339a4 100644 --- a/packages/helium-vote-service/yarn.deploy.lock +++ b/packages/helium-vote-service/yarn.deploy.lock @@ -338,9 +338,9 @@ __metadata: linkType: hard "@lukeed/ms@npm:^2.0.1": - version: 2.0.1 - resolution: "@lukeed/ms@npm:2.0.1" - checksum: c7b46933bf7bad3e024dcbbe2ad6201392b4ed2a05a717c0ef7e96a03fb885d44f08b4b749c392cc51c2736a6a45a08c77f1863ace1c072928fbfd9908a13db3 + version: 2.0.2 + resolution: "@lukeed/ms@npm:2.0.2" + checksum: 6ae47ed3ebc857ffc0283cfe46129947209c770d0974eb86626138b6c194a760d08863ec593ec75a645aec133b3237b37af500739b030293e4d9a81130f4e2ae languageName: node linkType: hard @@ -2813,13 +2813,13 @@ __metadata: linkType: hard "simple-git@npm:^3.21.0": - version: 3.21.0 - resolution: "simple-git@npm:3.21.0" + version: 3.24.0 + resolution: "simple-git@npm:3.24.0" dependencies: "@kwsites/file-exists": ^1.1.1 "@kwsites/promise-deferred": ^1.1.1 debug: ^4.3.4 - checksum: e992d2ac5905c19d385ebb8575db92886c93e677acfb9edb28a842d05b7a3974ef34cc26ccb8057144099a1c5875070867456787aef5bf641a99ebfb9ef656bf + checksum: f2b8544a47c70a533a5461719e31c2ca39682ab2997158d90e636092cbd32fb2f859f57ca33eaa9d8d691e930d1654b2bc33c27ff4c86836eb211c6880f35dca languageName: node linkType: hard diff --git a/packages/hexboosting-sdk/yarn.deploy.lock b/packages/hexboosting-sdk/yarn.deploy.lock index a89c59db0..1efd4d470 100644 --- a/packages/hexboosting-sdk/yarn.deploy.lock +++ b/packages/hexboosting-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -180,7 +180,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -190,15 +190,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -248,7 +248,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -466,8 +466,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -484,7 +484,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/hotspot-utils/yarn.deploy.lock b/packages/hotspot-utils/yarn.deploy.lock index a3617b4aa..bf6301020 100644 --- a/packages/hotspot-utils/yarn.deploy.lock +++ b/packages/hotspot-utils/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -225,7 +225,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -235,15 +235,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -309,7 +309,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -527,8 +527,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -545,7 +545,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/idls/yarn.deploy.lock b/packages/idls/yarn.deploy.lock index 8807a7599..e56fd5050 100644 --- a/packages/idls/yarn.deploy.lock +++ b/packages/idls/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -167,8 +167,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -185,7 +185,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/lazy-distributor-sdk/yarn.deploy.lock b/packages/lazy-distributor-sdk/yarn.deploy.lock index 17ce4a2eb..6026ceed2 100644 --- a/packages/lazy-distributor-sdk/yarn.deploy.lock +++ b/packages/lazy-distributor-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -271,8 +271,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -289,7 +289,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/lazy-transactions-sdk/yarn.deploy.lock b/packages/lazy-transactions-sdk/yarn.deploy.lock index f1ebae3de..f558eac87 100644 --- a/packages/lazy-transactions-sdk/yarn.deploy.lock +++ b/packages/lazy-transactions-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -362,8 +362,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -380,7 +380,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/metadata-service/yarn.deploy.lock b/packages/metadata-service/yarn.deploy.lock index 42b002684..8858a464e 100644 --- a/packages/metadata-service/yarn.deploy.lock +++ b/packages/metadata-service/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -112,18 +112,18 @@ __metadata: linkType: hard "@grpc/grpc-js@npm:^1.10.1": - version: 1.10.1 - resolution: "@grpc/grpc-js@npm:1.10.1" + version: 1.10.6 + resolution: "@grpc/grpc-js@npm:1.10.6" dependencies: - "@grpc/proto-loader": ^0.7.8 - "@types/node": ">=12.12.47" - checksum: 5842c1c3ffcb630a1ee45998733861a16f8f6db4fe78f317f6be25ddf581040dc38e8c09aed7073dfae1a7099a3c83658ca8f3db77c0bc3b0e40625618245bd0 + "@grpc/proto-loader": ^0.7.10 + "@js-sdsl/ordered-map": ^4.4.2 + checksum: 343d70ee435d6b4b82c72160d31a4749ac2621938f58328dd71df3013377665128c890df60e057fde381b12b83d34f802d586f7feb61d079793d89adfc0f40e8 languageName: node linkType: hard -"@grpc/proto-loader@npm:^0.7.8": - version: 0.7.10 - resolution: "@grpc/proto-loader@npm:0.7.10" +"@grpc/proto-loader@npm:^0.7.10": + version: 0.7.12 + resolution: "@grpc/proto-loader@npm:0.7.12" dependencies: lodash.camelcase: ^4.3.0 long: ^5.0.0 @@ -131,7 +131,7 @@ __metadata: yargs: ^17.7.2 bin: proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 4987e23b57942c2363b6a6a106e63efae636666cefa348778dfafef2ff72da7343c8587667521cb1d52482827bcd001dd535bdc27065110af56d9c7c176334c9 + checksum: 5132b683b3f809417f46b421231ffa083d6300406d1276a12fc619d771b4f8e0e8ad5a935e0b381caaa9a57ef47630191dd2310b739d1be5aa90cc87b97fce0f languageName: node linkType: hard @@ -339,7 +339,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -349,15 +349,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -423,7 +423,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -474,6 +474,13 @@ __metadata: languageName: node linkType: hard +"@js-sdsl/ordered-map@npm:^4.4.2": + version: 4.4.2 + resolution: "@js-sdsl/ordered-map@npm:4.4.2" + checksum: a927ae4ff8565ecb75355cc6886a4f8fadbf2af1268143c96c0cce3ba01261d241c3f4ba77f21f3f017a00f91dfe9e0673e95f830255945c80a0e96c6d30508a + languageName: node + linkType: hard + "@mapbox/node-pre-gyp@npm:^1.0.5": version: 1.0.11 resolution: "@mapbox/node-pre-gyp@npm:1.0.11" @@ -733,8 +740,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -751,7 +758,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard @@ -847,15 +854,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:>=12.12.47": - version: 20.11.21 - resolution: "@types/node@npm:20.11.21" - dependencies: - undici-types: ~5.26.4 - checksum: 6d32edc3ba61236d879ebb6aa8905602310a2dc6469113ed6e282d63c03b4b800bd17a10ae780e4ac2a92f1ad99ad44fe8aa14cac67f86389cb141a2477a2fee - languageName: node - linkType: hard - "@types/node@npm:^12.12.54": version: 12.20.55 resolution: "@types/node@npm:12.20.55" @@ -3947,13 +3945,6 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 3192ef6f3fd5df652f2dc1cd782b49d6ff14dc98e5dced492aa8a8c65425227da5da6aafe22523c67f035a272c599bb89cfe803c1db6311e44bed3042fc25487 - languageName: node - linkType: hard - "unique-filename@npm:^3.0.0": version: 3.0.0 resolution: "unique-filename@npm:3.0.0" diff --git a/packages/migration-service/yarn.deploy.lock b/packages/migration-service/yarn.deploy.lock index f4416c366..9385c9b72 100644 --- a/packages/migration-service/yarn.deploy.lock +++ b/packages/migration-service/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -454,7 +454,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -464,15 +464,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -554,7 +554,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -821,8 +821,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -839,7 +839,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/mobile-entity-manager-sdk/yarn.deploy.lock b/packages/mobile-entity-manager-sdk/yarn.deploy.lock index a57c99543..d106ebcf2 100644 --- a/packages/mobile-entity-manager-sdk/yarn.deploy.lock +++ b/packages/mobile-entity-manager-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -229,7 +229,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -239,15 +239,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -313,7 +313,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -531,8 +531,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -549,7 +549,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/monitor-service/yarn.deploy.lock b/packages/monitor-service/yarn.deploy.lock index 2ca0c3eac..dbef8eab8 100644 --- a/packages/monitor-service/yarn.deploy.lock +++ b/packages/monitor-service/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -299,7 +299,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -350,15 +350,15 @@ __metadata: languageName: unknown linkType: soft -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -439,7 +439,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -687,8 +687,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -705,7 +705,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/price-oracle-sdk/yarn.deploy.lock b/packages/price-oracle-sdk/yarn.deploy.lock index 098d736bf..ed19379b0 100644 --- a/packages/price-oracle-sdk/yarn.deploy.lock +++ b/packages/price-oracle-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -215,8 +215,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -233,7 +233,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/rewards-oracle-sdk/yarn.deploy.lock b/packages/rewards-oracle-sdk/yarn.deploy.lock index ac839d59d..097af90f4 100644 --- a/packages/rewards-oracle-sdk/yarn.deploy.lock +++ b/packages/rewards-oracle-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -255,8 +255,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -273,7 +273,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/spl-utils/yarn.deploy.lock b/packages/spl-utils/yarn.deploy.lock index 2ea6741bf..f15ae81b0 100644 --- a/packages/spl-utils/yarn.deploy.lock +++ b/packages/spl-utils/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -297,8 +297,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -315,7 +315,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/sus/yarn.deploy.lock b/packages/sus/yarn.deploy.lock index 5b30e5fa1..74a9ed88f 100644 --- a/packages/sus/yarn.deploy.lock +++ b/packages/sus/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -240,8 +240,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -258,7 +258,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard @@ -410,13 +410,13 @@ __metadata: linkType: hard "axios@npm:^1.6.5": - version: 1.6.5 - resolution: "axios@npm:1.6.5" + version: 1.6.8 + resolution: "axios@npm:1.6.8" dependencies: - follow-redirects: ^1.15.4 + follow-redirects: ^1.15.6 form-data: ^4.0.0 proxy-from-env: ^1.1.0 - checksum: e28d67b2d9134cb4608c44d8068b0678cfdccc652742e619006f27264a30c7aba13b2cd19c6f1f52ae195b5232734925928fb192d5c85feea7edd2f273df206d + checksum: bf007fa4b207d102459300698620b3b0873503c6d47bf5a8f6e43c0c64c90035a4f698b55027ca1958f61ab43723df2781c38a99711848d232cad7accbcdfcdd languageName: node linkType: hard @@ -857,13 +857,13 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.15.4": - version: 1.15.5 - resolution: "follow-redirects@npm:1.15.5" +"follow-redirects@npm:^1.15.6": + version: 1.15.6 + resolution: "follow-redirects@npm:1.15.6" peerDependenciesMeta: debug: optional: true - checksum: 5ca49b5ce6f44338cbfc3546823357e7a70813cecc9b7b768158a1d32c1e62e7407c944402a918ea8c38ae2e78266312d617dc68783fac502cbb55e1047b34ec + checksum: a62c378dfc8c00f60b9c80cab158ba54e99ba0239a5dd7c81245e5a5b39d10f0c35e249c3379eae719ff0285fff88c365dd446fab19dee771f1d76252df1bbf5 languageName: node linkType: hard diff --git a/packages/tokens-to-rent-service/yarn.deploy.lock b/packages/tokens-to-rent-service/yarn.deploy.lock index 487588bbb..b31f1be1f 100644 --- a/packages/tokens-to-rent-service/yarn.deploy.lock +++ b/packages/tokens-to-rent-service/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -406,8 +406,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -424,7 +424,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/treasury-management-sdk/yarn.deploy.lock b/packages/treasury-management-sdk/yarn.deploy.lock index 8b3800dfc..775336d17 100644 --- a/packages/treasury-management-sdk/yarn.deploy.lock +++ b/packages/treasury-management-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -272,8 +272,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -290,7 +290,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/voter-stake-registry-hooks/package.json b/packages/voter-stake-registry-hooks/package.json index 891b92677..3bf59fbc0 100644 --- a/packages/voter-stake-registry-hooks/package.json +++ b/packages/voter-stake-registry-hooks/package.json @@ -38,7 +38,7 @@ "@helium/helium-react-hooks": "^0.7.6", "@helium/helium-sub-daos-sdk": "^0.7.6", "@helium/modular-governance-hooks": "^0.0.8", - "@helium/modular-governance-idls": "0.0.8-next.12+f1b0c8c", + "@helium/modular-governance-idls": "0.0.8-next.16+ace2c47", "@helium/spl-utils": "^0.7.6", "@helium/voter-stake-registry-sdk": "^0.7.6", "@solana/wallet-adapter-base": "^0.9.22", diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index c18f56178..1b205f0cb 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -5,7 +5,6 @@ import { delegatedPositionKey, } from "@helium/helium-sub-daos-sdk"; import { VoterStakeRegistry } from "@helium/idls/lib/types/voter_stake_registry"; -import { delegationKey } from "@helium/nft-delegation-sdk"; import { truthy } from "@helium/spl-utils"; import { Connection, PublicKey } from "@solana/web3.js"; import React, { @@ -18,11 +17,11 @@ import React, { } from "react"; import { useAsync } from "react-async-hook"; import { useDelegatedPositions } from "../hooks/useDelegatedPositions"; -import { useDelegations } from "../hooks/useDelegations"; +import { useProxies } from "../hooks/useProxies"; import { usePositions } from "../hooks/usePositions"; import { useRegistrar } from "../hooks/useRegistrar"; -import { init as initNftDelegation } from "@helium/nft-delegation-sdk"; -import { DelegationV0, PositionWithMeta } from "../sdk/types"; +import { init as initNftProxy } from "@helium/nft-proxy-sdk"; +import { ProxyV0, PositionWithMeta } from "../sdk/types"; import { calcPositionVotingPower } from "../utils/calcPositionVotingPower"; import { GetPositionsArgs as GetPosArgs, @@ -38,7 +37,7 @@ type Registrar = IdlAccounts["registrar"]; export interface HeliumVsrState { amountLocked?: BN; - amountVotingDelegationLocked?: BN; + amountProxyLocked?: BN; loading: boolean; mint?: PublicKey; positions?: PositionWithMeta[]; @@ -110,11 +109,11 @@ export const HeliumVsrStateProvider: React.FC<{ }); } else { const program = await init(provider as any); - const nftDelegationProgram = await initNftDelegation(provider as any); + const nftProxyProgram = await initNftProxy(provider as any); new VoteService({ registrar: registrarKey, program, - nftDelegationProgram, + nftProxyProgram, }); } } @@ -149,13 +148,13 @@ export const HeliumVsrStateProvider: React.FC<{ const { accounts: delegatedAccounts, loading: loadingDel } = useDelegatedPositions(delegatedPositionKeys); - const votingDelegationAccounts = result?.delegations; - const votingDelegationAccountsByAsset = useMemo(() => { - return votingDelegationAccounts?.reduce((acc, del) => { + const proxyAccounts = result?.proxies; + const proxyAccountsByAsset = useMemo(() => { + return proxyAccounts?.reduce((acc, del) => { acc[del.asset.toBase58()] = del; return acc - }, {} as Record) - }, [votingDelegationAccounts]) + }, {} as Record) + }, [proxyAccounts]) const myOwnedPositionsEndIdx = result?.positionKeys?.length; // Assume that my positions are a small amount, so we don't need to say they're static const { accounts: myPositions, loading: loadingMyPositions } = usePositions( @@ -163,7 +162,7 @@ export const HeliumVsrStateProvider: React.FC<{ ); // Delegated positions may be a lot, set to static const { accounts: delegatedPositions, loading: loadingDelPositions } = - usePositions(result?.votingDelegatedPositionKeys, true); + usePositions(result?.proxiedPositionKeys, true); const positions = useMemo( () => [...(myPositions || []), ...(delegatedPositions || [])], [myPositions, delegatedPositions] @@ -174,18 +173,18 @@ export const HeliumVsrStateProvider: React.FC<{ amountLocked, votingPower, positionsWithMeta, - amountVotingDelegationLocked, + amountProxyLocked, } = useMemo(() => { if (positions && registrar && delegatedAccounts && now) { let amountLocked = new BN(0); - let amountVotingDelegationLocked = new BN(0); + let amountProxyLocked = new BN(0); let votingPower = new BN(0); const mintCfgs = registrar?.votingMints; const positionsWithMeta = positions .map((position, idx) => { if (position && position.info) { const isDelegated = !!delegatedAccounts?.[idx]?.info; - const delegation = votingDelegationAccountsByAsset?.[position.info.mint.toBase58()]; + const proxy = proxyAccountsByAsset?.[position.info.mint.toBase58()]; const delegatedSubDao = isDelegated ? delegatedAccounts[idx]?.info?.subDao : null; @@ -201,9 +200,9 @@ export const HeliumVsrStateProvider: React.FC<{ unixNow: new BN(now), }); - const isVotingDelegatedToMe = idx >= (myOwnedPositionsEndIdx || 0); - if (isVotingDelegatedToMe) { - amountVotingDelegationLocked = amountVotingDelegationLocked.add( + const isProxiedToMe = idx >= (myOwnedPositionsEndIdx || 0); + if (isProxiedToMe) { + amountProxyLocked = amountProxyLocked.add( position.info.amountDepositedNative ); } else { @@ -223,8 +222,8 @@ export const HeliumVsrStateProvider: React.FC<{ hasGenesisMultiplier: position.info.genesisEnd.gt(new BN(now)), votingPower: posVotingPower, votingMint: mintCfgs[position.info.votingMintConfigIdx], - isVotingDelegatedToMe, - votingDelegation: delegation, + isProxiedToMe, + proxy, } as PositionWithMeta; } }) @@ -234,7 +233,7 @@ export const HeliumVsrStateProvider: React.FC<{ positionsWithMeta, amountLocked, votingPower, - amountVotingDelegationLocked, + amountProxyLocked, }; } @@ -244,7 +243,7 @@ export const HeliumVsrStateProvider: React.FC<{ positions, registrar, delegatedAccounts, - votingDelegationAccounts, + proxyAccounts, ]); const sortedPositions = useMemo( @@ -267,7 +266,7 @@ export const HeliumVsrStateProvider: React.FC<{ loading: loading || loadingPositions || loadingDel, error, amountLocked, - amountVotingDelegationLocked, + amountProxyLocked, mint, positions: sortedPositions, provider, @@ -287,7 +286,7 @@ export const HeliumVsrStateProvider: React.FC<{ loading, error, amountLocked, - amountVotingDelegationLocked, + amountProxyLocked, mint, sortedPositions, provider, diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts similarity index 57% rename from packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts rename to packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts index eee791c89..6bebdcb47 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatePositions.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts @@ -1,6 +1,10 @@ import { Program } from "@coral-xyz/anchor"; -import { PROGRAM_ID, init } from "@helium/nft-delegation-sdk"; -import { batchParallelInstructions, sendInstructions } from "@helium/spl-utils"; +import { PROGRAM_ID, init } from "@helium/nft-proxy-sdk"; +import { + Status, + batchParallelInstructions, + sendInstructions, +} from "@helium/spl-utils"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; @@ -15,39 +19,47 @@ export const useVotingDelegatePositions = () => { recipient, programId = PROGRAM_ID, expirationTime, + onInstructions, + onProgress, + maxSignatureBatch, }: { positions: PositionWithMeta[]; recipient: PublicKey; programId?: PublicKey; expirationTime: BN; + onInstructions?: ( + instructions: TransactionInstruction[] + ) => Promise; + onProgress?: (status: Status) => void; + maxSignatureBatch?: number; }) => { const isInvalid = !provider; const idl = await Program.fetchIdl(programId, provider); - const nftDelegationProgram = await init(provider as any, programId, idl); + const nftProxyProgram = await init(provider as any, programId, idl); if (loading) return; - if (isInvalid || !nftDelegationProgram || !registrar) { + if (isInvalid || !nftProxyProgram || !registrar) { throw new Error("Unable to voting delegate, Invalid params"); } else { const instructions: TransactionInstruction[] = []; for (const position of positions) { const { instruction, - pubkeys: { nextDelegation }, - } = await nftDelegationProgram.methods - .delegateV0({ + pubkeys: { nextProxy }, + } = await nftProxyProgram.methods + .assignProxyV0({ expirationTime, }) .accounts({ asset: position.mint, recipient, - delegationConfig: registrar.delegationConfig, + proxyConfig: registrar.proxyConfig, }) .prepare(); - // Don't delegate where there's already a delegation. - if (await provider.connection.getAccountInfo(nextDelegation!)) { + // Don't delegate where there's already a proxy. + if (await provider.connection.getAccountInfo(nextProxy!)) { throw new Error( "Recipient wallet is already a proxy to this position" ); @@ -56,7 +68,19 @@ export const useVotingDelegatePositions = () => { } } - await batchParallelInstructions({ provider, instructions }); + if (onInstructions) { + await onInstructions(instructions); + } else { + await batchParallelInstructions({ + provider, + instructions, + onProgress, + triesRemaining: 10, + extraSigners: [], + maxSignatureBatch, + }); + } + // Wait a couple seconds for changes to hit pg-sink setTimeout(refetch, 2 * 1000); } @@ -66,6 +90,6 @@ export const useVotingDelegatePositions = () => { return { error, loading, - votingDelegatePositions: execute, + proxiedPositions: execute, }; }; diff --git a/packages/voter-stake-registry-hooks/src/hooks/useDelegations.ts b/packages/voter-stake-registry-hooks/src/hooks/useProxies.ts similarity index 53% rename from packages/voter-stake-registry-hooks/src/hooks/useDelegations.ts rename to packages/voter-stake-registry-hooks/src/hooks/useProxies.ts index f76c1ebc5..9dc83e3e7 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useDelegations.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useProxies.ts @@ -1,14 +1,14 @@ import { useAnchorAccounts } from "@helium/helium-react-hooks"; -import { NftDelegation } from "@helium/modular-governance-idls/lib/types/nft_delegation"; +import { NftProxy } from "@helium/modular-governance-idls/lib/types/nft_proxy"; import { PublicKey } from "@solana/web3.js"; -export const useDelegations = ( +export const useProxies = ( delegationKeys: PublicKey[] | undefined, isStatic: boolean = false ) => { - return useAnchorAccounts( + return useAnchorAccounts( delegationKeys, - "delegationV0", + "proxyV0", isStatic ); }; diff --git a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts index 274c404db..3fd1f6ff7 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts @@ -27,9 +27,9 @@ export const useRelinquishVote = (proposal: PublicKey) => { const position = positions?.[index]; const earlierDelegateVoted = position && - position.votingDelegation && + position.proxy && m.info && - position.votingDelegation.index > m.info.delegationIndex; + position.proxy.index > m.info.proxyIndex; return !earlierDelegateVoted && m.info?.choices.includes(choice); }); }, @@ -65,17 +65,17 @@ export const useRelinquishVote = (proposal: PublicKey) => { const alreadyVotedThisChoice = marker?.choices.includes(choice); if (marker && alreadyVotedThisChoice) { - if (position.isVotingDelegatedToMe) { + if (position.isProxiedToMe) { if ( - marker.delegationIndex < - (position.votingDelegation?.index || 0) + marker.proxyIndex < + (position.proxy?.index || 0) ) { // Do not vote with a position that has been delegated to us, but voting overidden return; } return await vsrProgram.methods - .delegatedRelinquishVoteV0({ + .proxiedRelinquishVoteV0({ choice, }) .accounts({ diff --git a/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts new file mode 100644 index 000000000..0d4a9097e --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts @@ -0,0 +1,114 @@ +import { Program } from "@coral-xyz/anchor"; +import { PROGRAM_ID, proxyKey, init } from "@helium/nft-proxy-sdk"; +import { truthy, batchParallelInstructions, Status } from "@helium/spl-utils"; +import { PublicKey, TransactionInstruction } from "@solana/web3.js"; +import { useAsyncCallback } from "react-async-hook"; +import { useHeliumVsrState } from "../contexts/heliumVsrContext"; +import { PositionWithMeta } from "../sdk/types"; +import { MAX_TRANSACTIONS_PER_SIGNATURE_BATCH } from "../constants"; + +export const useUnassignProxies = () => { + const { provider, registrar, voteService, refetch } = useHeliumVsrState(); + const { error, loading, execute } = useAsyncCallback( + async ({ + positions, + programId = PROGRAM_ID, + onProgress, + onInstructions, + maxSignatureBatch = MAX_TRANSACTIONS_PER_SIGNATURE_BATCH, + }: { + positions: PositionWithMeta[]; + programId?: PublicKey; + onInstructions?: ( + instructions: TransactionInstruction[] + ) => Promise; + onProgress?: (status: Status) => void; + maxSignatureBatch?: number; + }) => { + const isInvalid = !provider; + + const idl = await Program.fetchIdl(programId, provider); + const nftProxyProgram = await init(provider as any, programId, idl); + + if (loading) return; + + if (isInvalid || !nftProxyProgram || !registrar || !voteService) { + throw new Error("Unable to unassign proxy, Invalid params"); + } else { + const instructions: TransactionInstruction[] = []; + for (const position of positions) { + let currentProxy = proxyKey( + registrar.proxyConfig, + position.mint, + provider.wallet.publicKey + )[0]; + let proxy = + await nftProxyProgram.account.proxyV0.fetchNullable( + currentProxy + ); + if (!proxy) { + currentProxy = proxyKey( + registrar.proxyConfig, + position.mint, + PublicKey.default + )[0]; + proxy = await nftProxyProgram.account.proxyV0.fetch( + currentProxy + ); + } + const toUndelegate = await voteService.getProxiesForWallet( + position.pubkey, + proxy.index + ); + + instructions.push( + ...( + await Promise.all( + toUndelegate.map((proxy, index) => { + // Can't undelegate the 1st one (Pubkey.default) + if (index == toUndelegate.length - 1) { + return Promise.resolve(undefined); + } + + const prevProxy = new PublicKey( + toUndelegate[index + 1].address + ); + return nftProxyProgram.methods + .unassignProxyV0() + .accounts({ + asset: position.mint, + prevProxy, + currentProxy, + proxy: new PublicKey(proxy.address), + }) + .instruction(); + }) + ) + ).filter(truthy) + ); + } + + if (onInstructions) { + await onInstructions(instructions); + } else { + await batchParallelInstructions({ + provider, + instructions, + onProgress, + triesRemaining: 10, + extraSigners: [], + maxSignatureBatch, + }); + } + // Wait a couple seconds for changes to hit pg-sink + setTimeout(refetch, 2 * 1000); + } + } + ); + + return { + error, + loading, + unassignProxies: execute, + }; +}; diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts index 0c574221e..138c86cf1 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts @@ -41,9 +41,9 @@ export const useVote = (proposalKey: PublicKey) => { const position = positions?.[index]; const earlierDelegateVoted = position && - position.votingDelegation && + position.proxy && m.info && - position.votingDelegation.index > m.info.delegationIndex; + position.proxy.index > m.info.proxyIndex; const noMarker = !m?.info; const maxChoicesReached = (m?.info?.choices.length || 0) >= (proposal?.maxChoicesPerVoter || 0); @@ -89,11 +89,11 @@ export const useVote = (proposalKey: PublicKey) => { (marker?.choices.length || 0) >= (proposal?.maxChoicesPerVoter || 0); if (!marker || (!alreadyVotedThisChoice && !maxChoicesReached)) { - if (position.isVotingDelegatedToMe) { + if (position.isProxiedToMe) { if ( marker && - (marker.delegationIndex < - (position.votingDelegation?.index || 0) || + (marker.proxyIndex < + (position.proxy?.index || 0) || marker.choices.includes(choice)) ) { // Do not vote with a position that has been delegated to us, but voting overidden @@ -102,7 +102,7 @@ export const useVote = (proposalKey: PublicKey) => { } return await vsrProgram.methods - .delegatedVoteV0({ + .proxiedVoteV0({ choice, }) .accounts({ diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts index 8a2eef0c4..3ce1ec108 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts @@ -7,7 +7,7 @@ import { calcPositionVotingPower } from "../utils/calcPositionVotingPower"; import { getRegistrarKey } from "@helium/voter-stake-registry-sdk"; import { useSolanaUnixNow } from "@helium/helium-react-hooks"; -export function useVotingDelegatedTo(wallet?: PublicKey): { +export function useProxiedTo(wallet?: PublicKey): { positions?: PositionWithMeta[]; votingPower?: BN; } { @@ -18,8 +18,8 @@ export function useVotingDelegatedTo(wallet?: PublicKey): { if (wallet) { return positions?.filter( (position) => - position.votingDelegation && - position.votingDelegation.nextOwner.equals(wallet) + position.proxy && + position.proxy.nextOwner.equals(wallet) ); } }, [positions]); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts deleted file mode 100644 index acb1c55ae..000000000 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingUndelegatePositions.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Program } from "@coral-xyz/anchor"; -import { PROGRAM_ID, delegationKey, init } from "@helium/nft-delegation-sdk"; -import { truthy, batchParallelInstructions } from "@helium/spl-utils"; -import { PublicKey, TransactionInstruction } from "@solana/web3.js"; -import { useAsyncCallback } from "react-async-hook"; -import { useHeliumVsrState } from "../contexts/heliumVsrContext"; -import { PositionWithMeta } from "../sdk/types"; - -export const useVotingUndelegatePositions = () => { - const { provider, registrar, voteService, refetch } = useHeliumVsrState(); - const { error, loading, execute } = useAsyncCallback( - async ({ - positions, - programId = PROGRAM_ID, - }: { - positions: PositionWithMeta[]; - programId?: PublicKey; - }) => { - const isInvalid = !provider; - - const idl = await Program.fetchIdl(programId, provider); - const nftDelegationProgram = await init(provider as any, programId, idl); - - if (loading) return; - - if (isInvalid || !nftDelegationProgram || !registrar || !voteService) { - throw new Error("Unable to voting delegate, Invalid params"); - } else { - const instructions: TransactionInstruction[] = []; - for (const position of positions) { - let currentDelegation = delegationKey( - registrar.delegationConfig, - position.mint, - provider.wallet.publicKey - )[0]; - let delegation = - await nftDelegationProgram.account.delegationV0.fetchNullable( - currentDelegation - ); - if (!delegation) { - currentDelegation = delegationKey( - registrar.delegationConfig, - position.mint, - PublicKey.default - )[0]; - delegation = await nftDelegationProgram.account.delegationV0.fetch( - currentDelegation - ); - } - const toUndelegate = await voteService.getDelegationsForWallet( - position.pubkey, - delegation.index - ); - - instructions.push( - ...( - await Promise.all( - toUndelegate.map((delegation, index) => { - // Can't undelegate the 1st one (Pubkey.default) - if (index == toUndelegate.length - 1) { - return Promise.resolve(undefined); - } - - const prevDelegation = new PublicKey( - toUndelegate[index + 1].address - ); - return nftDelegationProgram.methods - .undelegateV0() - .accounts({ - asset: position.mint, - prevDelegation, - currentDelegation, - delegation: new PublicKey(delegation.address), - }) - .instruction(); - }) - ) - ).filter(truthy) - ); - } - await batchParallelInstructions({ provider, instructions }); - // Wait a couple seconds for changes to hit pg-sink - setTimeout(refetch, 2 * 1000); - } - } - ); - - return { - error, - loading, - votingUndelegatePositions: execute, - }; -}; diff --git a/packages/voter-stake-registry-hooks/src/index.ts b/packages/voter-stake-registry-hooks/src/index.ts index 712814bd8..2283aa920 100644 --- a/packages/voter-stake-registry-hooks/src/index.ts +++ b/packages/voter-stake-registry-hooks/src/index.ts @@ -21,9 +21,9 @@ export { useRegistrar } from "./hooks/useRegistrar"; export { calcLockupMultiplier } from "./utils/calcLockupMultiplier"; export { calcPositionVotingPower } from "./utils/calcPositionVotingPower"; export * from "./sdk/types"; -export { useVotingDelegatePositions } from "./hooks/useVotingDelegatePositions"; -export { useVotingUndelegatePositions } from "./hooks/useVotingUndelegatePositions"; -export { useVotingDelegatedTo } from "./hooks/useVotingDelegatedTo" +export { useVotingDelegatePositions } from "./hooks/useAssignProxies"; +export { useUnassignProxies as useVotingUndelegatePositions } from "./hooks/useUnassignProxies"; +export { useProxies } from "./hooks/useProxies" export { getPositionKeys } from "./utils/getPositionKeys"; export { getSubDaos } from "./utils/getSubDaos"; export { useVoteMarkers } from "./hooks/useVoteMarkers"; diff --git a/packages/voter-stake-registry-hooks/src/sdk/types.ts b/packages/voter-stake-registry-hooks/src/sdk/types.ts index ad9f522e4..8a21aadba 100644 --- a/packages/voter-stake-registry-hooks/src/sdk/types.ts +++ b/packages/voter-stake-registry-hooks/src/sdk/types.ts @@ -1,7 +1,7 @@ import { BN, IdlAccounts, IdlTypes } from '@coral-xyz/anchor' import { HeliumSubDaos } from '@helium/idls/lib/types/helium_sub_daos' import { VoterStakeRegistry as HeliumVoterStakeRegistry } from '@helium/idls/lib/types/voter_stake_registry' -import { NftDelegation } from '@helium/modular-governance-idls/lib/types/nft_delegation' +import { NftProxy } from '@helium/modular-governance-idls/lib/types/nft_proxy' import { PublicKey } from '@solana/web3.js' export type VotingMintConfig = IdlTypes['VotingMintConfigV0'] @@ -9,26 +9,26 @@ type RegistrarV0 = IdlAccounts['registrar'] export type Lockup = IdlTypes['Lockup'] export type PositionV0 = IdlAccounts['positionV0'] export type DelegatedPositionV0 = IdlAccounts['delegatedPositionV0'] -export type DelegationV0 = - IdlAccounts["delegationV0"]; +export type ProxyV0 = + IdlAccounts["proxyV0"]; export interface Registrar extends RegistrarV0 { votingMints: VotingMintConfig[] } export interface Position extends Omit { lockup: Lockup } -export type Delegation = DelegationV0 & { address: PublicKey }; +export type Proxy = ProxyV0 & { address: PublicKey }; export interface PositionWithMeta extends Position { pubkey: PublicKey isDelegated: boolean // This position could by someone elses position, but was delegated to me - isVotingDelegatedToMe: boolean + isProxiedToMe: boolean delegatedSubDao: PublicKey | null hasRewards: boolean hasGenesisMultiplier: boolean votingPower: BN votingMint: VotingMintConfig - votingDelegation: Delegation | null + proxy: Proxy | null } export type LockupKind = IdlTypes['LockupKind'] /* export type InitializePositionV0Args = IdlTypes['InitializePositionArgsV0'] diff --git a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts index b531bca98..df84276e7 100644 --- a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts +++ b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts @@ -8,7 +8,7 @@ import { } from "@helium/voter-stake-registry-sdk"; import { PublicKey } from "@solana/web3.js"; import { BN } from "bn.js"; -import { Delegation, Registrar } from "../sdk/types"; +import { Proxy, Registrar } from "../sdk/types"; export interface GetPositionsArgs { wallet: PublicKey; @@ -20,10 +20,10 @@ export interface GetPositionsArgs { export const getPositionKeys = async ( args: GetPositionsArgs ): Promise<{ - votingDelegatedPositionKeys: PublicKey[]; + proxiedPositionKeys: PublicKey[]; positionKeys: PublicKey[]; nfts: Asset[]; - delegations: Delegation[]; + proxies: Proxy[]; }> => { const { mint, wallet, provider, voteService } = args; const connection = provider.connection; @@ -36,8 +36,8 @@ export const getPositionKeys = async ( registrarPk )) as Registrar; - const myDelegations = await voteService.getDelegationsForWallet(me); - const delegationPositions = myDelegations.map( + const myProxies = await voteService.getProxiesForWallet(me); + const delegationPositions = myProxies.map( (del) => positionKey(new PublicKey(del.asset))[0] ); let page = 1; @@ -74,14 +74,14 @@ export const getPositionKeys = async ( return { positionKeys, - votingDelegatedPositionKeys: delegationPositions, - delegations: myDelegations.map((d) => ({ + proxiedPositionKeys: delegationPositions, + proxies: myProxies.map((d) => ({ owner: new PublicKey(d.owner), nextOwner: new PublicKey(d.nextOwner), address: new PublicKey(d.address), asset: new PublicKey(d.asset), rentRefund: new PublicKey(d.rentRefund), - delegationConfig: new PublicKey(d.delegationConfig), + proxyConfig: new PublicKey(d.proxyConfig), index: d.index, bumpSeed: d.bumpSeed, expirationTime: new BN(d.expirationTime) diff --git a/packages/voter-stake-registry-hooks/yarn.deploy.lock b/packages/voter-stake-registry-hooks/yarn.deploy.lock index b84657f32..05526e8fc 100644 --- a/packages/voter-stake-registry-hooks/yarn.deploy.lock +++ b/packages/voter-stake-registry-hooks/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -275,17 +275,17 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/modular-governance-idls@npm:0.0.8-next.12" +"@helium/modular-governance-idls@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/modular-governance-idls@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@solana/web3.js": ^1.78.4 - checksum: 2b8fdb881af6fba5284357e08912f7a6df4c945a99efd89e2f80c792c1bc3fbf23ba61b5d091e0288b2c545d90de9ee51e27ac406b915b033dc1bb5e6ad51084 + checksum: 4b47ba247a3cd5e90971a99b034c6a0063e15406abeac9d879b63f14824049a3bfb18978486ca5b129f9efbef93d91474842ec1e3d73a7c109851b354a72dee4 languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -295,15 +295,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -380,7 +380,7 @@ __metadata: "@helium/helium-react-hooks": ^0.7.6 "@helium/helium-sub-daos-sdk": ^0.7.6 "@helium/modular-governance-hooks": ^0.0.8 - "@helium/modular-governance-idls": 0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@helium/voter-stake-registry-sdk": ^0.7.6 "@solana/wallet-adapter-base": ^0.9.22 @@ -405,7 +405,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -761,8 +761,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -779,7 +779,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/voter-stake-registry-sdk/package.json b/packages/voter-stake-registry-sdk/package.json index 513b1990d..db0006c16 100644 --- a/packages/voter-stake-registry-sdk/package.json +++ b/packages/voter-stake-registry-sdk/package.json @@ -34,7 +34,7 @@ "@coral-xyz/anchor": "^0.28.0", "@helium/anchor-resolvers": "^0.7.6", "@helium/idls": "^0.7.6", - "@helium/nft-delegation-sdk": "0.0.8-next.12+f1b0c8c", + "@helium/nft-proxy-sdk": "0.0.8-next.16+ace2c47", "@helium/spl-utils": "^0.7.6", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", diff --git a/packages/voter-stake-registry-sdk/src/index.ts b/packages/voter-stake-registry-sdk/src/index.ts index d6cd90136..423fd531b 100644 --- a/packages/voter-stake-registry-sdk/src/index.ts +++ b/packages/voter-stake-registry-sdk/src/index.ts @@ -10,7 +10,7 @@ export * from "./resolvers"; export { VoteService } from "./voteService"; export type { ProposalWithVotes, - Delegation, + Proxy as Delegation, Proxy, EnhancedProxy, EnhancedProxyData, diff --git a/packages/voter-stake-registry-sdk/src/resolvers.ts b/packages/voter-stake-registry-sdk/src/resolvers.ts index 433a9bcdf..515313743 100644 --- a/packages/voter-stake-registry-sdk/src/resolvers.ts +++ b/packages/voter-stake-registry-sdk/src/resolvers.ts @@ -9,14 +9,14 @@ import { getAccount } from "@solana/spl-token"; import { PublicKey } from "@solana/web3.js"; import { init } from "."; import { voterWeightRecordKey } from "./pdas"; -import { delegationKey, nftDelegationResolvers } from "@helium/nft-delegation-sdk"; +import { proxyKey, nftProxyResolvers } from "@helium/nft-proxy-sdk"; export * from "./constants"; export * from "./pdas"; export * from "./resolvers"; export const vsrResolvers = combineResolvers( - nftDelegationResolvers, + nftProxyResolvers, heliumCommonResolver, ataResolver({ instruction: "initializeRegistrarV0", @@ -113,7 +113,7 @@ export const vsrResolvers = combineResolvers( // @ts-ignore return provider.wallet.publicKey; } else if ( - path[path.length - 1] == "delegation" && + path[path.length - 1] == "proxy" && accounts.registrar && accounts.owner && accounts.mint @@ -122,8 +122,8 @@ export const vsrResolvers = combineResolvers( const registrar = await program.account.registrar.fetch( accounts.registrar as PublicKey ); - return delegationKey( - registrar.delegationConfig, + return proxyKey( + registrar.proxyConfig, accounts.mint as PublicKey, accounts.owner as PublicKey )[0]; diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index f63108933..3962951dd 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -1,22 +1,22 @@ import { Program } from "@coral-xyz/anchor"; import { VoterStakeRegistry } from "@helium/idls/lib/types/voter_stake_registry"; -import { NftDelegation } from "@helium/modular-governance-idls/lib/types/nft_delegation"; +import { NftProxy } from "@helium/modular-governance-idls/lib/types/nft_proxy"; import { PublicKey } from "@solana/web3.js"; import axios, { AxiosInstance } from "axios"; -export type Delegation = { +export type Proxy = { owner: string; nextOwner: string; index: number; address: string; asset: string; - delegationConfig: string; + proxyConfig: string; bumpSeed: number; rentRefund: string; expirationTime: string; }; -export type Proxy = { +export type ProxyDef = { name: string; image: string; wallet: string; @@ -62,7 +62,7 @@ export type ProposalWithVotes = Proposal & { export class VoteService { private client: AxiosInstance | undefined; private program: Program | undefined; - private nftDelegationProgram: Program | undefined; + private nftProxyProgram: Program | undefined; private registrar: PublicKey; // Wrapper arÍound vsr bulk operations that either uses @@ -71,18 +71,18 @@ export class VoteService { baseURL, program, registrar, - nftDelegationProgram, + nftProxyProgram, }: { registrar: PublicKey; baseURL?: string; program?: Program; - nftDelegationProgram?: Program; + nftProxyProgram?: Program; }) { if (baseURL) { this.client = axios.create({ baseURL: baseURL }); } this.program = program; - this.nftDelegationProgram = nftDelegationProgram; + this.nftProxyProgram = nftProxyProgram; this.registrar = registrar; } @@ -116,28 +116,28 @@ export class VoteService { } } - async getDelegationsForWallet( + async getProxiesForWallet( wallet: PublicKey, - minDelegationIndex: number = 0 - ): Promise { + minProxyIndex: number = 0 + ): Promise { if (this.client) { return ( - await this.client.get(`/delegations`, { + await this.client.get(`/proxies`, { params: { limit: 10000, owner: wallet.toBase58(), - minIndex: minDelegationIndex, + minIndex: minProxyIndex, }, }) ).data; } - if (this.nftDelegationProgram && this.program) { + if (this.nftProxyProgram && this.program) { const registrar = await this.program.account.registrar.fetch( this.registrar ); return ( - await this.nftDelegationProgram.account.delegationV0.all([ + await this.nftProxyProgram.account.proxyV0.all([ { memcmp: { offset: 8, @@ -147,7 +147,7 @@ export class VoteService { { memcmp: { offset: 8 + 32, - bytes: registrar.delegationConfig.toBase58(), + bytes: registrar.proxyConfig.toBase58(), }, }, ]) @@ -159,39 +159,39 @@ export class VoteService { index: a.account.index, address: a.publicKey.toBase58(), asset: a.account.asset.toBase58(), - delegationConfig: a.account.delegationConfig.toBase58(), + proxyConfig: a.account.proxyConfig.toBase58(), rentRefund: a.account.rentRefund.toBase58(), bumpSeed: a.account.bumpSeed, expirationTime: a.account.expirationTime.toString(), })); } else { - throw new Error("No nft delegation program or api url"); + throw new Error("No nft proxy program or api url"); } } - async getPositionDelegations( + async getPositionProxies( position: PublicKey, minIndex: number - ): Promise { + ): Promise { if (this.client) { return ( - await this.client.get(`/delegations`, { + await this.client.get(`/proxys`, { params: { limit: 10000, position, minIndex }, }) ).data; } - if (this.nftDelegationProgram && this.program) { + if (this.nftProxyProgram && this.program) { const registrar = await this.program.account.registrar.fetch( this.registrar ); const positionAcc = await this.program.account.positionV0.fetch(position); return ( - await this.nftDelegationProgram.account.delegationV0.all([ + await this.nftProxyProgram.account.proxyV0.all([ { memcmp: { offset: 8 + 32, - bytes: registrar.delegationConfig.toBase58(), + bytes: registrar.proxyConfig.toBase58(), }, }, { @@ -210,13 +210,13 @@ export class VoteService { index: a.account.index, address: a.publicKey.toBase58(), asset: a.account.asset.toBase58(), - delegationConfig: a.account.delegationConfig.toBase58(), + proxyConfig: a.account.proxyConfig.toBase58(), rentRefund: a.account.rentRefund.toBase58(), bumpSeed: a.account.bumpSeed, expirationTime: a.account.expirationTime.toString(), })); } else { - throw new Error("No nft delegation program or api url"); + throw new Error("No nft proxy program or api url"); } } diff --git a/packages/voter-stake-registry-sdk/yarn.deploy.lock b/packages/voter-stake-registry-sdk/yarn.deploy.lock index ebe0f5251..dcb6cf526 100644 --- a/packages/voter-stake-registry-sdk/yarn.deploy.lock +++ b/packages/voter-stake-registry-sdk/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -129,7 +129,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -139,15 +139,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -180,7 +180,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -398,8 +398,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -416,7 +416,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/vsr-metadata-service/yarn.deploy.lock b/packages/vsr-metadata-service/yarn.deploy.lock index 9b4c44e03..c37925f0e 100644 --- a/packages/vsr-metadata-service/yarn.deploy.lock +++ b/packages/vsr-metadata-service/yarn.deploy.lock @@ -15,11 +15,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -173,7 +173,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -183,15 +183,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -224,7 +224,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -469,8 +469,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -487,7 +487,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/packages/xnft-hotspot/yarn.deploy.lock b/packages/xnft-hotspot/yarn.deploy.lock index 5828c7a19..e18c4ab3c 100644 --- a/packages/xnft-hotspot/yarn.deploy.lock +++ b/packages/xnft-hotspot/yarn.deploy.lock @@ -43,11 +43,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -545,7 +545,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -555,15 +555,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -645,7 +645,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -2257,8 +2257,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -2275,7 +2275,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard diff --git a/programs/voter-stake-registry/Cargo.toml b/programs/voter-stake-registry/Cargo.toml index cfa644182..365af5e21 100644 --- a/programs/voter-stake-registry/Cargo.toml +++ b/programs/voter-stake-registry/Cargo.toml @@ -35,7 +35,7 @@ static_assertions = "1.1" mpl-token-metadata = { workspace = true } itertools = "0.10.2" proposal = { path = "../../utils/proposal" } -nft-delegation = { path = "../../utils/nft-delegation" } +nft-proxy = { path = "../../utils/nft-proxy" } shared-utils = { workspace = true } solana-security-txt = { workspace = true } default-env = { workspace = true } diff --git a/programs/voter-stake-registry/src/instructions/initialize_registrar_v0.rs b/programs/voter-stake-registry/src/instructions/initialize_registrar_v0.rs index b679af732..a83bd1fd1 100644 --- a/programs/voter-stake-registry/src/instructions/initialize_registrar_v0.rs +++ b/programs/voter-stake-registry/src/instructions/initialize_registrar_v0.rs @@ -6,7 +6,7 @@ use anchor_spl::{ }; use mpl_token_metadata::types::CollectionDetails; use mpl_token_metadata::types::DataV2; -use nft_delegation::DelegationConfigV0; +use nft_proxy::ProxyConfigV0; use shared_utils::create_metadata_accounts_v3; use shared_utils::token_metadata::{ create_master_edition_v3, CreateMasterEditionV3, CreateMetadataAccountsV3, Metadata, @@ -86,7 +86,7 @@ pub struct InitializeRegistrarV0<'info> { pub associated_token_program: Program<'info, AssociatedToken>, pub system_program: Program<'info, System>, pub token_program: Program<'info, Token>, - pub delegation_config: Option>, + pub proxy_config: Option>, } impl<'info> InitializeRegistrarV0<'info> { @@ -190,9 +190,9 @@ pub fn handler(ctx: Context, args: InitializeRegistrarArg reserved1: [0; 4], reserved2: [0; 3], voting_mints: Vec::new(), - delegation_config: ctx + proxy_config: ctx .accounts - .delegation_config + .proxy_config .clone() .map(|k| k.key()) .unwrap_or_default(), diff --git a/programs/voter-stake-registry/src/instructions/mod.rs b/programs/voter-stake-registry/src/instructions/mod.rs index 004ab4837..a80e35698 100644 --- a/programs/voter-stake-registry/src/instructions/mod.rs +++ b/programs/voter-stake-registry/src/instructions/mod.rs @@ -1,11 +1,11 @@ pub use close_position_v0::*; pub use configure_voting_mint_v0::*; -pub use delegated_relinquish_vote_v0::*; -pub use delegated_vote_v0::*; pub use deposit_v0::*; pub use initialize_position_v0::*; pub use initialize_registrar_v0::*; pub use ledger_transfer_position_v0::*; +pub use proxied_relinquish_vote_v0::*; +pub use proxied_vote_v0::*; pub use relinquish_expired_vote_v0::*; pub use relinquish_vote_v1::*; pub use reset_lockup_v0::*; @@ -18,12 +18,12 @@ pub use withdraw_v0::*; pub mod close_position_v0; pub mod configure_voting_mint_v0; -pub mod delegated_relinquish_vote_v0; -pub mod delegated_vote_v0; pub mod deposit_v0; pub mod initialize_position_v0; pub mod initialize_registrar_v0; pub mod ledger_transfer_position_v0; +pub mod proxied_relinquish_vote_v0; +pub mod proxied_vote_v0; pub mod relinquish_expired_vote_v0; pub mod relinquish_vote_v1; pub mod reset_lockup_v0; diff --git a/programs/voter-stake-registry/src/instructions/delegated_relinquish_vote_v0.rs b/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs similarity index 84% rename from programs/voter-stake-registry/src/instructions/delegated_relinquish_vote_v0.rs rename to programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs index 6b0754ea6..bc2662661 100644 --- a/programs/voter-stake-registry/src/instructions/delegated_relinquish_vote_v0.rs +++ b/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs @@ -1,13 +1,13 @@ use crate::{error::VsrError, RelinquishVoteArgsV1}; use anchor_lang::prelude::*; use anchor_spl::token::Mint; -use nft_delegation::DelegationV0; +use nft_proxy::ProxyV0; use proposal::{ProposalConfigV0, ProposalV0}; use crate::{registrar_seeds, state::*}; #[derive(Accounts)] -pub struct DelegatedRelinquishVoteV0<'info> { +pub struct ProxiedRelinquishVoteV0<'info> { /// CHECK: has one on the marker gets this #[account(mut)] pub rent_refund: AccountInfo<'info>, @@ -24,12 +24,12 @@ pub struct DelegatedRelinquishVoteV0<'info> { pub owner: Signer<'info>, #[account( has_one = owner, - constraint = delegation.delegation_config == registrar.delegation_config, - constraint = delegation.expiration_time > Clock::get().unwrap().unix_timestamp, + constraint = proxy.proxy_config == registrar.proxy_config, + constraint = proxy.expiration_time > Clock::get().unwrap().unix_timestamp, // only the current or earlier delegates can change vote. - constraint = delegation.index <= marker.delegation_index + constraint = proxy.index <= marker.proxy_index )] - pub delegation: Box>, + pub proxy: Box>, #[account( mut, has_one = mint, @@ -62,9 +62,9 @@ pub struct DelegatedRelinquishVoteV0<'info> { pub system_program: Program<'info, System>, } -pub fn handler(ctx: Context, args: RelinquishVoteArgsV1) -> Result<()> { +pub fn handler(ctx: Context, args: RelinquishVoteArgsV1) -> Result<()> { let marker = &mut ctx.accounts.marker; - marker.delegation_index = ctx.accounts.delegation.index; + marker.proxy_index = ctx.accounts.proxy.index; marker.proposal = ctx.accounts.proposal.key(); marker.voter = ctx.accounts.owner.key(); ctx.accounts.position.num_active_votes -= 1; diff --git a/programs/voter-stake-registry/src/instructions/delegated_vote_v0.rs b/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs similarity index 84% rename from programs/voter-stake-registry/src/instructions/delegated_vote_v0.rs rename to programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs index 449d1863d..835d3f51c 100644 --- a/programs/voter-stake-registry/src/instructions/delegated_vote_v0.rs +++ b/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs @@ -1,13 +1,13 @@ use crate::{error::VsrError, VoteArgsV0}; use anchor_lang::prelude::*; use anchor_spl::token::Mint; -use nft_delegation::DelegationV0; +use nft_proxy::ProxyV0; use crate::{registrar_seeds, state::*}; use proposal::{ProposalConfigV0, ProposalV0}; #[derive(Accounts)] -pub struct DelegatedVoteV0<'info> { +pub struct ProxiedVoteV0<'info> { #[account(mut)] pub payer: Signer<'info>, #[account( @@ -29,12 +29,12 @@ pub struct DelegatedVoteV0<'info> { pub mint: Box>, #[account( has_one = owner, - constraint = delegation.delegation_config == registrar.delegation_config, - constraint = delegation.expiration_time > Clock::get().unwrap().unix_timestamp, - // only the current or earlier delegates can change vote. Or if proposal not set, this was an `init` for the marker - constraint = delegation.index <= marker.delegation_index || marker.proposal == Pubkey::default() + constraint = proxy.proxy_config == registrar.proxy_config, + constraint = proxy.expiration_time > Clock::get().unwrap().unix_timestamp, + // only the current or earlier proxies can change vote. Or if proposal not set, this was an `init` for the marker + constraint = proxy.index <= marker.proxy_index || marker.proposal == Pubkey::default() )] - pub delegation: Box>, + pub proxy: Box>, #[account( mut, has_one = proposal_config, @@ -60,7 +60,7 @@ pub struct DelegatedVoteV0<'info> { pub system_program: Program<'info, System>, } -pub fn handler(ctx: Context, args: VoteArgsV0) -> Result<()> { +pub fn handler(ctx: Context, args: VoteArgsV0) -> Result<()> { let marker = &mut ctx.accounts.marker; if marker.rent_refund == Pubkey::default() { marker.rent_refund = ctx.accounts.payer.key(); @@ -70,7 +70,7 @@ pub fn handler(ctx: Context, args: VoteArgsV0) -> Result<()> { marker.voter = ctx.accounts.owner.key(); marker.mint = ctx.accounts.mint.key(); marker.registrar = ctx.accounts.registrar.key(); - marker.delegation_index = ctx.accounts.delegation.index; + marker.proxy_index = ctx.accounts.proxy.index; // Don't allow voting for the same choice twice. require!( diff --git a/programs/voter-stake-registry/src/instructions/update_registrar_v0.rs b/programs/voter-stake-registry/src/instructions/update_registrar_v0.rs index 3b2862c24..bce75c205 100644 --- a/programs/voter-stake-registry/src/instructions/update_registrar_v0.rs +++ b/programs/voter-stake-registry/src/instructions/update_registrar_v0.rs @@ -1,6 +1,6 @@ use crate::state::*; use anchor_lang::prelude::*; -use nft_delegation::DelegationConfigV0; +use nft_proxy::ProxyConfigV0; #[derive(Accounts)] #[instruction()] @@ -12,13 +12,13 @@ pub struct UpdateRegistrarV0<'info> { pub registrar: Box>, /// CHECK: checked as signer pub realm_authority: Signer<'info>, - pub delegation_config: Option>, + pub proxy_config: Option>, } pub fn handler(ctx: Context) -> Result<()> { - ctx.accounts.registrar.delegation_config = ctx + ctx.accounts.registrar.proxy_config = ctx .accounts - .delegation_config + .proxy_config .clone() .map(|k| k.key()) .unwrap_or_default(); diff --git a/programs/voter-stake-registry/src/instructions/vote_v0.rs b/programs/voter-stake-registry/src/instructions/vote_v0.rs index 29b8f43b7..dee7ae527 100644 --- a/programs/voter-stake-registry/src/instructions/vote_v0.rs +++ b/programs/voter-stake-registry/src/instructions/vote_v0.rs @@ -72,7 +72,7 @@ pub fn handler(ctx: Context, args: VoteArgsV0) -> Result<()> { marker.voter = ctx.accounts.voter.key(); marker.mint = ctx.accounts.mint.key(); marker.registrar = ctx.accounts.registrar.key(); - marker.delegation_index = 0; + marker.proxy_index = 0; // Don't allow voting for the same choice twice. require!( diff --git a/programs/voter-stake-registry/src/lib.rs b/programs/voter-stake-registry/src/lib.rs index d188794de..237e778bd 100644 --- a/programs/voter-stake-registry/src/lib.rs +++ b/programs/voter-stake-registry/src/lib.rs @@ -114,15 +114,15 @@ pub mod voter_stake_registry { instructions::relinquish_expired_vote_v0::handler(ctx) } - pub fn delegated_relinquish_vote_v0( - ctx: Context, + pub fn proxied_relinquish_vote_v0( + ctx: Context, args: RelinquishVoteArgsV1, ) -> Result<()> { - instructions::delegated_relinquish_vote_v0::handler(ctx, args) + instructions::proxied_relinquish_vote_v0::handler(ctx, args) } - pub fn delegated_vote_v0(ctx: Context, args: VoteArgsV0) -> Result<()> { - instructions::delegated_vote_v0::handler(ctx, args) + pub fn proxied_vote_v0(ctx: Context, args: VoteArgsV0) -> Result<()> { + instructions::proxied_vote_v0::handler(ctx, args) } pub fn update_registrar_v0(ctx: Context) -> Result<()> { diff --git a/programs/voter-stake-registry/src/state/marker.rs b/programs/voter-stake-registry/src/state/marker.rs index 0ae6d0a59..ab3749eaa 100644 --- a/programs/voter-stake-registry/src/state/marker.rs +++ b/programs/voter-stake-registry/src/state/marker.rs @@ -14,7 +14,7 @@ pub struct VoteMarkerV0 { pub relinquished: bool, // Keep track of which delegation index voted on this marker, // earlier delegators can override - pub delegation_index: u16, + pub proxy_index: u16, // Ensure the refund goes to whoever paid to create the marker when closing pub rent_refund: Pubkey, } diff --git a/programs/voter-stake-registry/src/state/registrar.rs b/programs/voter-stake-registry/src/state/registrar.rs index fc41b67e4..91fcfbb4e 100644 --- a/programs/voter-stake-registry/src/state/registrar.rs +++ b/programs/voter-stake-registry/src/state/registrar.rs @@ -22,7 +22,7 @@ pub struct Registrar { // Empty bytes for future upgrades. pub reserved1: [u8; 4], pub reserved2: [u64; 3], // split because `Default` does not support [u8; 60] - pub delegation_config: Pubkey, + pub proxy_config: Pubkey, pub voting_mints: Vec, } diff --git a/tests/utils/vsr.ts b/tests/utils/vsr.ts index 4a7b17144..5b5651c46 100644 --- a/tests/utils/vsr.ts +++ b/tests/utils/vsr.ts @@ -61,7 +61,7 @@ export async function initVsr( .accounts({ realm: realmPk, realmGoverningTokenMint: hntMint, - delegationConfig: null + proxyConfig: null }); instructions.push(await createRegistrar.instruction()); const registrar = (await createRegistrar.pubkeys()).registrar as PublicKey; diff --git a/tests/voter-stake-registry.ts b/tests/voter-stake-registry.ts index 8280ee276..3c620a6dd 100644 --- a/tests/voter-stake-registry.ts +++ b/tests/voter-stake-registry.ts @@ -40,10 +40,10 @@ import { random } from "./utils/string"; import { SPL_GOVERNANCE_PID } from "./utils/vsr"; import { PROGRAM_ID as DEL_PID, - init as initNftDelegation, + init as initNftProxy, delegationKey, -} from "@helium/nft-delegation-sdk"; -import { NftDelegation } from "@helium/modular-governance-idls/lib/types/nft_delegation"; +} from "@helium/nft-proxy-sdk"; +import { NftProxy } from "@helium/modular-governance-idls/lib/types/nft_proxy"; import { ensureVSRIdl } from "./utils/fixtures"; chai.use(chaiAsPromised); @@ -61,13 +61,13 @@ describe("voter-stake-registry", () => { anchor.setProvider(anchor.AnchorProvider.local("http://127.0.0.1:8899")); let program: Program; - let delegateProgram: Program; + let proxyProgram: Program; let proposalProgram: Program; let registrar: PublicKey; let collection: PublicKey; let hntMint: PublicKey; let realm: PublicKey; - let delegationConfig: PublicKey | undefined; + let proxyConfig: PublicKey | undefined; let programVersion: number; let oneWeekFromNow: number; const provider = anchor.getProvider() as anchor.AnchorProvider; @@ -82,7 +82,7 @@ describe("voter-stake-registry", () => { ensureVSRIdl(program); // @ts-ignore proposalProgram = await initProposal(provider as any); - delegateProgram = await initNftDelegation(provider, DEL_PID); + proxyProgram = await initNftProxy(provider, DEL_PID); hntMint = await createMint(provider, 8, me, me); await createAtaAndMint(provider, hntMint, toBN(223_000_000, 8)); @@ -126,10 +126,10 @@ describe("voter-stake-registry", () => { ); ({ - pubkeys: { delegationConfig }, - } = await delegateProgram.methods - .initializeDelegationConfigV0({ - maxDelegationTime: new anchor.BN(1000000000000), + pubkeys: { proxyConfig }, + } = await proxyProgram.methods + .initializeProxyConfigV0({ + maxProxyTime: new anchor.BN(1000000000000), name: random(10), seasons: [new anchor.BN(new Date().valueOf() / 1000 + 100000)], }) @@ -148,7 +148,7 @@ describe("voter-stake-registry", () => { .accounts({ realm: realm, realmGoverningTokenMint: hntMint, - delegationConfig, + proxyConfig, }) .prepare(); registrar = rkey!; @@ -460,19 +460,19 @@ describe("voter-stake-registry", () => { }); }); - describe("with delegation", async () => { + describe("with proxy", async () => { let delegatee = Keypair.generate(); let position: PublicKey; let mint: PublicKey; beforeEach(async () => { ({ position, mint } = await createAndDeposit(10000, 200)); - await delegateProgram.methods + await proxyProgram.methods .delegateV0({ expirationTime: new anchor.BN(new Date().valueOf() / 1000 + 10000), }) .accounts({ - delegationConfig, + proxyConfig, asset: mint, recipient: delegatee.publicKey, }) @@ -483,7 +483,7 @@ describe("voter-stake-registry", () => { const { pubkeys: { marker }, } = await program.methods - .delegatedVoteV0({ + .proxiedVoteV0({ choice: 0, }) .accounts({ @@ -503,7 +503,7 @@ describe("voter-stake-registry", () => { expect(markerA?.choices).to.deep.eq([0]); await program.methods - .delegatedRelinquishVoteV0({ + .proxiedRelinquishVoteV0({ choice: 0, }) .accounts({ @@ -523,11 +523,11 @@ describe("voter-stake-registry", () => { expect(markerA).to.be.null; }); - it("allows earlier delegates to change the vote", async () => { + it("allows earlier proxies to change the vote", async () => { const { pubkeys: { marker }, } = await program.methods - .delegatedVoteV0({ + .proxiedVoteV0({ choice: 0, }) .accounts({ @@ -545,7 +545,7 @@ describe("voter-stake-registry", () => { marker! as PublicKey ); expect(markerA?.choices).to.deep.eq([0]); - expect(markerA?.delegationIndex).to.eq(1); + expect(markerA?.proxyIndex).to.eq(1); await program.methods .relinquishVoteV1({ @@ -582,13 +582,13 @@ describe("voter-stake-registry", () => { marker! as PublicKey ); expect(markerA?.choices).to.deep.eq([1]); - expect(markerA?.delegationIndex).to.eq(0); + expect(markerA?.proxyIndex).to.eq(0); }); it("allows the original owner to undelegate", async () => { - const toUndelegate = delegationKey(delegationConfig!, mint, delegatee.publicKey)[0]; - const myDelegation = delegationKey(delegationConfig!, mint, PublicKey.default)[0]; - await delegateProgram.methods + const toUndelegate = delegationKey(proxyConfig!, mint, delegatee.publicKey)[0]; + const myDelegation = delegationKey(proxyConfig!, mint, PublicKey.default)[0]; + await proxyProgram.methods .undelegateV0() .accounts({ delegation: toUndelegate, @@ -599,11 +599,11 @@ describe("voter-stake-registry", () => { expect( ( - await delegateProgram.account.delegationV0.fetch(myDelegation) + await proxyProgram.account.proxyV0.fetch(myDelegation) ).nextOwner.toBase58() ).to.eq(PublicKey.default.toBase58()); expect( - await delegateProgram.account.delegationV0.fetchNullable(toUndelegate) + await proxyProgram.account.proxyV0.fetchNullable(toUndelegate) ).to.be.null; }); }); diff --git a/utils/nft-delegation/Cargo.toml b/utils/nft-proxy/Cargo.toml similarity index 77% rename from utils/nft-delegation/Cargo.toml rename to utils/nft-proxy/Cargo.toml index 92a874a52..1da8a240c 100644 --- a/utils/nft-delegation/Cargo.toml +++ b/utils/nft-proxy/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "nft-delegation" +name = "nft-proxy" version = "0.0.2" -description = "Nft delegation cpi wrapper" +description = "Nft proxy cpi wrapper" edition = "2021" [lib] crate-type = ["cdylib", "lib"] -name = "nft_delegation" +name = "nft_proxy" [features] default = ["cpi"] diff --git a/utils/nft-delegation/idl.json b/utils/nft-proxy/idl.json similarity index 75% rename from utils/nft-delegation/idl.json rename to utils/nft-proxy/idl.json index 10cd87151..f7fd547b2 100644 --- a/utils/nft-delegation/idl.json +++ b/utils/nft-proxy/idl.json @@ -1,9 +1,9 @@ { "version": "0.0.1", - "name": "nft_delegation", + "name": "nft_proxy", "instructions": [ { - "name": "initializeDelegationConfigV0", + "name": "initializeProxyConfigV0", "accounts": [ { "name": "payer", @@ -16,7 +16,7 @@ "isSigner": false }, { - "name": "delegationConfig", + "name": "proxyConfig", "isMut": true, "isSigner": false, "pda": { @@ -24,12 +24,12 @@ { "kind": "const", "type": "string", - "value": "delegation_config" + "value": "proxy_config" }, { "kind": "arg", "type": { - "defined": "InitializeDelegationConfigArgsV0" + "defined": "InitializeProxyConfigArgsV0" }, "path": "args.name" } @@ -46,13 +46,13 @@ { "name": "args", "type": { - "defined": "InitializeDelegationConfigArgsV0" + "defined": "InitializeProxyConfigArgsV0" } } ] }, { - "name": "delegateV0", + "name": "assignProxyV0", "accounts": [ { "name": "payer", @@ -60,27 +60,35 @@ "isSigner": true }, { - "name": "mint", + "name": "asset", "isMut": false, "isSigner": false }, { - "name": "owner", + "name": "approver", "isMut": false, "isSigner": true }, + { + "name": "owner", + "isMut": false, + "isSigner": false, + "docs": [ + "or in the case of a primary proxy (first in the line), Pubkey::default" + ] + }, { "name": "tokenAccount", "isMut": false, "isSigner": false }, { - "name": "delegationConfig", + "name": "proxyConfig", "isMut": false, "isSigner": false }, { - "name": "currentDelegation", + "name": "currentProxy", "isMut": true, "isSigner": false, "pda": { @@ -88,19 +96,19 @@ { "kind": "const", "type": "string", - "value": "delegation" + "value": "proxy" }, { "kind": "account", "type": "publicKey", - "account": "DelegationConfigV0", - "path": "delegation_config" + "account": "ProxyConfigV0", + "path": "proxy_config" }, { "kind": "account", "type": "publicKey", "account": "Mint", - "path": "mint" + "path": "asset" }, { "kind": "account", @@ -116,7 +124,7 @@ "isSigner": false }, { - "name": "nextDelegation", + "name": "nextProxy", "isMut": true, "isSigner": false, "pda": { @@ -124,19 +132,19 @@ { "kind": "const", "type": "string", - "value": "delegation" + "value": "proxy" }, { "kind": "account", "type": "publicKey", - "account": "DelegationConfigV0", - "path": "delegation_config" + "account": "ProxyConfigV0", + "path": "proxy_config" }, { "kind": "account", "type": "publicKey", "account": "Mint", - "path": "mint" + "path": "asset" }, { "kind": "account", @@ -156,13 +164,13 @@ { "name": "args", "type": { - "defined": "DelegateArgsV0" + "defined": "AssignProxyArgsV0" } } ] }, { - "name": "undelegateV0", + "name": "unassignProxyV0", "accounts": [ { "name": "rentRefund", @@ -170,23 +178,41 @@ "isSigner": false }, { - "name": "owner", + "name": "asset", + "isMut": false, + "isSigner": false + }, + { + "name": "approver", "isMut": false, "isSigner": true }, { - "name": "currentDelegation", + "name": "owner", "isMut": false, "isSigner": false, - "relations": ["owner"] + "docs": [ + "or in the case of a primary proxy (first in the line), Pubkey::default" + ] + }, + { + "name": "tokenAccount", + "isMut": false, + "isSigner": false }, { - "name": "prevDelegation", + "name": "currentProxy", + "isMut": false, + "isSigner": false, + "relations": ["owner", "asset"] + }, + { + "name": "prevProxy", "isMut": true, "isSigner": false }, { - "name": "delegation", + "name": "proxy", "isMut": true, "isSigner": false, "relations": ["rent_refund"] @@ -202,7 +228,7 @@ ], "accounts": [ { - "name": "DelegationConfigV0", + "name": "ProxyConfigV0", "type": { "kind": "struct", "fields": [ @@ -215,7 +241,7 @@ "type": "string" }, { - "name": "maxDelegationTime", + "name": "maxProxyTime", "type": "i64" }, { @@ -228,7 +254,7 @@ } }, { - "name": "DelegationV0", + "name": "ProxyV0", "type": { "kind": "struct", "fields": [ @@ -237,7 +263,7 @@ "type": "publicKey" }, { - "name": "delegationConfig", + "name": "proxyConfig", "type": "publicKey" }, { @@ -270,7 +296,7 @@ ], "types": [ { - "name": "DelegateArgsV0", + "name": "AssignProxyArgsV0", "type": { "kind": "struct", "fields": [ @@ -282,7 +308,7 @@ } }, { - "name": "InitializeDelegationConfigArgsV0", + "name": "InitializeProxyConfigArgsV0", "type": { "kind": "struct", "fields": [ @@ -291,7 +317,7 @@ "type": "string" }, { - "name": "maxDelegationTime", + "name": "maxProxyTime", "type": "i64" }, { @@ -308,7 +334,7 @@ { "code": 6000, "name": "ExpirationExceedsMax", - "msg": "The specified expiration time exceeds the maximum allowed for this delegation configuration" + "msg": "The specified expiration time exceeds the maximum allowed for this proxy configuration" }, { "code": 6001, @@ -322,11 +348,8 @@ }, { "code": 6003, - "name": "ExpirationExceedsPreceedingDelegation", + "name": "ExpirationExceedsPreceedingProxy", "msg": "The specified expiration time exceeds the expiration of the existing delegatio" } - ], - "metadata": { - "address": "nde169MVKXLYbtDbrTF8wiJc8KYJRvLXKAzHApZ5vvD" - } + ] } diff --git a/utils/nft-delegation/src/lib.rs b/utils/nft-proxy/src/lib.rs similarity index 100% rename from utils/nft-delegation/src/lib.rs rename to utils/nft-proxy/src/lib.rs diff --git a/yarn.lock b/yarn.lock index ab762637c..f52986148 100644 --- a/yarn.lock +++ b/yarn.lock @@ -96,19 +96,28 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.4": - version: 7.24.1 - resolution: "@babel/runtime@npm:7.24.1" +"@babel/runtime@npm:^7.23.2": + version: 7.23.9 + resolution: "@babel/runtime@npm:7.23.9" dependencies: regenerator-runtime: ^0.14.0 - checksum: 5c8f3b912ba949865f03b3cf8395c60e1f4ebd1033fbd835bdfe81b6cac8a87d85bc3c7aded5fcdf07be044c9ab8c818f467abe0deca50020c72496782639572 + checksum: 6bbebe8d27c0c2dd275d1ac197fc1a6c00e18dab68cc7aaff0adc3195b45862bae9c4cc58975629004b0213955b2ed91e99eccb3d9b39cabea246c657323d667 + languageName: node + linkType: hard + +"@babel/runtime@npm:^7.23.4": + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard "@bufbuild/protobuf@npm:^1.7.2": - version: 1.7.2 - resolution: "@bufbuild/protobuf@npm:1.7.2" - checksum: f91e2574c97a64cceba04f7e697279fee621eb76cf5d049047184e3d08bd2c52d4a7e9afbe8560cfd49948bd61a24dc9013d6ca56fc10302e948de09afd7acff + version: 1.8.0 + resolution: "@bufbuild/protobuf@npm:1.8.0" + checksum: 148755fce3cc28891a42c35a375596a3817710e2e8f4a452f034ffd988bbec1c9154135865b0b846f5f56765c93eb88cacc2f42af053925fb14f09b6a2b8c295 languageName: node linkType: hard @@ -123,23 +132,23 @@ __metadata: linkType: hard "@connectrpc/connect-node@npm:^1.3.0": - version: 1.3.0 - resolution: "@connectrpc/connect-node@npm:1.3.0" + version: 1.4.0 + resolution: "@connectrpc/connect-node@npm:1.4.0" dependencies: - undici: ^5.28.2 + undici: ^5.28.3 peerDependencies: "@bufbuild/protobuf": ^1.4.2 - "@connectrpc/connect": 1.3.0 - checksum: 4e53cc5057b9a2fbd533e2209833881a0e27dc9079c3f56566eedf5667978436d9aaf1bb6d0509874d627dbd4491413eff8e5bad06c50ff049eed824a5a2e1e3 + "@connectrpc/connect": 1.4.0 + checksum: d13dc98d25e7321cce9969a009788874046ae9c0848922ecd2690dddc833b732fe756d486213fe0de55b1e4ae68024a45505d193ba0a927c6ec5b8a6d6a599e0 languageName: node linkType: hard "@connectrpc/connect@npm:^1.3.0": - version: 1.3.0 - resolution: "@connectrpc/connect@npm:1.3.0" + version: 1.4.0 + resolution: "@connectrpc/connect@npm:1.4.0" peerDependencies: "@bufbuild/protobuf": ^1.4.2 - checksum: a68bfffedd817a7db3563c00e5efc5eb510cc00a93c722d81fa1f52b71a96300d7175b0c0710a9d2ef2e8aaabee36921c90470a80343e7a9fbccffd3cc83f868 + checksum: 388145ea90b3216f133b34d96a47dfd0273dfa12c4b4963c7223cf45bdcbf8b3490ab234dda34fd42a7112ad9f51f22efc013f3183744a3f2ae65b825917b870 languageName: node linkType: hard @@ -430,9 +439,9 @@ __metadata: linkType: hard "@fastify/busboy@npm:^2.0.0": - version: 2.1.0 - resolution: "@fastify/busboy@npm:2.1.0" - checksum: 3233abd10f73e50668cb4bb278a79b7b3fadd30215ac6458299b0e5a09a29c3586ec07597aae6bd93f5cbedfcef43a8aeea51829cd28fc13850cdbcd324c28d5 + version: 2.1.1 + resolution: "@fastify/busboy@npm:2.1.1" + checksum: 42c32ef75e906c9a4809c1e1930a5ca6d4ddc8d138e1a8c8ba5ea07f997db32210617d23b2e4a85fe376316a41a1a0439fc6ff2dedf5126d96f45a9d80754fb2 languageName: node linkType: hard @@ -542,18 +551,18 @@ __metadata: linkType: hard "@grpc/grpc-js@npm:^1.10.1": - version: 1.10.1 - resolution: "@grpc/grpc-js@npm:1.10.1" + version: 1.10.6 + resolution: "@grpc/grpc-js@npm:1.10.6" dependencies: - "@grpc/proto-loader": ^0.7.8 - "@types/node": ">=12.12.47" - checksum: 5842c1c3ffcb630a1ee45998733861a16f8f6db4fe78f317f6be25ddf581040dc38e8c09aed7073dfae1a7099a3c83658ca8f3db77c0bc3b0e40625618245bd0 + "@grpc/proto-loader": ^0.7.10 + "@js-sdsl/ordered-map": ^4.4.2 + checksum: 343d70ee435d6b4b82c72160d31a4749ac2621938f58328dd71df3013377665128c890df60e057fde381b12b83d34f802d586f7feb61d079793d89adfc0f40e8 languageName: node linkType: hard -"@grpc/proto-loader@npm:^0.7.8": - version: 0.7.10 - resolution: "@grpc/proto-loader@npm:0.7.10" +"@grpc/proto-loader@npm:^0.7.10": + version: 0.7.12 + resolution: "@grpc/proto-loader@npm:0.7.12" dependencies: lodash.camelcase: ^4.3.0 long: ^5.0.0 @@ -561,7 +570,7 @@ __metadata: yargs: ^17.7.2 bin: proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 4987e23b57942c2363b6a6a106e63efae636666cefa348778dfafef2ff72da7343c8587667521cb1d52482827bcd001dd535bdc27065110af56d9c7c176334c9 + checksum: 5132b683b3f809417f46b421231ffa083d6300406d1276a12fc619d771b4f8e0e8ad5a935e0b381caaa9a57ef47630191dd2310b739d1be5aa90cc87b97fce0f languageName: node linkType: hard @@ -799,7 +808,7 @@ __metadata: "@helium/proposal-sdk": ^0.0.8 "@helium/rewards-oracle-sdk": ^0.7.6 "@helium/spl-utils": ^0.7.6 - "@helium/state-controller-sdk": 0.0.8-next.12+f1b0c8c + "@helium/state-controller-sdk": 0.0.8-next.16+ace2c47 "@helium/treasury-management-sdk": ^0.7.6 "@helium/voter-stake-registry-sdk": ^0.7.6 "@solana/spl-token": ^0.3.8 @@ -1028,7 +1037,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.7.6 "@helium/lazy-distributor-sdk": ^0.7.6 "@helium/mobile-entity-manager-sdk": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/price-oracle-sdk": ^0.7.6 "@helium/spl-utils": ^0.7.6 "@helium/treasury-management-sdk": ^0.7.6 @@ -1386,13 +1395,13 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/modular-governance-idls@npm:0.0.8-next.12" +"@helium/modular-governance-idls@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/modular-governance-idls@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@solana/web3.js": ^1.78.4 - checksum: 2b8fdb881af6fba5284357e08912f7a6df4c945a99efd89e2f80c792c1bc3fbf23ba61b5d091e0288b2c545d90de9ee51e27ac406b915b033dc1bb5e6ad51084 + checksum: 4b47ba247a3cd5e90971a99b034c6a0063e15406abeac9d879b63f14824049a3bfb18978486ca5b129f9efbef93d91474842ec1e3d73a7c109851b354a72dee4 languageName: node linkType: hard @@ -1406,7 +1415,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.12+f1b0c8c": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -1457,15 +1466,15 @@ __metadata: languageName: unknown linkType: soft -"@helium/nft-delegation-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/nft-delegation-sdk@npm:0.0.8-next.12" +"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 "@solana/spl-token": ^0.3.8 - checksum: 0c9b8fc24044f30b0e794db24b211c4b888670dcc6f988fc2144d5bc5d653f9f76f9b9b3f6be3091c3b730b7a83df7d1a8ab25211cac02da0e8b6528bef11c2b + checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 languageName: node linkType: hard @@ -1524,14 +1533,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/proposal-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/proposal-sdk@npm:0.0.8-next.12" +"@helium/proposal-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/proposal-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c - checksum: f79e0273a3f5c758de3ccacf8b56e55a3a821285aafb70bfad1692d07bf8a610353db297e6c96483dfb12b383e498697d633ca58dd879de23afc799a94e465c1 + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + checksum: a8a73e6df03fb95a7caa7ecd37bbc8518e0ff0fc625bddc4996824f777a274ef79ac71c1ec59600b3b5242900c8aab8c86d0eef9e0e2b3c68bd0fcb25baaf668 languageName: node linkType: hard @@ -1644,14 +1653,14 @@ __metadata: languageName: node linkType: hard -"@helium/state-controller-sdk@npm:0.0.8-next.12+f1b0c8c": - version: 0.0.8-next.12 - resolution: "@helium/state-controller-sdk@npm:0.0.8-next.12" +"@helium/state-controller-sdk@npm:0.0.8-next.16+ace2c47": + version: 0.0.8-next.16 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.16" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.12+f1b0c8c - checksum: 45edd457c3b57b8c3faa3074a986f2ff6cb433ef9a8c72ac76034f394715f08b7f8bf6d8f4990344a7a0b7825192850a4cf80896b996d06dd4bc9aa32a26b241 + "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + checksum: 2a7b703363f1078b428134e17f1805065e6fbcd9f7aca380c2e06b30c9e12928e1641985e1f4fdb86a17e7397dd8f0a84cbe06f4ffaae5d194900f03954ba842 languageName: node linkType: hard @@ -1738,7 +1747,7 @@ __metadata: "@helium/helium-react-hooks": ^0.7.6 "@helium/helium-sub-daos-sdk": ^0.7.6 "@helium/modular-governance-hooks": ^0.0.8 - "@helium/modular-governance-idls": 0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@helium/voter-stake-registry-sdk": ^0.7.6 "@solana/wallet-adapter-base": ^0.9.22 @@ -1763,7 +1772,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -1895,13 +1904,13 @@ __metadata: linkType: hard "@jridgewell/gen-mapping@npm:^0.3.2": - version: 0.3.5 - resolution: "@jridgewell/gen-mapping@npm:0.3.5" + version: 0.3.3 + resolution: "@jridgewell/gen-mapping@npm:0.3.3" dependencies: - "@jridgewell/set-array": ^1.2.1 + "@jridgewell/set-array": ^1.0.1 "@jridgewell/sourcemap-codec": ^1.4.10 - "@jridgewell/trace-mapping": ^0.3.24 - checksum: ff7a1764ebd76a5e129c8890aa3e2f46045109dabde62b0b6c6a250152227647178ff2069ea234753a690d8f3c4ac8b5e7b267bbee272bffb7f3b0a370ab6e52 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: 4a74944bd31f22354fc01c3da32e83c19e519e3bbadafa114f6da4522ea77dd0c2842607e923a591d60a76699d819a2fbb6f3552e277efdb9b58b081390b60ab languageName: node linkType: hard @@ -1919,10 +1928,10 @@ __metadata: languageName: node linkType: hard -"@jridgewell/set-array@npm:^1.2.1": - version: 1.2.1 - resolution: "@jridgewell/set-array@npm:1.2.1" - checksum: 832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 +"@jridgewell/set-array@npm:^1.0.1": + version: 1.1.2 + resolution: "@jridgewell/set-array@npm:1.1.2" + checksum: 69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e languageName: node linkType: hard @@ -1943,13 +1952,20 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.24": - version: 0.3.25 - resolution: "@jridgewell/trace-mapping@npm:0.3.25" +"@jridgewell/trace-mapping@npm:^0.3.9": + version: 0.3.22 + resolution: "@jridgewell/trace-mapping@npm:0.3.22" dependencies: "@jridgewell/resolve-uri": ^3.1.0 "@jridgewell/sourcemap-codec": ^1.4.14 - checksum: 9d3c40d225e139987b50c48988f8717a54a8c994d8a948ee42e1412e08988761d0754d7d10b803061cc3aebf35f92a5dbbab493bd0e1a9ef9e89a2130e83ba34 + checksum: ac7dd2cfe0b479aa1b81776d40d789243131cc792dc8b6b6a028c70fcd6171958ae1a71bf67b618ffe3c0c3feead9870c095ee46a5e30319410d92976b28f498 + languageName: node + linkType: hard + +"@js-sdsl/ordered-map@npm:^4.4.2": + version: 4.4.2 + resolution: "@js-sdsl/ordered-map@npm:4.4.2" + checksum: a927ae4ff8565ecb75355cc6886a4f8fadbf2af1268143c96c0cce3ba01261d241c3f4ba77f21f3f017a00f91dfe9e0673e95f830255945c80a0e96c6d30508a languageName: node linkType: hard @@ -2839,9 +2855,9 @@ __metadata: linkType: hard "@lukeed/ms@npm:^2.0.1": - version: 2.0.1 - resolution: "@lukeed/ms@npm:2.0.1" - checksum: c7b46933bf7bad3e024dcbbe2ad6201392b4ed2a05a717c0ef7e96a03fb885d44f08b4b749c392cc51c2736a6a45a08c77f1863ace1c072928fbfd9908a13db3 + version: 2.0.2 + resolution: "@lukeed/ms@npm:2.0.2" + checksum: 6ae47ed3ebc857ffc0283cfe46129947209c770d0974eb86626138b6c194a760d08863ec593ec75a645aec133b3237b37af500739b030293e4d9a81130f4e2ae languageName: node linkType: hard @@ -4749,9 +4765,9 @@ __metadata: linkType: hard "@rushstack/eslint-patch@npm:^1.1.3": - version: 1.8.0 - resolution: "@rushstack/eslint-patch@npm:1.8.0" - checksum: 25ba5f5dc8828f9a5499045b28d33c642e3db7cd32b3e5f4fbfa5cc6695c28b3967981d662cf37df4e945ba7f874df9bd559c9b2770a1e7d3b5b36afb45246c3 + version: 1.7.2 + resolution: "@rushstack/eslint-patch@npm:1.7.2" + checksum: 9c773e712cef97d4e9defbd80eb25430e727137acda45d5236c620da7b93d93ae00901f7e10e893f5a8445312f2a7ff74c241024109c066bffb423f5e3ed0b1c languageName: node linkType: hard @@ -5020,8 +5036,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.3 - resolution: "@solana/web3.js@npm:1.91.3" + version: 1.91.4 + resolution: "@solana/web3.js@npm:1.91.4" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -5038,7 +5054,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 5b251915057368d0615d6a6f0de7b4d4129c3d0643599551c0a342125601418634851b633a47d19da481973406f0f2928fa4bf1a2c57fb19914e69fd5b81c302 + checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe languageName: node linkType: hard @@ -5209,21 +5225,21 @@ __metadata: linkType: hard "@tanstack/react-virtual@npm:^3.0.0-beta.60": - version: 3.2.0 - resolution: "@tanstack/react-virtual@npm:3.2.0" + version: 3.0.4 + resolution: "@tanstack/react-virtual@npm:3.0.4" dependencies: - "@tanstack/virtual-core": 3.2.0 + "@tanstack/virtual-core": 3.0.0 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 09bf6db0f3dbfa2245c7d78ed425bb7c0e169cbe5024cc6bfc53005505a472b36a0b5506d6fa4b8a47c07296c5982b1ac49acd4f32c48547aef7556f9ed2ed1d + checksum: d01ea51d8a130c8f2cf87941d312a8d7929e19334bbe85a3ab125b935742cf58ee76d71f590cbd5c50b4fbdbbd6a7b8e58f7c0538c43aa4d5ccab20914246b28 languageName: node linkType: hard -"@tanstack/virtual-core@npm:3.2.0": - version: 3.2.0 - resolution: "@tanstack/virtual-core@npm:3.2.0" - checksum: 33ce09ba65852413251156e3e70ef3bd320e60f586b734b0ae36ff07259f99b5e4c1082e2ba7870364438a8be306ad9eed28a3c1b5e1d9022645c556bc4ff0c3 +"@tanstack/virtual-core@npm:3.0.0": + version: 3.0.0 + resolution: "@tanstack/virtual-core@npm:3.0.0" + checksum: 7283d50fc7b7a56608c37a8e94a93b85890ff7e39c6281633a19c4d6f6f4fbf25f8418f1eec302a008a8746a0d1d0cd00630137b55e6cf019818d68af8ed16b6 languageName: node linkType: hard @@ -5497,6 +5513,13 @@ __metadata: languageName: node linkType: hard +"@types/luxon@npm:~3.4.0": + version: 3.4.2 + resolution: "@types/luxon@npm:3.4.2" + checksum: 6f92d5bd02e89f310395753506bcd9cef3a56f5940f7a50db2a2b9822bce753553ac767d143cb5b4f9ed5ddd4a84e64f89ff538082ceb4d18739af7781b56925 + languageName: node + linkType: hard + "@types/mime@npm:*": version: 3.0.1 resolution: "@types/mime@npm:3.0.1" @@ -5546,15 +5569,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:>=12.12.47": - version: 20.11.21 - resolution: "@types/node@npm:20.11.21" - dependencies: - undici-types: ~5.26.4 - checksum: 6d32edc3ba61236d879ebb6aa8905602310a2dc6469113ed6e282d63c03b4b800bd17a10ae780e4ac2a92f1ad99ad44fe8aa14cac67f86389cb141a2477a2fee - languageName: node - linkType: hard - "@types/node@npm:^12.12.54": version: 12.20.55 resolution: "@types/node@npm:12.20.55" @@ -6303,16 +6317,15 @@ __metadata: linkType: hard "array-includes@npm:^3.1.6, array-includes@npm:^3.1.7": - version: 3.1.8 - resolution: "array-includes@npm:3.1.8" + version: 3.1.7 + resolution: "array-includes@npm:3.1.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-abstract: ^1.23.2 - es-object-atoms: ^1.0.0 - get-intrinsic: ^1.2.4 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 is-string: ^1.0.7 - checksum: eb39ba5530f64e4d8acab39297c11c1c5be2a4ea188ab2b34aba5fb7224d918f77717a9d57a3e2900caaa8440e59431bdaf5c974d5212ef65d97f132e38e2d91 + checksum: 06f9e4598fac12a919f7c59a3f04f010ea07f0b7f0585465ed12ef528a60e45f374e79d1bddbb34cdd4338357d00023ddbd0ac18b0be36964f5e726e8965d7fc languageName: node linkType: hard @@ -6323,31 +6336,29 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlast@npm:^1.2.4": - version: 1.2.5 - resolution: "array.prototype.findlast@npm:1.2.5" +"array.prototype.filter@npm:^1.0.3": + version: 1.0.3 + resolution: "array.prototype.filter@npm:1.0.3" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-abstract: ^1.23.2 - es-errors: ^1.3.0 - es-object-atoms: ^1.0.0 - es-shim-unscopables: ^1.0.2 - checksum: 83ce4ad95bae07f136d316f5a7c3a5b911ac3296c3476abe60225bc4a17938bf37541972fcc37dd5adbc99cbb9c928c70bbbfc1c1ce549d41a415144030bb446 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-array-method-boxes-properly: ^1.0.0 + is-string: ^1.0.7 + checksum: 5443cde6ad64596649e5751252b1b2f5242b41052980c2fb2506ba485e3ffd7607e8f6f2f1aefa0cb1cfb9b8623b2b2be103579cb367a161a3426400619b6e73 languageName: node linkType: hard "array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.5 - resolution: "array.prototype.findlastindex@npm:1.2.5" + version: 1.2.4 + resolution: "array.prototype.findlastindex@npm:1.2.4" dependencies: - call-bind: ^1.0.7 + call-bind: ^1.0.5 define-properties: ^1.2.1 - es-abstract: ^1.23.2 + es-abstract: ^1.22.3 es-errors: ^1.3.0 - es-object-atoms: ^1.0.0 es-shim-unscopables: ^1.0.2 - checksum: 2c81cff2a75deb95bf1ed89b6f5f2bfbfb882211e3b7cc59c3d6b87df774cd9d6b36949a8ae39ac476e092c1d4a4905f5ee11a86a456abb10f35f8211ae4e710 + checksum: cc8dce27a06dddf6d9c40a15d4c573f96ac5ca3583f89f8d8cd7d7ffdb96a71d819890a5bdb211f221bda8fafa0d97d1d8cbb5460a5cbec1fff57ae80b8abc31 languageName: node linkType: hard @@ -6363,7 +6374,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.flatmap@npm:^1.3.2": +"array.prototype.flatmap@npm:^1.3.1, array.prototype.flatmap@npm:^1.3.2": version: 1.3.2 resolution: "array.prototype.flatmap@npm:1.3.2" dependencies: @@ -6375,19 +6386,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.toreversed@npm:^1.1.2": - version: 1.1.2 - resolution: "array.prototype.toreversed@npm:1.1.2" - dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - es-shim-unscopables: ^1.0.0 - checksum: 58598193426282155297bedf950dc8d464624a0d81659822fb73124286688644cb7e0e4927a07f3ab2daaeb6617b647736cc3a5e6ca7ade5bb8e573b284e6240 - languageName: node - linkType: hard - -"array.prototype.tosorted@npm:^1.1.3": +"array.prototype.tosorted@npm:^1.1.1": version: 1.1.3 resolution: "array.prototype.tosorted@npm:1.1.3" dependencies: @@ -6470,6 +6469,15 @@ __metadata: languageName: node linkType: hard +"asynciterator.prototype@npm:^1.0.0": + version: 1.0.0 + resolution: "asynciterator.prototype@npm:1.0.0" + dependencies: + has-symbols: ^1.0.3 + checksum: e8ebfd9493ac651cf9b4165e9d64030b3da1d17181bb1963627b59e240cdaf021d9b59d44b827dc1dde4e22387ec04c2d0f8720cf58a1c282e34e40cc12721b3 + languageName: node + linkType: hard + "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -6492,11 +6500,11 @@ __metadata: linkType: hard "autoprefixer@npm:^10.4.12": - version: 10.4.19 - resolution: "autoprefixer@npm:10.4.19" + version: 10.4.17 + resolution: "autoprefixer@npm:10.4.17" dependencies: - browserslist: ^4.23.0 - caniuse-lite: ^1.0.30001599 + browserslist: ^4.22.2 + caniuse-lite: ^1.0.30001578 fraction.js: ^4.3.7 normalize-range: ^0.1.2 picocolors: ^1.0.0 @@ -6505,7 +6513,7 @@ __metadata: postcss: ^8.1.0 bin: autoprefixer: bin/autoprefixer - checksum: 3a4bc5bace05e057396dca2b306503efc175e90e8f2abf5472d3130b72da1d54d97c0ee05df21bf04fe66a7df93fd8c8ec0f1aca72a165f4701a02531abcbf11 + checksum: 1b4cf4097507f9dc48cef3194f18a05901311c881380cc634b308fce54a6554cf2dcd20aec8384b44e994d4665ab12c63dc89492523f8d74ff5d4d5eb1469f8c languageName: node linkType: hard @@ -6516,12 +6524,10 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.7": - version: 1.0.7 - resolution: "available-typed-arrays@npm:1.0.7" - dependencies: - possible-typed-array-names: ^1.0.0 - checksum: 1aa3ffbfe6578276996de660848b6e95669d9a95ad149e3dd0c0cda77db6ee1dbd9d1dd723b65b6d277b882dd0c4b91a654ae9d3cf9e1254b7e93e4908d78fd3 +"available-typed-arrays@npm:^1.0.6": + version: 1.0.6 + resolution: "available-typed-arrays@npm:1.0.6" + checksum: 8295571eb86447138adf64a0df0c08ae61250b17190bba30e1fae8c80a816077a6d028e5506f602c382c0197d3080bae131e92e331139d55460989580eeae659 languageName: node linkType: hard @@ -6619,13 +6625,13 @@ __metadata: linkType: hard "axios@npm:^1.6.5": - version: 1.6.5 - resolution: "axios@npm:1.6.5" + version: 1.6.8 + resolution: "axios@npm:1.6.8" dependencies: - follow-redirects: ^1.15.4 + follow-redirects: ^1.15.6 form-data: ^4.0.0 proxy-from-env: ^1.1.0 - checksum: e28d67b2d9134cb4608c44d8068b0678cfdccc652742e619006f27264a30c7aba13b2cd19c6f1f52ae195b5232734925928fb192d5c85feea7edd2f273df206d + checksum: bf007fa4b207d102459300698620b3b0873503c6d47bf5a8f6e43c0c64c90035a4f698b55027ca1958f61ab43723df2781c38a99711848d232cad7accbcdfcdd languageName: node linkType: hard @@ -6653,28 +6659,28 @@ __metadata: linkType: hard "bare-events@npm:^2.0.0, bare-events@npm:^2.2.0": - version: 2.2.2 - resolution: "bare-events@npm:2.2.2" - checksum: 154d3fc044cc171d3b85a89b768e626417b60c050123ac2ac10fc002152b4bdeb359ed1453ad54c0f1d05a7786f780d3b976af68e55c09fe4579d8466d3ff256 + version: 2.2.0 + resolution: "bare-events@npm:2.2.0" + checksum: b3001d61cbb7e6c91c7e47ed1d5701512f94c68955a88c1fe368ff313ba68f372fd701f422d1604fd6ac6e2237024d99373aa14e43a92696755a1f7ae46a8626 languageName: node linkType: hard "bare-fs@npm:^2.1.1": - version: 2.2.2 - resolution: "bare-fs@npm:2.2.2" + version: 2.1.5 + resolution: "bare-fs@npm:2.1.5" dependencies: bare-events: ^2.0.0 bare-os: ^2.0.0 bare-path: ^2.0.0 streamx: ^2.13.0 - checksum: 5b6d26690ee4de93b559f6a1187b6ff553224fe4faea5ef9cbd235b13e033ef96a598dc28eb10aad17d1f35baed24e14e18436534041913f905a0c50ed27713a + checksum: 268bc03dd97c2e039f3396d79993640a10bbb5ad30bc7a3a2d406ceb538333b0f79eab33f1db288bcf55fde52c767fa1f25332ac606c27555cc62951c236d346 languageName: node linkType: hard "bare-os@npm:^2.0.0, bare-os@npm:^2.1.0": - version: 2.2.1 - resolution: "bare-os@npm:2.2.1" - checksum: 7d870d8955531809253dfbceeda5b68e8396ef640166f8ff6c4c5e344f18a6bc9253f6d5e7d9ae2841426b66e9b7b1a39b2a102e6b23e1ddff26ad8a8981af81 + version: 2.2.0 + resolution: "bare-os@npm:2.2.0" + checksum: ed78e2f3ea498e35c7565532ae3aa3b85a7e5e223ab6353de64864823cadff02a2a8b7722e9a6c1a0ff56cb9f21f23ada8e88a085cc0a5d38a7c1bcf65e8f7fd languageName: node linkType: hard @@ -6915,7 +6921,7 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.23.0": +"browserslist@npm:^4.22.2": version: 4.23.0 resolution: "browserslist@npm:4.23.0" dependencies: @@ -7216,10 +7222,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001587, caniuse-lite@npm:^1.0.30001599": - version: 1.0.30001600 - resolution: "caniuse-lite@npm:1.0.30001600" - checksum: 1aae03be0e9f96163e88b9305531ef8db0e01f224aff545c61a32ce0b0ca323e22531bf680bacac3e34f98e23f71ac31a21b328fa0fcbbecea65a2c2638c70c4 +"caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001578, caniuse-lite@npm:^1.0.30001587": + version: 1.0.30001587 + resolution: "caniuse-lite@npm:1.0.30001587" + checksum: fb50aa9beaaae42f9feae92ce038f6ff71e97510f024ef1bef2666f3adcfd36d6c59e5675442e5fe795575193f71bc826cb7721d4b0f6d763e82d193bea57863 languageName: node linkType: hard @@ -7947,12 +7953,12 @@ __metadata: linkType: hard "cron@npm:^3.1.6": - version: 3.1.6 - resolution: "cron@npm:3.1.6" + version: 3.1.7 + resolution: "cron@npm:3.1.7" dependencies: - "@types/luxon": ~3.3.0 + "@types/luxon": ~3.4.0 luxon: ~3.4.0 - checksum: e97bb6f85acf3195577c609f28bbac2e22812d8632802752a13591882deceeeeefd2c91c1293fb5102ef442f96ae17ca687854fd0b005149aae9a25834363e1d + checksum: d98ee5297543c138221d96dd49270bf6576db80134e6041f4ce4a3c0cb6060863d76910209b34fee66fbf134461449ec3bd283d6a76d1c50da220cde7fc10c65 languageName: node linkType: hard @@ -8103,39 +8109,6 @@ __metadata: languageName: node linkType: hard -"data-view-buffer@npm:^1.0.1": - version: 1.0.1 - resolution: "data-view-buffer@npm:1.0.1" - dependencies: - call-bind: ^1.0.6 - es-errors: ^1.3.0 - is-data-view: ^1.0.1 - checksum: ce24348f3c6231223b216da92e7e6a57a12b4af81a23f27eff8feabdf06acfb16c00639c8b705ca4d167f761cfc756e27e5f065d0a1f840c10b907fdaf8b988c - languageName: node - linkType: hard - -"data-view-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "data-view-byte-length@npm:1.0.1" - dependencies: - call-bind: ^1.0.7 - es-errors: ^1.3.0 - is-data-view: ^1.0.1 - checksum: dbb3200edcb7c1ef0d68979834f81d64fd8cab2f7691b3a4c6b97e67f22182f3ec2c8602efd7b76997b55af6ff8bce485829c1feda4fa2165a6b71fb7baa4269 - languageName: node - linkType: hard - -"data-view-byte-offset@npm:^1.0.0": - version: 1.0.0 - resolution: "data-view-byte-offset@npm:1.0.0" - dependencies: - call-bind: ^1.0.6 - es-errors: ^1.3.0 - is-data-view: ^1.0.1 - checksum: 7f0bf8720b7414ca719eedf1846aeec392f2054d7af707c5dc9a753cc77eb8625f067fa901e0b5127e831f9da9056138d894b9c2be79c27a21f6db5824f009c2 - languageName: node - linkType: hard - "dateformat@npm:^3.0.0": version: 3.0.3 resolution: "dateformat@npm:3.0.3" @@ -8369,7 +8342,7 @@ __metadata: languageName: node linkType: hard -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.2": version: 1.1.4 resolution: "define-data-property@npm:1.1.4" dependencies: @@ -8480,20 +8453,13 @@ __metadata: languageName: node linkType: hard -"detect-libc@npm:^2.0.0": +"detect-libc@npm:^2.0.0, detect-libc@npm:^2.0.2": version: 2.0.2 resolution: "detect-libc@npm:2.0.2" checksum: 2b2cd3649b83d576f4be7cc37eb3b1815c79969c8b1a03a40a4d55d83bc74d010753485753448eacb98784abf22f7dbd3911fd3b60e29fda28fed2d1a997944d languageName: node linkType: hard -"detect-libc@npm:^2.0.2": - version: 2.0.3 - resolution: "detect-libc@npm:2.0.3" - checksum: 2ba6a939ae55f189aea996ac67afceb650413c7a34726ee92c40fb0deb2400d57ef94631a8a3f052055eea7efb0f99a9b5e6ce923415daa3e68221f963cfc27d - languageName: node - linkType: hard - "dezalgo@npm:^1.0.0, dezalgo@npm:^1.0.4": version: 1.0.4 resolution: "dezalgo@npm:1.0.4" @@ -8764,9 +8730,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.668": - version: 1.4.715 - resolution: "electron-to-chromium@npm:1.4.715" - checksum: b3ccbd571ecaa3b74b2c098b705416e15e36f9338f75fea062ba48397ac379972f915c29437286914d05ea9d3454b0fa74e9606becd6c221879c6fc139a09284 + version: 1.4.671 + resolution: "electron-to-chromium@npm:1.4.671" + checksum: a40461d15a9b5c0bc0f186bf781a97d4c1c58bea1ab95fd9e844a061de6b615bfa3e901a0522fc0e4629994f33c5bdfd33bc84495c94800f5f5f5082b9192062 languageName: node linkType: hard @@ -8881,21 +8847,17 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.2": - version: 1.23.2 - resolution: "es-abstract@npm:1.23.2" +"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.22.4": + version: 1.22.4 + resolution: "es-abstract@npm:1.22.4" dependencies: array-buffer-byte-length: ^1.0.1 arraybuffer.prototype.slice: ^1.0.3 - available-typed-arrays: ^1.0.7 + available-typed-arrays: ^1.0.6 call-bind: ^1.0.7 - data-view-buffer: ^1.0.1 - data-view-byte-length: ^1.0.1 - data-view-byte-offset: ^1.0.0 es-define-property: ^1.0.0 es-errors: ^1.3.0 - es-object-atoms: ^1.0.0 - es-set-tostringtag: ^2.0.3 + es-set-tostringtag: ^2.0.2 es-to-primitive: ^1.2.1 function.prototype.name: ^1.1.6 get-intrinsic: ^1.2.4 @@ -8903,16 +8865,15 @@ __metadata: globalthis: ^1.0.3 gopd: ^1.0.1 has-property-descriptors: ^1.0.2 - has-proto: ^1.0.3 + has-proto: ^1.0.1 has-symbols: ^1.0.3 - hasown: ^2.0.2 + hasown: ^2.0.1 internal-slot: ^1.0.7 is-array-buffer: ^3.0.4 is-callable: ^1.2.7 - is-data-view: ^1.0.1 - is-negative-zero: ^2.0.3 + is-negative-zero: ^2.0.2 is-regex: ^1.1.4 - is-shared-array-buffer: ^1.0.3 + is-shared-array-buffer: ^1.0.2 is-string: ^1.0.7 is-typed-array: ^1.1.13 is-weakref: ^1.0.2 @@ -8920,18 +8881,25 @@ __metadata: object-keys: ^1.1.1 object.assign: ^4.1.5 regexp.prototype.flags: ^1.5.2 - safe-array-concat: ^1.1.2 + safe-array-concat: ^1.1.0 safe-regex-test: ^1.0.3 - string.prototype.trim: ^1.2.9 - string.prototype.trimend: ^1.0.8 + string.prototype.trim: ^1.2.8 + string.prototype.trimend: ^1.0.7 string.prototype.trimstart: ^1.0.7 - typed-array-buffer: ^1.0.2 - typed-array-byte-length: ^1.0.1 - typed-array-byte-offset: ^1.0.2 - typed-array-length: ^1.0.5 + typed-array-buffer: ^1.0.1 + typed-array-byte-length: ^1.0.0 + typed-array-byte-offset: ^1.0.0 + typed-array-length: ^1.0.4 unbox-primitive: ^1.0.2 - which-typed-array: ^1.1.15 - checksum: cc6410cb58ba90e3f0f84d83297c372ca545017b94e50fd0020119e82b26f0dbf9885c72335f0063b93669393c505712c6fe82bef7ae4d3d29d770c0dbfb1340 + which-typed-array: ^1.1.14 + checksum: c254102395bd59315b713d72a1ce07980c0f71c9edcac6b036868740789ab5344020e940d6321fc1b31aecf6b27941fdd9655b602696e08f170986dd4d75ddc6 + languageName: node + linkType: hard + +"es-array-method-boxes-properly@npm:^1.0.0": + version: 1.0.0 + resolution: "es-array-method-boxes-properly@npm:1.0.0" + checksum: 2537fcd1cecf187083890bc6f5236d3a26bf39237433587e5bf63392e88faae929dbba78ff0120681a3f6f81c23fe3816122982c160d63b38c95c830b633b826 languageName: node linkType: hard @@ -8944,7 +8912,7 @@ __metadata: languageName: node linkType: hard -"es-errors@npm:^1.1.0, es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": +"es-errors@npm:^1.0.0, es-errors@npm:^1.1.0, es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": version: 1.3.0 resolution: "es-errors@npm:1.3.0" checksum: ec1414527a0ccacd7f15f4a3bc66e215f04f595ba23ca75cdae0927af099b5ec865f9f4d33e9d7e86f512f252876ac77d4281a7871531a50678132429b1271b5 @@ -8968,45 +8936,37 @@ __metadata: languageName: node linkType: hard -"es-iterator-helpers@npm:^1.0.15, es-iterator-helpers@npm:^1.0.17": - version: 1.0.18 - resolution: "es-iterator-helpers@npm:1.0.18" +"es-iterator-helpers@npm:^1.0.12, es-iterator-helpers@npm:^1.0.15": + version: 1.0.17 + resolution: "es-iterator-helpers@npm:1.0.17" dependencies: + asynciterator.prototype: ^1.0.0 call-bind: ^1.0.7 define-properties: ^1.2.1 - es-abstract: ^1.23.0 + es-abstract: ^1.22.4 es-errors: ^1.3.0 - es-set-tostringtag: ^2.0.3 + es-set-tostringtag: ^2.0.2 function-bind: ^1.1.2 get-intrinsic: ^1.2.4 globalthis: ^1.0.3 has-property-descriptors: ^1.0.2 - has-proto: ^1.0.3 + has-proto: ^1.0.1 has-symbols: ^1.0.3 internal-slot: ^1.0.7 iterator.prototype: ^1.1.2 - safe-array-concat: ^1.1.2 - checksum: 1594324ff3ca8890fe30c98b2419d3007d2b14b35f9773f188114408ff973e13c526f6045d88209e932f58dc0c55fc9a4ae1554636f8938ed7d926ffc27d3e1a + safe-array-concat: ^1.1.0 + checksum: f0962abbf120c37516c9008716fcaffeacf7bc6147a07e63cda3c3ac8be94b88e4ef8d71234c4b8873d1fc209f65c6d9e11a7faac78f59b5d3bcfa399affed7b languageName: node linkType: hard -"es-object-atoms@npm:^1.0.0": - version: 1.0.0 - resolution: "es-object-atoms@npm:1.0.0" - dependencies: - es-errors: ^1.3.0 - checksum: 26f0ff78ab93b63394e8403c353842b2272836968de4eafe97656adfb8a7c84b9099bf0fe96ed58f4a4cddc860f6e34c77f91649a58a5daa4a9c40b902744e3c - languageName: node - linkType: hard - -"es-set-tostringtag@npm:^2.0.3": - version: 2.0.3 - resolution: "es-set-tostringtag@npm:2.0.3" +"es-set-tostringtag@npm:^2.0.2": + version: 2.0.2 + resolution: "es-set-tostringtag@npm:2.0.2" dependencies: - get-intrinsic: ^1.2.4 - has-tostringtag: ^1.0.2 - hasown: ^2.0.1 - checksum: 7227fa48a41c0ce83e0377b11130d324ac797390688135b8da5c28994c0165be8b252e15cd1de41e1325e5a5412511586960213e88f9ab4a5e7d028895db5129 + get-intrinsic: ^1.2.2 + has-tostringtag: ^1.0.0 + hasown: ^2.0.0 + checksum: afcec3a4c9890ae14d7ec606204858441c801ff84f312538e1d1ccf1e5493c8b17bd672235df785f803756472cb4f2d49b87bde5237aef33411e74c22f194e07 languageName: node linkType: hard @@ -9356,14 +9316,14 @@ __metadata: linkType: hard "eslint-module-utils@npm:^2.8.0": - version: 2.8.1 - resolution: "eslint-module-utils@npm:2.8.1" + version: 2.8.0 + resolution: "eslint-module-utils@npm:2.8.0" dependencies: debug: ^3.2.7 peerDependenciesMeta: eslint: optional: true - checksum: 3cecd99b6baf45ffc269167da0f95dcb75e5aa67b93d73a3bab63e2a7eedd9cdd6f188eed048e2f57c1b77db82c9cbf2adac20b512fa70e597d863dd3720170d + checksum: 74c6dfea7641ebcfe174be61168541a11a14aa8d72e515f5f09af55cd0d0862686104b0524aa4b8e0ce66418a44aa38a94d2588743db5fd07a6b49ffd16921d2 languageName: node linkType: hard @@ -9430,30 +9390,28 @@ __metadata: linkType: hard "eslint-plugin-react@npm:^7.31.7": - version: 7.34.1 - resolution: "eslint-plugin-react@npm:7.34.1" + version: 7.33.2 + resolution: "eslint-plugin-react@npm:7.33.2" dependencies: - array-includes: ^3.1.7 - array.prototype.findlast: ^1.2.4 - array.prototype.flatmap: ^1.3.2 - array.prototype.toreversed: ^1.1.2 - array.prototype.tosorted: ^1.1.3 + array-includes: ^3.1.6 + array.prototype.flatmap: ^1.3.1 + array.prototype.tosorted: ^1.1.1 doctrine: ^2.1.0 - es-iterator-helpers: ^1.0.17 + es-iterator-helpers: ^1.0.12 estraverse: ^5.3.0 jsx-ast-utils: ^2.4.1 || ^3.0.0 minimatch: ^3.1.2 - object.entries: ^1.1.7 - object.fromentries: ^2.0.7 - object.hasown: ^1.1.3 - object.values: ^1.1.7 + object.entries: ^1.1.6 + object.fromentries: ^2.0.6 + object.hasown: ^1.1.2 + object.values: ^1.1.6 prop-types: ^15.8.1 - resolve: ^2.0.0-next.5 + resolve: ^2.0.0-next.4 semver: ^6.3.1 - string.prototype.matchall: ^4.0.10 + string.prototype.matchall: ^4.0.8 peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 82f391c5a093235c3bc2f664c54e009c49460778ee7d1b86c1536df9ac4d2a80d1dedc9241ac797df4a9dced936e955d9c89042fb3ac8d017b5359d1320d3c0f + checksum: b4c3d76390b0ae6b6f9fed78170604cc2c04b48e6778a637db339e8e3911ec9ef22510b0ae77c429698151d0f1b245f282177f384105b6830e7b29b9c9b26610 languageName: node linkType: hard @@ -10139,9 +10097,9 @@ __metadata: linkType: hard "flatted@npm:^3.2.9": - version: 3.3.1 - resolution: "flatted@npm:3.3.1" - checksum: 85ae7181650bb728c221e7644cbc9f4bf28bc556f2fc89bb21266962bdf0ce1029cc7acc44bb646cd469d9baac7c317f64e841c4c4c00516afa97320cdac7f94 + version: 3.2.9 + resolution: "flatted@npm:3.2.9" + checksum: f14167fbe26a9d20f6fca8d998e8f1f41df72c8e81f9f2c9d61ed2bea058248f5e1cbd05e7f88c0e5087a6a0b822a1e5e2b446e879f3cfbe0b07ba2d7f80b026 languageName: node linkType: hard @@ -10169,13 +10127,13 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.15.4": - version: 1.15.5 - resolution: "follow-redirects@npm:1.15.5" +"follow-redirects@npm:^1.15.6": + version: 1.15.6 + resolution: "follow-redirects@npm:1.15.6" peerDependenciesMeta: debug: optional: true - checksum: 5ca49b5ce6f44338cbfc3546823357e7a70813cecc9b7b768158a1d32c1e62e7407c944402a918ea8c38ae2e78266312d617dc68783fac502cbb55e1047b34ec + checksum: a62c378dfc8c00f60b9c80cab158ba54e99ba0239a5dd7c81245e5a5b39d10f0c35e249c3379eae719ff0285fff88c365dd446fab19dee771f1d76252df1bbf5 languageName: node linkType: hard @@ -10418,7 +10376,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": +"get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": version: 1.2.4 resolution: "get-intrinsic@npm:1.2.4" dependencies: @@ -10878,7 +10836,7 @@ __metadata: languageName: node linkType: hard -"has-property-descriptors@npm:^1.0.2": +"has-property-descriptors@npm:^1.0.1, has-property-descriptors@npm:^1.0.2": version: 1.0.2 resolution: "has-property-descriptors@npm:1.0.2" dependencies: @@ -10894,13 +10852,6 @@ __metadata: languageName: node linkType: hard -"has-proto@npm:^1.0.3": - version: 1.0.3 - resolution: "has-proto@npm:1.0.3" - checksum: fe7c3d50b33f50f3933a04413ed1f69441d21d2d2944f81036276d30635cad9279f6b43bc8f32036c31ebdfcf6e731150f46c1907ad90c669ffe9b066c3ba5c4 - languageName: node - linkType: hard - "has-symbol-support-x@npm:^1.4.1": version: 1.4.2 resolution: "has-symbol-support-x@npm:1.4.2" @@ -10933,7 +10884,7 @@ __metadata: languageName: node linkType: hard -"has-tostringtag@npm:^1.0.2": +"has-tostringtag@npm:^1.0.1": version: 1.0.2 resolution: "has-tostringtag@npm:1.0.2" dependencies: @@ -10969,12 +10920,12 @@ __metadata: languageName: node linkType: hard -"hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": - version: 2.0.2 - resolution: "hasown@npm:2.0.2" +"hasown@npm:^2.0.0, hasown@npm:^2.0.1": + version: 2.0.1 + resolution: "hasown@npm:2.0.1" dependencies: function-bind: ^1.1.2 - checksum: e8516f776a15149ca6c6ed2ae3110c417a00b62260e222590e54aa367cbcd6ed99122020b37b7fbdf05748df57b265e70095d7bf35a47660587619b15ffb93db + checksum: 9081c382a4fe8a62639a8da5c7d3322b203c319147e48783763dd741863d9f2dcaa743574fe2a1283871c445d8ba99ea45d5fff384e5ad27ca9dd7a367d79de0 languageName: node linkType: hard @@ -11396,7 +11347,7 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.7": +"internal-slot@npm:^1.0.5, internal-slot@npm:^1.0.7": version: 1.0.7 resolution: "internal-slot@npm:1.0.7" dependencies: @@ -11577,15 +11528,6 @@ __metadata: languageName: node linkType: hard -"is-data-view@npm:^1.0.1": - version: 1.0.1 - resolution: "is-data-view@npm:1.0.1" - dependencies: - is-typed-array: ^1.1.13 - checksum: 4ba4562ac2b2ec005fefe48269d6bd0152785458cd253c746154ffb8a8ab506a29d0cfb3b74af87513843776a88e4981ae25c89457bf640a33748eab1a7216b5 - languageName: node - linkType: hard - "is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" @@ -11706,10 +11648,10 @@ __metadata: languageName: node linkType: hard -"is-negative-zero@npm:^2.0.3": - version: 2.0.3 - resolution: "is-negative-zero@npm:2.0.3" - checksum: c1e6b23d2070c0539d7b36022d5a94407132411d01aba39ec549af824231f3804b1aea90b5e4e58e807a65d23ceb538ed6e355ce76b267bdd86edb757ffcbdcd +"is-negative-zero@npm:^2.0.2": + version: 2.0.2 + resolution: "is-negative-zero@npm:2.0.2" + checksum: f3232194c47a549da60c3d509c9a09be442507616b69454716692e37ae9f37c4dea264fb208ad0c9f3efd15a796a46b79df07c7e53c6227c32170608b809149a languageName: node linkType: hard @@ -11820,15 +11762,6 @@ __metadata: languageName: node linkType: hard -"is-shared-array-buffer@npm:^1.0.3": - version: 1.0.3 - resolution: "is-shared-array-buffer@npm:1.0.3" - dependencies: - call-bind: ^1.0.7 - checksum: a4fff602c309e64ccaa83b859255a43bb011145a42d3f56f67d9268b55bc7e6d98a5981a1d834186ad3105d6739d21547083fe7259c76c0468483fc538e716d8 - languageName: node - linkType: hard - "is-ssh@npm:^1.4.0": version: 1.4.0 resolution: "is-ssh@npm:1.4.0" @@ -11888,7 +11821,7 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.13": +"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.9": version: 1.1.13 resolution: "is-typed-array@npm:1.1.13" dependencies: @@ -12622,9 +12555,9 @@ __metadata: linkType: hard "lilconfig@npm:^3.0.0": - version: 3.1.1 - resolution: "lilconfig@npm:3.1.1" - checksum: dc8a4f4afde3f0fac6bd36163cc4777a577a90759b8ef1d0d766b19ccf121f723aa79924f32af5b954f3965268215e046d0f237c41c76e5ef01d4e6d1208a15e + version: 3.1.0 + resolution: "lilconfig@npm:3.1.0" + checksum: 114fdf6bfde357ced5e314fe238042f02524191ee2032cf567542f5a13955c3a5fdde7518a86d6b2fcdf0cb99abc52635117077c6f6e9e2e83367513416559fb languageName: node linkType: hard @@ -13709,11 +13642,11 @@ __metadata: linkType: hard "node-abi@npm:^3.3.0": - version: 3.56.0 - resolution: "node-abi@npm:3.56.0" + version: 3.54.0 + resolution: "node-abi@npm:3.54.0" dependencies: semver: ^7.3.5 - checksum: 76a9f705f88b217fe8b23c0003333256d695c0417bee745392524b9444df6e843a3c5cfad90e06a1e00f26cdf91db8d6efa11b1468929ffb6d2e8ac2aa364008 + checksum: 260caae87299bb2fac6a269ba5dd378dbe1d99030396832fca7199b6cb5fd46556d2ec0d431f4a76ab2d53e49948047543afe3f1d70d0e6ebad04d33139650da languageName: node linkType: hard @@ -14270,41 +14203,42 @@ __metadata: languageName: node linkType: hard -"object.entries@npm:^1.1.7": - version: 1.1.8 - resolution: "object.entries@npm:1.1.8" +"object.entries@npm:^1.1.6, object.entries@npm:^1.1.7": + version: 1.1.7 + resolution: "object.entries@npm:1.1.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-object-atoms: ^1.0.0 - checksum: 5314877cb637ef3437a30bba61d9bacdb3ce74bf73ac101518be0633c37840c8cc67407edb341f766e8093b3d7516d5c3358f25adfee4a2c697c0ec4c8491907 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: da287d434e7e32989586cd734382364ba826a2527f2bc82e6acbf9f9bfafa35d51018b66ec02543ffdfa2a5ba4af2b6f1ca6e588c65030cb4fd9c67d6ced594c languageName: node linkType: hard -"object.fromentries@npm:^2.0.7": - version: 2.0.8 - resolution: "object.fromentries@npm:2.0.8" +"object.fromentries@npm:^2.0.6, object.fromentries@npm:^2.0.7": + version: 2.0.7 + resolution: "object.fromentries@npm:2.0.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-abstract: ^1.23.2 - es-object-atoms: ^1.0.0 - checksum: 29b2207a2db2782d7ced83f93b3ff5d425f901945f3665ffda1821e30a7253cd1fd6b891a64279976098137ddfa883d748787a6fea53ecdb51f8df8b8cec0ae1 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 7341ce246e248b39a431b87a9ddd331ff52a454deb79afebc95609f94b1f8238966cf21f52188f2a353f0fdf83294f32f1ebf1f7826aae915ebad21fd0678065 languageName: node linkType: hard "object.groupby@npm:^1.0.1": - version: 1.0.3 - resolution: "object.groupby@npm:1.0.3" + version: 1.0.2 + resolution: "object.groupby@npm:1.0.2" dependencies: - call-bind: ^1.0.7 + array.prototype.filter: ^1.0.3 + call-bind: ^1.0.5 define-properties: ^1.2.1 - es-abstract: ^1.23.2 - checksum: 0d30693ca3ace29720bffd20b3130451dca7a56c612e1926c0a1a15e4306061d84410bdb1456be2656c5aca53c81b7a3661eceaa362db1bba6669c2c9b6d1982 + es-abstract: ^1.22.3 + es-errors: ^1.0.0 + checksum: 5f95c2a3a5f60a1a8c05fdd71455110bd3d5e6af0350a20b133d8cd70f9c3385d5c7fceb6a17b940c3c61752d9c202d10d5e2eb5ce73b89002656a87e7bf767a languageName: node linkType: hard -"object.hasown@npm:^1.1.3": +"object.hasown@npm:^1.1.2": version: 1.1.3 resolution: "object.hasown@npm:1.1.3" dependencies: @@ -14315,13 +14249,13 @@ __metadata: linkType: hard "object.values@npm:^1.1.6, object.values@npm:^1.1.7": - version: 1.2.0 - resolution: "object.values@npm:1.2.0" + version: 1.1.7 + resolution: "object.values@npm:1.1.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-object-atoms: ^1.0.0 - checksum: 51fef456c2a544275cb1766897f34ded968b22adfc13ba13b5e4815fdaf4304a90d42a3aee114b1f1ede048a4890381d47a5594d84296f2767c6a0364b9da8fa + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: f3e4ae4f21eb1cc7cebb6ce036d4c67b36e1c750428d7b7623c56a0db90edced63d08af8a316d81dfb7c41a3a5fa81b05b7cc9426e98d7da986b1682460f0777 languageName: node linkType: hard @@ -15029,13 +14963,6 @@ __metadata: languageName: node linkType: hard -"possible-typed-array-names@npm:^1.0.0": - version: 1.0.0 - resolution: "possible-typed-array-names@npm:1.0.0" - checksum: b32d403ece71e042385cc7856385cecf1cd8e144fa74d2f1de40d1e16035dba097bc189715925e79b67bdd1472796ff168d3a90d296356c9c94d272d5b95f3ae - languageName: node - linkType: hard - "postcss-focus-visible@npm:^6.0.4": version: 6.0.4 resolution: "postcss-focus-visible@npm:6.0.4" @@ -15124,12 +15051,12 @@ __metadata: linkType: hard "postcss-selector-parser@npm:^6.0.11, postcss-selector-parser@npm:^6.0.9": - version: 6.0.16 - resolution: "postcss-selector-parser@npm:6.0.16" + version: 6.0.15 + resolution: "postcss-selector-parser@npm:6.0.15" dependencies: cssesc: ^3.0.0 util-deprecate: ^1.0.2 - checksum: e1cd68e33a39e3dc1e1e5bd8717be5bbe3cc23a4cecb466c3acb2f3a77daad7a47df4d6137a76f8db74cf160d2fb16b2cfdb4ccbebdfda844690f8d545fe281d + checksum: 57decb94152111004f15e27b9c61131eb50ee10a3288e7fcf424cebbb4aba82c2817517ae718f8b5d704ee9e02a638d4a2acff8f47685c295a33ecee4fd31055 languageName: node linkType: hard @@ -15152,13 +15079,13 @@ __metadata: linkType: hard "postcss@npm:^8.4.23": - version: 8.4.38 - resolution: "postcss@npm:8.4.38" + version: 8.4.35 + resolution: "postcss@npm:8.4.35" dependencies: nanoid: ^3.3.7 picocolors: ^1.0.0 - source-map-js: ^1.2.0 - checksum: 649f9e60a763ca4b5a7bbec446a069edf07f057f6d780a5a0070576b841538d1ecf7dd888f2fbfd1f76200e26c969e405aeeae66332e6927dbdc8bdcb90b9451 + source-map-js: ^1.0.2 + checksum: cf3c3124d3912a507603f6d9a49b3783f741075e9aa73eb592a6dd9194f9edab9d20a8875d16d137d4f779fe7b6fbd1f5727e39bfd1c3003724980ee4995e1da languageName: node linkType: hard @@ -15278,8 +15205,8 @@ __metadata: linkType: hard "prebuild-install@npm:^7.1.1": - version: 7.1.2 - resolution: "prebuild-install@npm:7.1.2" + version: 7.1.1 + resolution: "prebuild-install@npm:7.1.1" dependencies: detect-libc: ^2.0.0 expand-template: ^2.0.3 @@ -15295,7 +15222,7 @@ __metadata: tunnel-agent: ^0.6.0 bin: prebuild-install: bin.js - checksum: 543dadf8c60e004ae9529e6013ca0cbeac8ef38b5f5ba5518cb0b622fe7f8758b34e4b5cb1a791db3cdc9d2281766302df6088bd1a225f206925d6fee17d6c5c + checksum: dbf96d0146b6b5827fc8f67f72074d2e19c69628b9a7a0a17d0fad1bf37e9f06922896972e074197fc00a52eae912993e6ef5a0d471652f561df5cb516f3f467 languageName: node linkType: hard @@ -16015,17 +15942,17 @@ __metadata: linkType: hard "reflect.getprototypeof@npm:^1.0.4": - version: 1.0.6 - resolution: "reflect.getprototypeof@npm:1.0.6" + version: 1.0.5 + resolution: "reflect.getprototypeof@npm:1.0.5" dependencies: - call-bind: ^1.0.7 + call-bind: ^1.0.5 define-properties: ^1.2.1 - es-abstract: ^1.23.1 - es-errors: ^1.3.0 - get-intrinsic: ^1.2.4 + es-abstract: ^1.22.3 + es-errors: ^1.0.0 + get-intrinsic: ^1.2.3 globalthis: ^1.0.3 which-builtin-type: ^1.1.3 - checksum: 88e9e65a7eaa0bf8e9a8bbf8ac07571363bc333ba8b6769ed5e013e0042ed7c385e97fae9049510b3b5fe4b42472d8f32de9ce8ce84902bc4297d4bbe3777dba + checksum: c7176be030b89b9e55882f4da3288de5ffd187c528d79870e27d2c8a713a82b3fa058ca2d0c9da25f6d61240e2685c42d7daa32cdf3d431d8207ee1b9ed30993 languageName: node linkType: hard @@ -16136,7 +16063,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^2.0.0-next.5": +"resolve@npm:^2.0.0-next.4": version: 2.0.0-next.5 resolution: "resolve@npm:2.0.0-next.5" dependencies: @@ -16162,7 +16089,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^2.0.0-next.5#~builtin": +"resolve@patch:resolve@^2.0.0-next.4#~builtin": version: 2.0.0-next.5 resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#~builtin::version=2.0.0-next.5&hash=c3c19d" dependencies: @@ -16282,9 +16209,9 @@ __metadata: "@coral-xyz/anchor-cli": ^0.28.0 "@coral-xyz/borsh": ^0.2.6 "@helium/crypto": ^4.10.2 - "@helium/modular-governance-idls": 0.0.8-next.12+f1b0c8c - "@helium/nft-delegation-sdk": 0.0.8-next.12+f1b0c8c - "@helium/proposal-sdk": 0.0.8-next.12+f1b0c8c + "@helium/modular-governance-idls": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/proposal-sdk": 0.0.8-next.16+ace2c47 "@helium/transactions": ^3.38.0 "@metaplex-foundation/mpl-bubblegum": ^0.7.0 "@pythnetwork/client": ^2.8.0 @@ -16354,15 +16281,15 @@ __metadata: languageName: node linkType: hard -"safe-array-concat@npm:^1.1.2": - version: 1.1.2 - resolution: "safe-array-concat@npm:1.1.2" +"safe-array-concat@npm:^1.1.0": + version: 1.1.0 + resolution: "safe-array-concat@npm:1.1.0" dependencies: - call-bind: ^1.0.7 - get-intrinsic: ^1.2.4 + call-bind: ^1.0.5 + get-intrinsic: ^1.2.2 has-symbols: ^1.0.3 isarray: ^2.0.5 - checksum: a3b259694754ddfb73ae0663829e396977b99ff21cbe8607f35a469655656da8e271753497e59da8a7575baa94d2e684bea3e10ddd74ba046c0c9b4418ffa0c4 + checksum: 5c71eaa999168ee7474929f1cd3aae80f486353a651a094d9968936692cf90aa065224929a6486dcda66334a27dce4250a83612f9e0fef6dced1a925d3ac7296 languageName: node linkType: hard @@ -16715,28 +16642,27 @@ __metadata: linkType: hard "set-function-length@npm:^1.2.1": - version: 1.2.2 - resolution: "set-function-length@npm:1.2.2" + version: 1.2.1 + resolution: "set-function-length@npm:1.2.1" dependencies: - define-data-property: ^1.1.4 + define-data-property: ^1.1.2 es-errors: ^1.3.0 function-bind: ^1.1.2 - get-intrinsic: ^1.2.4 + get-intrinsic: ^1.2.3 gopd: ^1.0.1 - has-property-descriptors: ^1.0.2 - checksum: a8248bdacdf84cb0fab4637774d9fb3c7a8e6089866d04c817583ff48e14149c87044ce683d7f50759a8c50fb87c7a7e173535b06169c87ef76f5fb276dfff72 + has-property-descriptors: ^1.0.1 + checksum: 23742476d695f2eae86348c069bd164d4f25fa7c26546a46a2b5f370f1f84b98ec64366d2cd17785d5b41bbf16b95855da4b7eb188e7056fe3b0248d61f6afda languageName: node linkType: hard -"set-function-name@npm:^2.0.1, set-function-name@npm:^2.0.2": - version: 2.0.2 - resolution: "set-function-name@npm:2.0.2" +"set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1": + version: 2.0.1 + resolution: "set-function-name@npm:2.0.1" dependencies: - define-data-property: ^1.1.4 - es-errors: ^1.3.0 + define-data-property: ^1.0.1 functions-have-names: ^1.2.3 - has-property-descriptors: ^1.0.2 - checksum: d6229a71527fd0404399fc6227e0ff0652800362510822a291925c9d7b48a1ca1a468b11b281471c34cd5a2da0db4f5d7ff315a61d26655e77f6e971e6d0c80f + has-property-descriptors: ^1.0.0 + checksum: 4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 languageName: node linkType: hard @@ -16853,18 +16779,6 @@ __metadata: languageName: node linkType: hard -"side-channel@npm:^1.0.6": - version: 1.0.6 - resolution: "side-channel@npm:1.0.6" - dependencies: - call-bind: ^1.0.7 - es-errors: ^1.3.0 - get-intrinsic: ^1.2.4 - object-inspect: ^1.13.1 - checksum: bfc1afc1827d712271453e91b7cd3878ac0efd767495fd4e594c4c2afaa7963b7b510e249572bfd54b0527e66e4a12b61b80c061389e129755f34c493aad9b97 - languageName: node - linkType: hard - "signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" @@ -16907,13 +16821,13 @@ __metadata: linkType: hard "simple-git@npm:^3.21.0": - version: 3.21.0 - resolution: "simple-git@npm:3.21.0" + version: 3.24.0 + resolution: "simple-git@npm:3.24.0" dependencies: "@kwsites/file-exists": ^1.1.1 "@kwsites/promise-deferred": ^1.1.1 debug: ^4.3.4 - checksum: e992d2ac5905c19d385ebb8575db92886c93e677acfb9edb28a842d05b7a3974ef34cc26ccb8057144099a1c5875070867456787aef5bf641a99ebfb9ef656bf + checksum: f2b8544a47c70a533a5461719e31c2ca39682ab2997158d90e636092cbd32fb2f859f57ca33eaa9d8d691e930d1654b2bc33c27ff4c86836eb211c6880f35dca languageName: node linkType: hard @@ -17025,10 +16939,10 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.0.2, source-map-js@npm:^1.2.0": - version: 1.2.0 - resolution: "source-map-js@npm:1.2.0" - checksum: 791a43306d9223792e84293b00458bf102a8946e7188f3db0e4e22d8d530b5f80a4ce468eb5ec0bf585443ad55ebbd630bf379c98db0b1f317fd902500217f97 +"source-map-js@npm:^1.0.2": + version: 1.0.2 + resolution: "source-map-js@npm:1.0.2" + checksum: c049a7fc4deb9a7e9b481ae3d424cc793cb4845daa690bc5a05d428bf41bf231ced49b4cf0c9e77f9d42fdb3d20d6187619fc586605f5eabe995a316da8d377c languageName: node linkType: hard @@ -17181,8 +17095,8 @@ __metadata: linkType: hard "streamx@npm:^2.13.0, streamx@npm:^2.15.0": - version: 2.16.1 - resolution: "streamx@npm:2.16.1" + version: 2.15.8 + resolution: "streamx@npm:2.15.8" dependencies: bare-events: ^2.2.0 fast-fifo: ^1.1.0 @@ -17190,7 +17104,7 @@ __metadata: dependenciesMeta: bare-events: optional: true - checksum: 6bbb4c38c0ab6ddbe0857d55e72f71288f308f2a9f4413b7b07391cdf9f94232ffc2bbe40a1212d2e09634ecdbd5052b444c73cc8d67ae1c97e2b7e553dad559 + checksum: 3068407bb3a856e247dbb32a68d0830170f8c014b8c5123b11c5ee9e4a75905ff80d5b676283bcae2f48d8de61464a71d851e080b5288d18fc3ee94b3ff474e8 languageName: node linkType: hard @@ -17223,57 +17137,53 @@ __metadata: languageName: node linkType: hard -"string.prototype.matchall@npm:^4.0.10": - version: 4.0.11 - resolution: "string.prototype.matchall@npm:4.0.11" +"string.prototype.matchall@npm:^4.0.8": + version: 4.0.10 + resolution: "string.prototype.matchall@npm:4.0.10" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-abstract: ^1.23.2 - es-errors: ^1.3.0 - es-object-atoms: ^1.0.0 - get-intrinsic: ^1.2.4 - gopd: ^1.0.1 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 has-symbols: ^1.0.3 - internal-slot: ^1.0.7 - regexp.prototype.flags: ^1.5.2 - set-function-name: ^2.0.2 - side-channel: ^1.0.6 - checksum: 6ac6566ed065c0c8489c91156078ca077db8ff64d683fda97ae652d00c52dfa5f39aaab0a710d8243031a857fd2c7c511e38b45524796764d25472d10d7075ae + internal-slot: ^1.0.5 + regexp.prototype.flags: ^1.5.0 + set-function-name: ^2.0.0 + side-channel: ^1.0.4 + checksum: 3c78bdeff39360c8e435d7c4c6ea19f454aa7a63eda95fa6fadc3a5b984446a2f9f2c02d5c94171ce22268a573524263fbd0c8edbe3ce2e9890d7cc036cdc3ed languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.9": - version: 1.2.9 - resolution: "string.prototype.trim@npm:1.2.9" +"string.prototype.trim@npm:^1.2.8": + version: 1.2.8 + resolution: "string.prototype.trim@npm:1.2.8" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-abstract: ^1.23.0 - es-object-atoms: ^1.0.0 - checksum: ea2df6ec1e914c9d4e2dc856fa08228e8b1be59b59e50b17578c94a66a176888f417264bb763d4aac638ad3b3dad56e7a03d9317086a178078d131aa293ba193 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 49eb1a862a53aba73c3fb6c2a53f5463173cb1f4512374b623bcd6b43ad49dd559a06fb5789bdec771a40fc4d2a564411c0a75d35fb27e76bbe738c211ecff07 languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.8": - version: 1.0.8 - resolution: "string.prototype.trimend@npm:1.0.8" +"string.prototype.trimend@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimend@npm:1.0.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-object-atoms: ^1.0.0 - checksum: cc3bd2de08d8968a28787deba9a3cb3f17ca5f9f770c91e7e8fa3e7d47f079bad70fadce16f05dda9f261788be2c6e84a942f618c3bed31e42abc5c1084f8dfd + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 2375516272fd1ba75992f4c4aa88a7b5f3c7a9ca308d963bcd5645adf689eba6f8a04ebab80c33e30ec0aefc6554181a3a8416015c38da0aa118e60ec896310c languageName: node linkType: hard "string.prototype.trimstart@npm:^1.0.7": - version: 1.0.8 - resolution: "string.prototype.trimstart@npm:1.0.8" + version: 1.0.7 + resolution: "string.prototype.trimstart@npm:1.0.7" dependencies: - call-bind: ^1.0.7 - define-properties: ^1.2.1 - es-object-atoms: ^1.0.0 - checksum: df1007a7f580a49d692375d996521dc14fd103acda7f3034b3c558a60b82beeed3a64fa91e494e164581793a8ab0ae2f59578a49896a7af6583c1f20472bce96 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 13d0c2cb0d5ff9e926fa0bec559158b062eed2b68cd5be777ffba782c96b2b492944e47057274e064549b94dd27cf81f48b27a31fee8af5b574cff253e7eb613 languageName: node linkType: hard @@ -18153,55 +18063,50 @@ __metadata: languageName: node linkType: hard -"typed-array-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "typed-array-buffer@npm:1.0.2" +"typed-array-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "typed-array-buffer@npm:1.0.1" dependencies: - call-bind: ^1.0.7 + call-bind: ^1.0.6 es-errors: ^1.3.0 is-typed-array: ^1.1.13 - checksum: 02ffc185d29c6df07968272b15d5319a1610817916ec8d4cd670ded5d1efe72901541ff2202fcc622730d8a549c76e198a2f74e312eabbfb712ed907d45cbb0b + checksum: 1d65e46b2b9b7ec2a30df39b9ddf32e55ad08d6119aec33975506a3dba56057796bdc3c64dbeb7fdb61bf340a75e279dfd55b48ce8f3b874f01731e1da6833d2 languageName: node linkType: hard -"typed-array-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "typed-array-byte-length@npm:1.0.1" +"typed-array-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-length@npm:1.0.0" dependencies: - call-bind: ^1.0.7 + call-bind: ^1.0.2 for-each: ^0.3.3 - gopd: ^1.0.1 - has-proto: ^1.0.3 - is-typed-array: ^1.1.13 - checksum: f65e5ecd1cf76b1a2d0d6f631f3ea3cdb5e08da106c6703ffe687d583e49954d570cc80434816d3746e18be889ffe53c58bf3e538081ea4077c26a41055b216d + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: b03db16458322b263d87a702ff25388293f1356326c8a678d7515767ef563ef80e1e67ce648b821ec13178dd628eb2afdc19f97001ceae7a31acf674c849af94 languageName: node linkType: hard -"typed-array-byte-offset@npm:^1.0.2": - version: 1.0.2 - resolution: "typed-array-byte-offset@npm:1.0.2" +"typed-array-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-offset@npm:1.0.0" dependencies: - available-typed-arrays: ^1.0.7 - call-bind: ^1.0.7 + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.2 for-each: ^0.3.3 - gopd: ^1.0.1 - has-proto: ^1.0.3 - is-typed-array: ^1.1.13 - checksum: c8645c8794a621a0adcc142e0e2c57b1823bbfa4d590ad2c76b266aa3823895cf7afb9a893bf6685e18454ab1b0241e1a8d885a2d1340948efa4b56add4b5f67 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: 04f6f02d0e9a948a95fbfe0d5a70b002191fae0b8fe0fe3130a9b2336f043daf7a3dda56a31333c35a067a97e13f539949ab261ca0f3692c41603a46a94e960b languageName: node linkType: hard -"typed-array-length@npm:^1.0.5": - version: 1.0.6 - resolution: "typed-array-length@npm:1.0.6" +"typed-array-length@npm:^1.0.4": + version: 1.0.4 + resolution: "typed-array-length@npm:1.0.4" dependencies: - call-bind: ^1.0.7 + call-bind: ^1.0.2 for-each: ^0.3.3 - gopd: ^1.0.1 - has-proto: ^1.0.3 - is-typed-array: ^1.1.13 - possible-typed-array-names: ^1.0.0 - checksum: f0315e5b8f0168c29d390ff410ad13e4d511c78e6006df4a104576844812ee447fcc32daab1f3a76c9ef4f64eff808e134528b5b2439de335586b392e9750e5c + is-typed-array: ^1.1.9 + checksum: 2228febc93c7feff142b8c96a58d4a0d7623ecde6c7a24b2b98eb3170e99f7c7eff8c114f9b283085cd59dcd2bd43aadf20e25bba4b034a53c5bb292f71f8956 languageName: node linkType: hard @@ -18313,19 +18218,12 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 3192ef6f3fd5df652f2dc1cd782b49d6ff14dc98e5dced492aa8a8c65425227da5da6aafe22523c67f035a272c599bb89cfe803c1db6311e44bed3042fc25487 - languageName: node - linkType: hard - -"undici@npm:^5.28.2": - version: 5.28.3 - resolution: "undici@npm:5.28.3" +"undici@npm:^5.28.3": + version: 5.28.4 + resolution: "undici@npm:5.28.4" dependencies: "@fastify/busboy": ^2.0.0 - checksum: fa1e65aff896c5e2ee23637b632e306f9e3a2b32a3dc0b23ea71e5555ad350bcc25713aea894b3dccc0b7dc2c5e92a5a58435ebc2033b731a5524506f573dfd2 + checksum: a8193132d84540e4dc1895ecc8dbaa176e8a49d26084d6fbe48a292e28397cd19ec5d13bc13e604484e76f94f6e334b2bdc740d5f06a6e50c44072818d0c19f9 languageName: node linkType: hard @@ -18699,16 +18597,16 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15": - version: 1.1.15 - resolution: "which-typed-array@npm:1.1.15" +"which-typed-array@npm:^1.1.14": + version: 1.1.14 + resolution: "which-typed-array@npm:1.1.14" dependencies: - available-typed-arrays: ^1.0.7 - call-bind: ^1.0.7 + available-typed-arrays: ^1.0.6 + call-bind: ^1.0.5 for-each: ^0.3.3 gopd: ^1.0.1 - has-tostringtag: ^1.0.2 - checksum: 65227dcbfadf5677aacc43ec84356d17b5500cb8b8753059bb4397de5cd0c2de681d24e1a7bd575633f976a95f88233abfd6549c2105ef4ebd58af8aa1807c75 + has-tostringtag: ^1.0.1 + checksum: efe30c143c58630dde8ab96f9330e20165bacd77ca843c602b510120a415415573bcdef3ccbc30a0e5aaf20f257360cfe24712aea0008f149ce5bb99834c0c0b languageName: node linkType: hard @@ -18988,11 +18886,9 @@ __metadata: linkType: hard "yaml@npm:^2.3.4": - version: 2.4.1 - resolution: "yaml@npm:2.4.1" - bin: - yaml: bin.mjs - checksum: 4c391d07a5d5e935e058babb71026c9cdc9a6fd889e35dd91b53cfb0a12691b67c6c5c740858e71345fef18cd9c13c554a6dda9196f59820d769d94041badb0b + version: 2.3.4 + resolution: "yaml@npm:2.3.4" + checksum: e6d1dae1c6383bcc8ba11796eef3b8c02d5082911c6723efeeb5ba50fc8e881df18d645e64de68e421b577296000bea9c75d6d9097c2f6699da3ae0406c030d8 languageName: node linkType: hard From e95c385f2d8337e66cebb0051f64992133b24b83 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Tue, 16 Apr 2024 16:05:04 -0500 Subject: [PATCH 016/130] Fix tests --- Anchor.toml | 2 +- .../vote_service_example.json | 2 +- tests/voter-stake-registry.ts | 20 +++++++++---------- utils/nft-proxy/src/lib.rs | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Anchor.toml b/Anchor.toml index 49690f270..1d65fba9e 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -80,7 +80,7 @@ address = "66t3XARU6Ja3zj91gDZ2KoNLJHEMTYPSKqJWYb6PJJBA" # Proposal IDL address = "nprx42sXf5rpVnwBWEdRg1d8tuCWsTuVLys1pRWwE6p" # NFT Proxy [[test.validator.clone]] -address = "5612ANVGVnwJRuvKJ1uSmky3A2mCfFDAi6DaK9xoZRp9" # NFT Delegation IDL +address = "CNjepJnCPddZwd8xGS3M2QpZuCbfVRNvi3jfBehKHKHw" # NFT Proxy IDL [[test.validator.clone]] address = "JBaTytFv1CmGNkyNiLu16jFMXNZ49BGfy4bYAYZdkxg5" # Mobile price oracle diff --git a/packages/account-postgres-sink-service/vote_service_example.json b/packages/account-postgres-sink-service/vote_service_example.json index 7a7a523b9..f4f993928 100644 --- a/packages/account-postgres-sink-service/vote_service_example.json +++ b/packages/account-postgres-sink-service/vote_service_example.json @@ -9,7 +9,7 @@ ] }, { - "programId": "nde169MVKXLYbtDbrTF8wiJc8KYJRvLXKAzHApZ5vvD", + "programId": "nprx42sXf5rpVnwBWEdRg1d8tuCWsTuVLys1pRWwE6p", "accounts": [ { "type": "DelegationV0", "table": "delegations", "schema": "public" } ] diff --git a/tests/voter-stake-registry.ts b/tests/voter-stake-registry.ts index 3c620a6dd..5bc8b5d76 100644 --- a/tests/voter-stake-registry.ts +++ b/tests/voter-stake-registry.ts @@ -41,7 +41,7 @@ import { SPL_GOVERNANCE_PID } from "./utils/vsr"; import { PROGRAM_ID as DEL_PID, init as initNftProxy, - delegationKey, + proxyKey, } from "@helium/nft-proxy-sdk"; import { NftProxy } from "@helium/modular-governance-idls/lib/types/nft_proxy"; import { ensureVSRIdl } from "./utils/fixtures"; @@ -468,7 +468,7 @@ describe("voter-stake-registry", () => { beforeEach(async () => { ({ position, mint } = await createAndDeposit(10000, 200)); await proxyProgram.methods - .delegateV0({ + .assignProxyV0({ expirationTime: new anchor.BN(new Date().valueOf() / 1000 + 10000), }) .accounts({ @@ -586,24 +586,24 @@ describe("voter-stake-registry", () => { }); it("allows the original owner to undelegate", async () => { - const toUndelegate = delegationKey(proxyConfig!, mint, delegatee.publicKey)[0]; - const myDelegation = delegationKey(proxyConfig!, mint, PublicKey.default)[0]; + const toUnProxy = proxyKey(proxyConfig!, mint, delegatee.publicKey)[0]; + const myProxy = proxyKey(proxyConfig!, mint, PublicKey.default)[0]; await proxyProgram.methods - .undelegateV0() + .unassignProxyV0() .accounts({ - delegation: toUndelegate, - prevDelegation: myDelegation, - currentDelegation: myDelegation, + proxy: toUnProxy, + prevProxy: myProxy, + currentProxy: myProxy, }) .rpc({ skipPreflight: true }); expect( ( - await proxyProgram.account.proxyV0.fetch(myDelegation) + await proxyProgram.account.proxyV0.fetch(myProxy) ).nextOwner.toBase58() ).to.eq(PublicKey.default.toBase58()); expect( - await proxyProgram.account.proxyV0.fetchNullable(toUndelegate) + await proxyProgram.account.proxyV0.fetchNullable(toUnProxy) ).to.be.null; }); }); diff --git a/utils/nft-proxy/src/lib.rs b/utils/nft-proxy/src/lib.rs index f2c35abaa..d34c427db 100644 --- a/utils/nft-proxy/src/lib.rs +++ b/utils/nft-proxy/src/lib.rs @@ -2,4 +2,4 @@ use anchor_lang::prelude::*; anchor_gen::generate_cpi_crate!("./idl.json"); -declare_id!("nde169MVKXLYbtDbrTF8wiJc8KYJRvLXKAzHApZ5vvD"); +declare_id!("nprx42sXf5rpVnwBWEdRg1d8tuCWsTuVLys1pRWwE6p"); From ddbe3193f4d9a178d5d3f5646f4f2406b52387d3 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Thu, 18 Apr 2024 10:12:44 -0500 Subject: [PATCH 017/130] WIP --- package.json | 6 +- .../yarn.deploy.lock | 6 +- packages/account-fetch-cache/yarn.deploy.lock | 6 +- .../yarn.deploy.lock | 6 +- packages/anchor-resolvers/yarn.deploy.lock | 6 +- packages/circuit-breaker-sdk/yarn.deploy.lock | 6 +- packages/crons/package.json | 2 +- packages/crons/yarn.deploy.lock | 32 +++++----- packages/currency-utils/yarn.deploy.lock | 6 +- packages/data-credits-sdk/yarn.deploy.lock | 20 +++---- packages/distributor-oracle/yarn.deploy.lock | 20 +++---- packages/entity-invalidator/yarn.deploy.lock | 20 +++---- .../fanout-metadata-service/yarn.deploy.lock | 6 +- packages/fanout-sdk/yarn.deploy.lock | 6 +- packages/faucet-service/yarn.deploy.lock | 6 +- packages/helium-admin-cli/package.json | 2 +- packages/helium-admin-cli/yarn.deploy.lock | 22 +++---- .../yarn.deploy.lock | 20 +++---- packages/helium-react-hooks/yarn.deploy.lock | 6 +- packages/helium-sub-daos-sdk/yarn.deploy.lock | 20 +++---- packages/hexboosting-sdk/yarn.deploy.lock | 20 +++---- packages/hotspot-utils/yarn.deploy.lock | 20 +++---- packages/idls/yarn.deploy.lock | 6 +- .../lazy-distributor-sdk/yarn.deploy.lock | 6 +- .../lazy-transactions-sdk/yarn.deploy.lock | 6 +- packages/metadata-service/yarn.deploy.lock | 20 +++---- packages/migration-service/yarn.deploy.lock | 20 +++---- .../yarn.deploy.lock | 20 +++---- packages/monitor-service/yarn.deploy.lock | 20 +++---- packages/price-oracle-sdk/yarn.deploy.lock | 6 +- packages/rewards-oracle-sdk/yarn.deploy.lock | 6 +- packages/spl-utils/yarn.deploy.lock | 6 +- packages/sus/yarn.deploy.lock | 6 +- .../tokens-to-rent-service/yarn.deploy.lock | 6 +- .../treasury-management-sdk/yarn.deploy.lock | 6 +- .../voter-stake-registry-hooks/package.json | 2 +- .../yarn.deploy.lock | 30 +++++----- .../voter-stake-registry-sdk/package.json | 2 +- .../voter-stake-registry-sdk/yarn.deploy.lock | 20 +++---- .../vsr-metadata-service/yarn.deploy.lock | 20 +++---- packages/xnft-hotspot/yarn.deploy.lock | 20 +++---- tests/voter-stake-registry.ts | 14 +++-- yarn.lock | 60 +++++++++---------- 43 files changed, 286 insertions(+), 280 deletions(-) diff --git a/package.json b/package.json index b968a3973..a5261fcb9 100644 --- a/package.json +++ b/package.json @@ -34,9 +34,9 @@ "@coral-xyz/anchor-cli": "^0.28.0", "@coral-xyz/borsh": "^0.2.6", "@helium/crypto": "^4.10.2", - "@helium/modular-governance-idls": "0.0.8-next.16+ace2c47", - "@helium/nft-proxy-sdk": "0.0.8-next.16+ace2c47", - "@helium/proposal-sdk": "0.0.8-next.16+ace2c47", + "@helium/modular-governance-idls": "0.0.8-next.17+7ff2115", + "@helium/nft-proxy-sdk": "0.0.8-next.17+7ff2115", + "@helium/proposal-sdk": "0.0.8-next.17+7ff2115", "@helium/transactions": "^3.38.0", "@metaplex-foundation/mpl-bubblegum": "^0.7.0", "@pythnetwork/client": "^2.8.0", diff --git a/packages/account-fetch-cache-hooks/yarn.deploy.lock b/packages/account-fetch-cache-hooks/yarn.deploy.lock index 682f9d28f..725ff26c8 100644 --- a/packages/account-fetch-cache-hooks/yarn.deploy.lock +++ b/packages/account-fetch-cache-hooks/yarn.deploy.lock @@ -106,8 +106,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -124,7 +124,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/account-fetch-cache/yarn.deploy.lock b/packages/account-fetch-cache/yarn.deploy.lock index b267139e8..5cecfb22a 100644 --- a/packages/account-fetch-cache/yarn.deploy.lock +++ b/packages/account-fetch-cache/yarn.deploy.lock @@ -90,8 +90,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -108,7 +108,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/account-postgres-sink-service/yarn.deploy.lock b/packages/account-postgres-sink-service/yarn.deploy.lock index a3ec71677..a37c3ea58 100644 --- a/packages/account-postgres-sink-service/yarn.deploy.lock +++ b/packages/account-postgres-sink-service/yarn.deploy.lock @@ -406,8 +406,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -424,7 +424,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/anchor-resolvers/yarn.deploy.lock b/packages/anchor-resolvers/yarn.deploy.lock index 69c221c79..1fedb388b 100644 --- a/packages/anchor-resolvers/yarn.deploy.lock +++ b/packages/anchor-resolvers/yarn.deploy.lock @@ -157,8 +157,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -175,7 +175,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/circuit-breaker-sdk/yarn.deploy.lock b/packages/circuit-breaker-sdk/yarn.deploy.lock index c4d1b70c9..cc2b8aa01 100644 --- a/packages/circuit-breaker-sdk/yarn.deploy.lock +++ b/packages/circuit-breaker-sdk/yarn.deploy.lock @@ -255,8 +255,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -273,7 +273,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/crons/package.json b/packages/crons/package.json index 79b283eab..e9fc3c58f 100644 --- a/packages/crons/package.json +++ b/packages/crons/package.json @@ -46,7 +46,7 @@ "@helium/proposal-sdk": "^0.0.8", "@helium/rewards-oracle-sdk": "^0.7.6", "@helium/spl-utils": "^0.7.6", - "@helium/state-controller-sdk": "0.0.8-next.16+ace2c47", + "@helium/state-controller-sdk": "0.0.8-next.17+7ff2115", "@helium/treasury-management-sdk": "^0.7.6", "@helium/voter-stake-registry-sdk": "^0.7.6", "@solana/spl-token": "^0.3.8", diff --git a/packages/crons/yarn.deploy.lock b/packages/crons/yarn.deploy.lock index 31a0b2411..85260e314 100644 --- a/packages/crons/yarn.deploy.lock +++ b/packages/crons/yarn.deploy.lock @@ -206,7 +206,7 @@ __metadata: "@helium/proposal-sdk": ^0.0.8 "@helium/rewards-oracle-sdk": ^0.7.6 "@helium/spl-utils": ^0.7.6 - "@helium/state-controller-sdk": 0.0.8-next.16+ace2c47 + "@helium/state-controller-sdk": 0.0.8-next.17+7ff2115 "@helium/treasury-management-sdk": ^0.7.6 "@helium/voter-stake-registry-sdk": ^0.7.6 "@solana/spl-token": ^0.3.8 @@ -385,7 +385,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -395,15 +395,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -499,14 +499,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/state-controller-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/state-controller-sdk@npm:0.0.8-next.16" +"@helium/state-controller-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 - checksum: 2a7b703363f1078b428134e17f1805065e6fbcd9f7aca380c2e06b30c9e12928e1641985e1f4fdb86a17e7397dd8f0a84cbe06f4ffaae5d194900f03954ba842 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + checksum: e77e88e7e8c24fb52e07dd9dda76494a237e1ed69e429f10b0a2d501c45a3974528ccfff9f766e2c90dd5f8f196ba20d597cb9416977909df40840d300c5b85c languageName: node linkType: hard @@ -534,7 +534,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -789,8 +789,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -807,7 +807,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/currency-utils/yarn.deploy.lock b/packages/currency-utils/yarn.deploy.lock index 5d1cb4d53..51d8bcf8a 100644 --- a/packages/currency-utils/yarn.deploy.lock +++ b/packages/currency-utils/yarn.deploy.lock @@ -201,8 +201,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -219,7 +219,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/data-credits-sdk/yarn.deploy.lock b/packages/data-credits-sdk/yarn.deploy.lock index 58bcff95e..daa5f3973 100644 --- a/packages/data-credits-sdk/yarn.deploy.lock +++ b/packages/data-credits-sdk/yarn.deploy.lock @@ -183,7 +183,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -193,15 +193,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -251,7 +251,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -469,8 +469,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -487,7 +487,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/distributor-oracle/yarn.deploy.lock b/packages/distributor-oracle/yarn.deploy.lock index c4e782fa3..215fe3c9b 100644 --- a/packages/distributor-oracle/yarn.deploy.lock +++ b/packages/distributor-oracle/yarn.deploy.lock @@ -312,7 +312,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -322,15 +322,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -412,7 +412,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -667,8 +667,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -685,7 +685,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/entity-invalidator/yarn.deploy.lock b/packages/entity-invalidator/yarn.deploy.lock index c3d99c0bc..926750f54 100644 --- a/packages/entity-invalidator/yarn.deploy.lock +++ b/packages/entity-invalidator/yarn.deploy.lock @@ -242,7 +242,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -252,15 +252,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -326,7 +326,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -544,8 +544,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -562,7 +562,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/fanout-metadata-service/yarn.deploy.lock b/packages/fanout-metadata-service/yarn.deploy.lock index cf04884e0..fe428dc7b 100644 --- a/packages/fanout-metadata-service/yarn.deploy.lock +++ b/packages/fanout-metadata-service/yarn.deploy.lock @@ -431,8 +431,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -449,7 +449,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/fanout-sdk/yarn.deploy.lock b/packages/fanout-sdk/yarn.deploy.lock index c62d06555..5b90d2941 100644 --- a/packages/fanout-sdk/yarn.deploy.lock +++ b/packages/fanout-sdk/yarn.deploy.lock @@ -255,8 +255,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -273,7 +273,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/faucet-service/yarn.deploy.lock b/packages/faucet-service/yarn.deploy.lock index 0bab781c7..1d9d58999 100644 --- a/packages/faucet-service/yarn.deploy.lock +++ b/packages/faucet-service/yarn.deploy.lock @@ -415,8 +415,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -433,7 +433,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index 603fd0d91..d62f07949 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -49,7 +49,7 @@ "@helium/helium-sub-daos-sdk": "^0.7.6", "@helium/lazy-distributor-sdk": "^0.7.6", "@helium/mobile-entity-manager-sdk": "^0.7.6", - "@helium/nft-proxy-sdk": "0.0.8-next.16+ace2c47", + "@helium/nft-proxy-sdk": "0.0.8-next.17+7ff2115", "@helium/price-oracle-sdk": "^0.7.6", "@helium/spl-utils": "^0.7.6", "@helium/treasury-management-sdk": "^0.7.6", diff --git a/packages/helium-admin-cli/yarn.deploy.lock b/packages/helium-admin-cli/yarn.deploy.lock index b0fa039ae..f3c3e25ee 100644 --- a/packages/helium-admin-cli/yarn.deploy.lock +++ b/packages/helium-admin-cli/yarn.deploy.lock @@ -325,7 +325,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.7.6 "@helium/lazy-distributor-sdk": ^0.7.6 "@helium/mobile-entity-manager-sdk": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/price-oracle-sdk": ^0.7.6 "@helium/spl-utils": ^0.7.6 "@helium/treasury-management-sdk": ^0.7.6 @@ -450,7 +450,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -460,15 +460,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -565,7 +565,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -835,8 +835,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -853,7 +853,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/helium-entity-manager-sdk/yarn.deploy.lock b/packages/helium-entity-manager-sdk/yarn.deploy.lock index b248c7f07..a93e99aae 100644 --- a/packages/helium-entity-manager-sdk/yarn.deploy.lock +++ b/packages/helium-entity-manager-sdk/yarn.deploy.lock @@ -211,7 +211,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -221,15 +221,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -295,7 +295,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -513,8 +513,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -531,7 +531,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/helium-react-hooks/yarn.deploy.lock b/packages/helium-react-hooks/yarn.deploy.lock index fa6d2fa05..4e823da19 100644 --- a/packages/helium-react-hooks/yarn.deploy.lock +++ b/packages/helium-react-hooks/yarn.deploy.lock @@ -366,8 +366,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -384,7 +384,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/helium-sub-daos-sdk/yarn.deploy.lock b/packages/helium-sub-daos-sdk/yarn.deploy.lock index b49847b7f..d72455a4a 100644 --- a/packages/helium-sub-daos-sdk/yarn.deploy.lock +++ b/packages/helium-sub-daos-sdk/yarn.deploy.lock @@ -163,7 +163,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -173,15 +173,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -231,7 +231,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -449,8 +449,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -467,7 +467,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/hexboosting-sdk/yarn.deploy.lock b/packages/hexboosting-sdk/yarn.deploy.lock index 1efd4d470..bb177be4f 100644 --- a/packages/hexboosting-sdk/yarn.deploy.lock +++ b/packages/hexboosting-sdk/yarn.deploy.lock @@ -180,7 +180,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -190,15 +190,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -248,7 +248,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -466,8 +466,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -484,7 +484,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/hotspot-utils/yarn.deploy.lock b/packages/hotspot-utils/yarn.deploy.lock index bf6301020..365c39ebc 100644 --- a/packages/hotspot-utils/yarn.deploy.lock +++ b/packages/hotspot-utils/yarn.deploy.lock @@ -225,7 +225,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -235,15 +235,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -309,7 +309,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -527,8 +527,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -545,7 +545,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/idls/yarn.deploy.lock b/packages/idls/yarn.deploy.lock index e56fd5050..6a91fdc5a 100644 --- a/packages/idls/yarn.deploy.lock +++ b/packages/idls/yarn.deploy.lock @@ -167,8 +167,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -185,7 +185,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/lazy-distributor-sdk/yarn.deploy.lock b/packages/lazy-distributor-sdk/yarn.deploy.lock index 6026ceed2..eb9057f45 100644 --- a/packages/lazy-distributor-sdk/yarn.deploy.lock +++ b/packages/lazy-distributor-sdk/yarn.deploy.lock @@ -271,8 +271,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -289,7 +289,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/lazy-transactions-sdk/yarn.deploy.lock b/packages/lazy-transactions-sdk/yarn.deploy.lock index f558eac87..7c4a06d8e 100644 --- a/packages/lazy-transactions-sdk/yarn.deploy.lock +++ b/packages/lazy-transactions-sdk/yarn.deploy.lock @@ -362,8 +362,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -380,7 +380,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/metadata-service/yarn.deploy.lock b/packages/metadata-service/yarn.deploy.lock index 8858a464e..ba8c3b6ea 100644 --- a/packages/metadata-service/yarn.deploy.lock +++ b/packages/metadata-service/yarn.deploy.lock @@ -339,7 +339,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -349,15 +349,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -423,7 +423,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -740,8 +740,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -758,7 +758,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/migration-service/yarn.deploy.lock b/packages/migration-service/yarn.deploy.lock index 9385c9b72..65440dba2 100644 --- a/packages/migration-service/yarn.deploy.lock +++ b/packages/migration-service/yarn.deploy.lock @@ -454,7 +454,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -464,15 +464,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -554,7 +554,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -821,8 +821,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -839,7 +839,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/mobile-entity-manager-sdk/yarn.deploy.lock b/packages/mobile-entity-manager-sdk/yarn.deploy.lock index d106ebcf2..5b42fe4a1 100644 --- a/packages/mobile-entity-manager-sdk/yarn.deploy.lock +++ b/packages/mobile-entity-manager-sdk/yarn.deploy.lock @@ -229,7 +229,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -239,15 +239,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -313,7 +313,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -531,8 +531,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -549,7 +549,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/monitor-service/yarn.deploy.lock b/packages/monitor-service/yarn.deploy.lock index dbef8eab8..37f1c78e8 100644 --- a/packages/monitor-service/yarn.deploy.lock +++ b/packages/monitor-service/yarn.deploy.lock @@ -299,7 +299,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -350,15 +350,15 @@ __metadata: languageName: unknown linkType: soft -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -439,7 +439,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -687,8 +687,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -705,7 +705,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/price-oracle-sdk/yarn.deploy.lock b/packages/price-oracle-sdk/yarn.deploy.lock index ed19379b0..3b6bcc24f 100644 --- a/packages/price-oracle-sdk/yarn.deploy.lock +++ b/packages/price-oracle-sdk/yarn.deploy.lock @@ -215,8 +215,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -233,7 +233,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/rewards-oracle-sdk/yarn.deploy.lock b/packages/rewards-oracle-sdk/yarn.deploy.lock index 097af90f4..adc966fa0 100644 --- a/packages/rewards-oracle-sdk/yarn.deploy.lock +++ b/packages/rewards-oracle-sdk/yarn.deploy.lock @@ -255,8 +255,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -273,7 +273,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/spl-utils/yarn.deploy.lock b/packages/spl-utils/yarn.deploy.lock index f15ae81b0..fdbecf616 100644 --- a/packages/spl-utils/yarn.deploy.lock +++ b/packages/spl-utils/yarn.deploy.lock @@ -297,8 +297,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -315,7 +315,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/sus/yarn.deploy.lock b/packages/sus/yarn.deploy.lock index 74a9ed88f..4b363de05 100644 --- a/packages/sus/yarn.deploy.lock +++ b/packages/sus/yarn.deploy.lock @@ -240,8 +240,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -258,7 +258,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/tokens-to-rent-service/yarn.deploy.lock b/packages/tokens-to-rent-service/yarn.deploy.lock index b31f1be1f..70d070f22 100644 --- a/packages/tokens-to-rent-service/yarn.deploy.lock +++ b/packages/tokens-to-rent-service/yarn.deploy.lock @@ -406,8 +406,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -424,7 +424,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/treasury-management-sdk/yarn.deploy.lock b/packages/treasury-management-sdk/yarn.deploy.lock index 775336d17..9897972ed 100644 --- a/packages/treasury-management-sdk/yarn.deploy.lock +++ b/packages/treasury-management-sdk/yarn.deploy.lock @@ -272,8 +272,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -290,7 +290,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/voter-stake-registry-hooks/package.json b/packages/voter-stake-registry-hooks/package.json index 3bf59fbc0..6d2bfb8fd 100644 --- a/packages/voter-stake-registry-hooks/package.json +++ b/packages/voter-stake-registry-hooks/package.json @@ -38,7 +38,7 @@ "@helium/helium-react-hooks": "^0.7.6", "@helium/helium-sub-daos-sdk": "^0.7.6", "@helium/modular-governance-hooks": "^0.0.8", - "@helium/modular-governance-idls": "0.0.8-next.16+ace2c47", + "@helium/modular-governance-idls": "0.0.8-next.17+7ff2115", "@helium/spl-utils": "^0.7.6", "@helium/voter-stake-registry-sdk": "^0.7.6", "@solana/wallet-adapter-base": "^0.9.22", diff --git a/packages/voter-stake-registry-hooks/yarn.deploy.lock b/packages/voter-stake-registry-hooks/yarn.deploy.lock index 05526e8fc..2709aab91 100644 --- a/packages/voter-stake-registry-hooks/yarn.deploy.lock +++ b/packages/voter-stake-registry-hooks/yarn.deploy.lock @@ -275,17 +275,17 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/modular-governance-idls@npm:0.0.8-next.16" +"@helium/modular-governance-idls@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/modular-governance-idls@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@solana/web3.js": ^1.78.4 - checksum: 4b47ba247a3cd5e90971a99b034c6a0063e15406abeac9d879b63f14824049a3bfb18978486ca5b129f9efbef93d91474842ec1e3d73a7c109851b354a72dee4 + checksum: 1c45344f0f5cfcc5880459a65691152d4ad55e1f6262d5799d3070e555e51ebad58373c5cd7e8a1c1840c29cb4f09ad3d55256f8e561738040dd783fcf361de4 languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -295,15 +295,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -380,7 +380,7 @@ __metadata: "@helium/helium-react-hooks": ^0.7.6 "@helium/helium-sub-daos-sdk": ^0.7.6 "@helium/modular-governance-hooks": ^0.0.8 - "@helium/modular-governance-idls": 0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@helium/voter-stake-registry-sdk": ^0.7.6 "@solana/wallet-adapter-base": ^0.9.22 @@ -405,7 +405,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -761,8 +761,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -779,7 +779,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/voter-stake-registry-sdk/package.json b/packages/voter-stake-registry-sdk/package.json index db0006c16..4dbc6e99e 100644 --- a/packages/voter-stake-registry-sdk/package.json +++ b/packages/voter-stake-registry-sdk/package.json @@ -34,7 +34,7 @@ "@coral-xyz/anchor": "^0.28.0", "@helium/anchor-resolvers": "^0.7.6", "@helium/idls": "^0.7.6", - "@helium/nft-proxy-sdk": "0.0.8-next.16+ace2c47", + "@helium/nft-proxy-sdk": "0.0.8-next.17+7ff2115", "@helium/spl-utils": "^0.7.6", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", diff --git a/packages/voter-stake-registry-sdk/yarn.deploy.lock b/packages/voter-stake-registry-sdk/yarn.deploy.lock index dcb6cf526..5a04043a8 100644 --- a/packages/voter-stake-registry-sdk/yarn.deploy.lock +++ b/packages/voter-stake-registry-sdk/yarn.deploy.lock @@ -129,7 +129,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -139,15 +139,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -180,7 +180,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -398,8 +398,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -416,7 +416,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/vsr-metadata-service/yarn.deploy.lock b/packages/vsr-metadata-service/yarn.deploy.lock index c37925f0e..f1e2cce7f 100644 --- a/packages/vsr-metadata-service/yarn.deploy.lock +++ b/packages/vsr-metadata-service/yarn.deploy.lock @@ -173,7 +173,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -183,15 +183,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -224,7 +224,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -469,8 +469,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -487,7 +487,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/packages/xnft-hotspot/yarn.deploy.lock b/packages/xnft-hotspot/yarn.deploy.lock index e18c4ab3c..5a1ff241e 100644 --- a/packages/xnft-hotspot/yarn.deploy.lock +++ b/packages/xnft-hotspot/yarn.deploy.lock @@ -545,7 +545,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -555,15 +555,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -645,7 +645,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -2257,8 +2257,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -2275,7 +2275,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard diff --git a/tests/voter-stake-registry.ts b/tests/voter-stake-registry.ts index 5bc8b5d76..c669cc8d2 100644 --- a/tests/voter-stake-registry.ts +++ b/tests/voter-stake-registry.ts @@ -125,18 +125,25 @@ describe("voter-stake-registry", () => { me ); + console.log("heheh"); ({ pubkeys: { proxyConfig }, } = await proxyProgram.methods .initializeProxyConfigV0({ maxProxyTime: new anchor.BN(1000000000000), name: random(10), - seasons: [new anchor.BN(new Date().valueOf() / 1000 + 100000)], + seasons: [ + { + start: new anchor.BN(0), + end: new anchor.BN(new Date().valueOf() / 1000 + 100000), + }, + ], }) .accounts({ authority: me, }) .rpcAndKeys()); + console.log("hohoho") const { instruction: createRegistrar, @@ -602,9 +609,8 @@ describe("voter-stake-registry", () => { await proxyProgram.account.proxyV0.fetch(myProxy) ).nextOwner.toBase58() ).to.eq(PublicKey.default.toBase58()); - expect( - await proxyProgram.account.proxyV0.fetchNullable(toUnProxy) - ).to.be.null; + expect(await proxyProgram.account.proxyV0.fetchNullable(toUnProxy)).to + .be.null; }); }); diff --git a/yarn.lock b/yarn.lock index f52986148..11bedd7b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -808,7 +808,7 @@ __metadata: "@helium/proposal-sdk": ^0.0.8 "@helium/rewards-oracle-sdk": ^0.7.6 "@helium/spl-utils": ^0.7.6 - "@helium/state-controller-sdk": 0.0.8-next.16+ace2c47 + "@helium/state-controller-sdk": 0.0.8-next.17+7ff2115 "@helium/treasury-management-sdk": ^0.7.6 "@helium/voter-stake-registry-sdk": ^0.7.6 "@solana/spl-token": ^0.3.8 @@ -1037,7 +1037,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.7.6 "@helium/lazy-distributor-sdk": ^0.7.6 "@helium/mobile-entity-manager-sdk": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/price-oracle-sdk": ^0.7.6 "@helium/spl-utils": ^0.7.6 "@helium/treasury-management-sdk": ^0.7.6 @@ -1395,13 +1395,13 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/modular-governance-idls@npm:0.0.8-next.16" +"@helium/modular-governance-idls@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/modular-governance-idls@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@solana/web3.js": ^1.78.4 - checksum: 4b47ba247a3cd5e90971a99b034c6a0063e15406abeac9d879b63f14824049a3bfb18978486ca5b129f9efbef93d91474842ec1e3d73a7c109851b354a72dee4 + checksum: 1c45344f0f5cfcc5880459a65691152d4ad55e1f6262d5799d3070e555e51ebad58373c5cd7e8a1c1840c29cb4f09ad3d55256f8e561738040dd783fcf361de4 languageName: node linkType: hard @@ -1415,7 +1415,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.16+ace2c47": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -1466,15 +1466,15 @@ __metadata: languageName: unknown linkType: soft -"@helium/nft-proxy-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.16" +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 "@solana/spl-token": ^0.3.8 - checksum: 8fc7d62a301c7e8e94bbe431a937f49de91012182481698287afb5e964537f33f0d12f08a779fa022d64847d763e17204c82a26f48a20c191aa2aec2e068d115 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 languageName: node linkType: hard @@ -1533,14 +1533,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/proposal-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/proposal-sdk@npm:0.0.8-next.16" +"@helium/proposal-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/proposal-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 - checksum: a8a73e6df03fb95a7caa7ecd37bbc8518e0ff0fc625bddc4996824f777a274ef79ac71c1ec59600b3b5242900c8aab8c86d0eef9e0e2b3c68bd0fcb25baaf668 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + checksum: 9b604a0030d0f30158706b92f1e67fbe75af69c1db6bb456345e6548c97b1a1960e271774f368d32509d61c9a8dcec3614f9e57d23f56714cba0beed02714468 languageName: node linkType: hard @@ -1653,14 +1653,14 @@ __metadata: languageName: node linkType: hard -"@helium/state-controller-sdk@npm:0.0.8-next.16+ace2c47": - version: 0.0.8-next.16 - resolution: "@helium/state-controller-sdk@npm:0.0.8-next.16" +"@helium/state-controller-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.17" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.16+ace2c47 - checksum: 2a7b703363f1078b428134e17f1805065e6fbcd9f7aca380c2e06b30c9e12928e1641985e1f4fdb86a17e7397dd8f0a84cbe06f4ffaae5d194900f03954ba842 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + checksum: e77e88e7e8c24fb52e07dd9dda76494a237e1ed69e429f10b0a2d501c45a3974528ccfff9f766e2c90dd5f8f196ba20d597cb9416977909df40840d300c5b85c languageName: node linkType: hard @@ -1747,7 +1747,7 @@ __metadata: "@helium/helium-react-hooks": ^0.7.6 "@helium/helium-sub-daos-sdk": ^0.7.6 "@helium/modular-governance-hooks": ^0.0.8 - "@helium/modular-governance-idls": 0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@helium/voter-stake-registry-sdk": ^0.7.6 "@solana/wallet-adapter-base": ^0.9.22 @@ -1772,7 +1772,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.6 "@helium/idls": ^0.7.6 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -5036,8 +5036,8 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.4 - resolution: "@solana/web3.js@npm:1.91.4" + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" dependencies: "@babel/runtime": ^7.23.4 "@noble/curves": ^1.2.0 @@ -5054,7 +5054,7 @@ __metadata: node-fetch: ^2.7.0 rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 9f6ac2f64ac05043cb367c09d5b4f4b859060618dbffc7a27da35fccdac0be9bd84b83899c9547efedc061fa7e20af283a9bacff01972bd047089809facfbdfe + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 languageName: node linkType: hard @@ -16209,9 +16209,9 @@ __metadata: "@coral-xyz/anchor-cli": ^0.28.0 "@coral-xyz/borsh": ^0.2.6 "@helium/crypto": ^4.10.2 - "@helium/modular-governance-idls": 0.0.8-next.16+ace2c47 - "@helium/nft-proxy-sdk": 0.0.8-next.16+ace2c47 - "@helium/proposal-sdk": 0.0.8-next.16+ace2c47 + "@helium/modular-governance-idls": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/proposal-sdk": 0.0.8-next.17+7ff2115 "@helium/transactions": ^3.38.0 "@metaplex-foundation/mpl-bubblegum": ^0.7.0 "@pythnetwork/client": ^2.8.0 From 015fd87fa35909cb9cbe9730a04ba795dc94d1fc Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Thu, 2 May 2024 10:08:57 -0500 Subject: [PATCH 018/130] WIP --- Anchor.toml | 12 ++ .../src/utils/defineIdlModels.ts | 62 +++--- .../src/utils/solana.ts | 1 + .../vote_service_example.json | 2 +- packages/helium-vote-service/.env | 2 +- packages/helium-vote-service/package.json | 6 +- packages/helium-vote-service/src/index.ts | 58 +++--- packages/helium-vote-service/src/model.ts | 14 +- packages/helium-vote-service/yarn.deploy.lock | 178 +++++++++++++----- packages/spl-utils/src/constants.ts | 19 +- .../src/contexts/heliumVsrContext.tsx | 160 ++++++++-------- .../src/hooks/useAssignProxies.ts | 22 ++- .../src/hooks/useUnassignProxies.ts | 32 ++-- .../src/hooks/useVotingDelegatedTo.ts | 43 ----- .../voter-stake-registry-hooks/src/index.ts | 5 +- .../voter-stake-registry-sdk/src/index.ts | 6 +- .../src/voteService.ts | 48 +++-- scripts/bootstrap.sh | 6 +- yarn.lock | 73 +------ 19 files changed, 385 insertions(+), 364 deletions(-) delete mode 100644 packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts diff --git a/Anchor.toml b/Anchor.toml index 1d65fba9e..914f8982a 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -82,6 +82,18 @@ address = "nprx42sXf5rpVnwBWEdRg1d8tuCWsTuVLys1pRWwE6p" # NFT Proxy [[test.validator.clone]] address = "CNjepJnCPddZwd8xGS3M2QpZuCbfVRNvi3jfBehKHKHw" # NFT Proxy IDL +[[test.validator.clone]] +address = "orgdXvHVLkWgBYerptASkAwkZAE563CJUu717dMNx5f" # Org program + +[[test.validator.clone]] +address = "CjVhwk3gdDXB8iUZCUP9M6QaRvoBGkM7FX9qAf6Qm4sG" # Org program IDL + +[[test.validator.clone]] +address = "stcfiqW3fwD9QCd8Bqr1NBLrs7dftZHBQe7RiMMA4aM" # State controller program + +[[test.validator.clone]] +address = "GPQNABq6s63uqzHRwZN9e2GcxtzG4yLP5AnJer7DkB9E" # State controller IDL + [[test.validator.clone]] address = "JBaTytFv1CmGNkyNiLu16jFMXNZ49BGfy4bYAYZdkxg5" # Mobile price oracle diff --git a/packages/account-postgres-sink-service/src/utils/defineIdlModels.ts b/packages/account-postgres-sink-service/src/utils/defineIdlModels.ts index 881b95097..3dd8e7570 100644 --- a/packages/account-postgres-sink-service/src/utils/defineIdlModels.ts +++ b/packages/account-postgres-sink-service/src/utils/defineIdlModels.ts @@ -1,42 +1,42 @@ -import * as anchor from '@coral-xyz/anchor'; -import { camelize, underscore } from 'inflection'; -import { DataTypes, QueryTypes, Sequelize } from 'sequelize'; -import { Plugins, initPlugins } from '../plugins'; -import { IAccountConfig, IConfig } from '../types'; -import cachedIdlFetch from './cachedIdlFetch'; -import { provider } from './solana'; +import * as anchor from "@coral-xyz/anchor"; +import { camelize, underscore } from "inflection"; +import { DataTypes, QueryTypes, Sequelize } from "sequelize"; +import { Plugins, initPlugins } from "../plugins"; +import { IAccountConfig, IConfig } from "../types"; +import cachedIdlFetch from "./cachedIdlFetch"; +import { provider } from "./solana"; const TypeMap = new Map([ - ['string', DataTypes.STRING], - ['publicKey', DataTypes.STRING], - ['i16', DataTypes.INTEGER], - ['u8', DataTypes.INTEGER.UNSIGNED], - ['i16', DataTypes.INTEGER], - ['u16', DataTypes.INTEGER.UNSIGNED], - ['i32', DataTypes.INTEGER], - ['u32', DataTypes.INTEGER.UNSIGNED], - ['i64', DataTypes.DECIMAL], - ['u64', DataTypes.DECIMAL.UNSIGNED], - ['i128', DataTypes.DECIMAL], - ['u128', DataTypes.DECIMAL.UNSIGNED], - ['bool', DataTypes.BOOLEAN], - ['bytes', DataTypes.BLOB], + ["string", DataTypes.STRING], + ["publicKey", DataTypes.STRING], + ["i16", DataTypes.INTEGER], + ["u8", DataTypes.INTEGER.UNSIGNED], + ["i16", DataTypes.INTEGER], + ["u16", DataTypes.INTEGER.UNSIGNED], + ["i32", DataTypes.INTEGER], + ["u32", DataTypes.INTEGER.UNSIGNED], + ["i64", DataTypes.DECIMAL], + ["u64", DataTypes.DECIMAL.UNSIGNED], + ["i128", DataTypes.DECIMAL], + ["u128", DataTypes.DECIMAL.UNSIGNED], + ["bool", DataTypes.BOOLEAN], + ["bytes", DataTypes.BLOB], ]); const determineType = (type: string | object): any => { - if (typeof type === 'string' && TypeMap.has(type)) { + if (typeof type === "string" && TypeMap.has(type)) { return TypeMap.get(type); } - if (typeof type === 'object') { + if (typeof type === "object") { const [key, value] = Object.entries(type)[0]; - if (key === 'array' && Array.isArray(value)) { + if (key === "array" && Array.isArray(value)) { const [arrayType] = value; if (TypeMap.has(arrayType)) { return DataTypes.ARRAY(TypeMap.get(arrayType)); } - } else if (key === 'vec') { + } else if (key === "vec") { const vecType = value; return DataTypes.ARRAY(determineType(vecType)); } else { @@ -90,7 +90,7 @@ export const defineIdlModels = async ({ { underscored: true, updatedAt: false, - schema: underscore(accConfig.schema || 'public'), + schema: underscore(accConfig.schema || "public"), tableName: underscore(accConfig.table || acc.name), } ); @@ -104,7 +104,7 @@ export const defineIdlModels = async ({ ` SELECT column_name FROM information_schema.columns - WHERE table_schema = '${underscore(accConfig.schema || 'public')}' + WHERE table_schema = '${underscore(accConfig.schema || "public")}' AND table_name = '${underscore(accConfig.table || acc.name)}' `, { type: QueryTypes.SELECT } @@ -144,7 +144,13 @@ export const defineAllIdlModels = async ({ idl.accounts!.some(({ name }) => name === type) ) ) { - throw new Error('idl does not have every account type'); + throw new Error( + `idl does not have every account type ${ + config.accounts.find( + ({ type }) => !idl.accounts!.some(({ name }) => name === type) + )?.type + }` + ); } await defineIdlModels({ diff --git a/packages/account-postgres-sink-service/src/utils/solana.ts b/packages/account-postgres-sink-service/src/utils/solana.ts index c7dc0ab29..8a27e1a49 100644 --- a/packages/account-postgres-sink-service/src/utils/solana.ts +++ b/packages/account-postgres-sink-service/src/utils/solana.ts @@ -4,6 +4,7 @@ import { SOLANA_URL } from "../env"; anchor.setProvider(anchor.AnchorProvider.local(SOLANA_URL)); + export const provider = anchor.getProvider() as anchor.AnchorProvider; export const cache = new AccountFetchCache({ connection: provider.connection, diff --git a/packages/account-postgres-sink-service/vote_service_example.json b/packages/account-postgres-sink-service/vote_service_example.json index f4f993928..519e29a7b 100644 --- a/packages/account-postgres-sink-service/vote_service_example.json +++ b/packages/account-postgres-sink-service/vote_service_example.json @@ -11,7 +11,7 @@ { "programId": "nprx42sXf5rpVnwBWEdRg1d8tuCWsTuVLys1pRWwE6p", "accounts": [ - { "type": "DelegationV0", "table": "delegations", "schema": "public" } + { "type": "ProxyV0", "table": "proxy_assignments", "schema": "public" } ] }, { diff --git a/packages/helium-vote-service/.env b/packages/helium-vote-service/.env index c94d670fd..5785f49d0 100644 --- a/packages/helium-vote-service/.env +++ b/packages/helium-vote-service/.env @@ -1,3 +1,3 @@ -PGDATABASE=solana +PGDATABASE=postgres PGUSER=postgres PGPASSWORD=postgres diff --git a/packages/helium-vote-service/package.json b/packages/helium-vote-service/package.json index 3b9dcbf46..434aa298a 100644 --- a/packages/helium-vote-service/package.json +++ b/packages/helium-vote-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.6.2", + "version": "0.7.6", "description": "API for helium vote", "repository": { "type": "git", @@ -35,8 +35,8 @@ "@fastify/cors": "^8.1.1", "@fastify/static": "^6", "@helium/organization-sdk": "^0.0.5", - "@helium/spl-utils": "^0.6.2", - "@helium/voter-stake-registry-sdk": "^0.6.2", + "@helium/spl-utils": "^0.7.6", + "@helium/voter-stake-registry-sdk": "^0.7.6", "dotenv": "^16.0.3", "fastify": "^4.13.0", "sequelize": "^6.28.0", diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index e72b8d6ba..46e9d4cc1 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -1,24 +1,22 @@ import cors from "@fastify/cors"; +import fastifyStatic from "@fastify/static"; +import { organizationKey } from "@helium/organization-sdk"; +import { HNT_MINT, IOT_MINT, MOBILE_MINT } from "@helium/spl-utils"; import Fastify, { FastifyInstance } from "fastify"; import fs from "fs"; +import { camelCase, isPlainObject, mapKeys } from "lodash"; import path from "path"; import { Op } from "sequelize"; import { - Delegation, Position, - Proposal, Proxy, + ProxyAssignment, ProxyRegistrar, Registrar, - VoteMarker, sequelize, setRelations, } from "./model"; import { cloneRepo, readProxiesAndUpsert } from "./repo"; -import fastifyStatic from "@fastify/static"; -import { HNT_MINT, IOT_MINT, MOBILE_MINT } from "@helium/spl-utils"; -import { organizationKey } from "@helium/organization-sdk"; -import { camelCase, isPlainObject, mapKeys } from "lodash"; const server: FastifyInstance = Fastify({ logger: true, @@ -35,7 +33,7 @@ server.register(fastifyStatic, { server.get("/health", async () => { return { ok: true }; }); -server.get("/sync", async () => { +server.get("/v1/sync", async () => { await cloneRepo(); await readProxiesAndUpsert(); }); @@ -50,7 +48,7 @@ server.get<{ minIndex: number; position: string; }; -}>("/delegations", async (request, reply) => { +}>("/v1/proxy-assignments", async (request, reply) => { const { position, owner, @@ -70,7 +68,7 @@ server.get<{ const offset = (page - 1) * limit; - return Delegation.findAll({ + return ProxyAssignment.findAll({ where, offset, limit, @@ -93,7 +91,7 @@ server.get<{ server.get<{ Params: { registrar: string }; Querystring: { registrar: string; page: number; limit: number }; -}>("/registrars/:registrar/proxies", async (request, reply) => { +}>("/v1/registrars/:registrar/proxies", async (request, reply) => { const limit = Number(request.query.limit || 1000); // default limit const offset = Number((request.query.page || 1) - 1) * limit; const registrar = request.params.registrar; @@ -101,12 +99,12 @@ server.get<{ const proxies = await sequelize.query(` WITH - positions_with_delegations AS ( + positions_with_proxy_assignments AS ( SELECT * FROM positions_with_vetokens p - JOIN delegations d on d.asset = p.asset + JOIN proxy_assignments d on d.asset = p.asset AND d.next_owner = '11111111111111111111111111111111' WHERE registrar = ${escapedRegistrar} ), @@ -118,20 +116,20 @@ WITH WHERE registrar = ${escapedRegistrar} ), - proxies_with_delegations AS ( + proxies_with_assignments AS ( SELECT name, image, proxies.wallet as wallet, description, detail, - count(p.owner) as "numDelegations", + count(p.owner) as "numProxies", floor(sum(p.ve_tokens)) as "delegatedVeTokens", 100 * sum(p.ve_tokens) / (select total_vetokens from total_vetokens) as "percent" FROM proxies JOIN proxy_registrars pr ON pr.wallet = proxies.wallet - LEFT OUTER JOIN positions_with_delegations p ON p.owner = proxies.wallet + LEFT OUTER JOIN positions_with_proxy_assignments p ON p.owner = proxies.wallet WHERE pr.registrar = ${escapedRegistrar} GROUP BY name, @@ -141,8 +139,12 @@ WITH detail ) SELECT - * -FROM proxies_with_delegations + pa.*, + COUNT(vm.voter) as "numProposalsVoted", + MAX(vm.created_at) as "lastVotedAt" +FROM proxies_with_assignments pa +LEFT OUTER JOIN vote_markers vm ON vm.voter = pa.wallet +GROUP BY pa.name, pa.image, pa.wallet, pa.description, pa.detail, pa."numProxies", pa."delegatedVeTokens", pa.percent ORDER BY "delegatedVeTokens" DESC OFFSET ${offset} LIMIT ${limit}; @@ -152,7 +154,7 @@ LIMIT ${limit}; server.get<{ Params: { registrar: string; wallet: string }; -}>("/registrars/:registrar/proxies/:wallet", async (request, reply) => { +}>("/v1/registrars/:registrar/proxies/:wallet", async (request, reply) => { const registrar = request.params.registrar; const escapedRegistrar = sequelize.escape(registrar); const wallet = request.params.wallet; @@ -160,12 +162,12 @@ server.get<{ const proxies = await sequelize.query(` WITH - positions_with_delegations AS ( + positions_with_proxy_assignments AS ( SELECT * FROM positions_with_vetokens p - JOIN delegations d on d.asset = p.asset + JOIN proxy_assignments d on d.asset = p.asset AND d.next_owner = '11111111111111111111111111111111' WHERE registrar = ${escapedRegistrar} ), @@ -177,20 +179,20 @@ WITH WHERE registrar = ${escapedRegistrar} ), - proxies_with_delegations AS ( + proxies_with_assignments AS ( SELECT name, image, proxies.wallet as wallet, description, detail, - count(p.owner) as "numDelegations", + count(p.owner) as "numProxies", floor(sum(p.ve_tokens)) as "delegatedVeTokens", 100 * sum(p.ve_tokens) / (select total_vetokens from total_vetokens) as "percent" FROM proxies JOIN proxy_registrars pr ON pr.wallet = proxies.wallet - LEFT OUTER JOIN positions_with_delegations p ON p.owner = proxies.wallet + LEFT OUTER JOIN positions_with_proxy_assignments p ON p.owner = proxies.wallet WHERE pr.registrar = ${escapedRegistrar} AND proxies.wallet = ${escapedWallet} GROUP BY name, @@ -201,14 +203,14 @@ WITH ) SELECT * -FROM proxies_with_delegations +FROM proxies_with_assignments LIMIT 1 `); return proxies[0][0]; }); server.get<{ Params: { registrar: string }; Querystring: { query: string } }>( - "/registrars/:registrar/proxies/search", + "/v1/registrars/:registrar/proxies/search", async (request, reply) => { const query = request.query.query; const registrar = request.params.registrar; @@ -242,7 +244,7 @@ const ORG_IDS = { server.get<{ Params: { registrar: string; wallet: string }; Querystring: { limit: number; page: number }; -}>("/registrars/:registrar/votes/:wallet", async (request, reply) => { +}>("/v1/registrars/:registrar/votes/:wallet", async (request, reply) => { const wallet = sequelize.escape(request.params.wallet); const registrar = sequelize.escape(request.params.registrar); const limit = Number(request.query.limit || 1000); // default limit @@ -313,7 +315,7 @@ const start = async () => { await ProxyRegistrar.sync({ alter: true }); await Proxy.sync({ alter: true }); - setRelations() + setRelations(); // Read SQL file const sqlFilePath = path.join( __dirname, diff --git a/packages/helium-vote-service/src/model.ts b/packages/helium-vote-service/src/model.ts index e6a64c015..e3765e140 100644 --- a/packages/helium-vote-service/src/model.ts +++ b/packages/helium-vote-service/src/model.ts @@ -284,7 +284,7 @@ ProxyRegistrar.init( } ); -export class Delegation extends Model { +export class ProxyAssignment extends Model { declare address: string; declare owner: string; declare nextOwner: string; @@ -294,7 +294,7 @@ export class Delegation extends Model { declare rentRefund: string; declare bumpSeed: number; } -Delegation.init( +ProxyAssignment.init( { address: { type: DataTypes.STRING, @@ -311,8 +311,8 @@ Delegation.init( }, { sequelize, - modelName: "delegation", - tableName: "delegations", + modelName: "proxy_assignment", + tableName: "proxy_assignments", underscored: true, timestamps: false, } @@ -320,9 +320,9 @@ Delegation.init( export function setRelations() { - Delegation.belongsTo(Position, { foreignKey: "asset", targetKey: "asset" }); - Position.hasMany(Delegation, { foreignKey: "asset", sourceKey: "asset" }); - Proxy.hasMany(Delegation, { foreignKey: "owner", sourceKey: "wallet" }); + ProxyAssignment.belongsTo(Position, { foreignKey: "asset", targetKey: "asset" }); + Position.hasMany(ProxyAssignment, { foreignKey: "asset", sourceKey: "asset" }); + Proxy.hasMany(ProxyAssignment, { foreignKey: "owner", sourceKey: "wallet" }); ProxyRegistrar.hasMany(Proxy, { foreignKey: "wallet", sourceKey: "wallet" }); Proxy.hasMany(ProxyRegistrar, { foreignKey: "wallet", sourceKey: "wallet" }); } diff --git a/packages/helium-vote-service/yarn.deploy.lock b/packages/helium-vote-service/yarn.deploy.lock index 54c3339a4..596180fa9 100644 --- a/packages/helium-vote-service/yarn.deploy.lock +++ b/packages/helium-vote-service/yarn.deploy.lock @@ -14,6 +14,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.23.4": + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + languageName: node + linkType: hard + "@coral-xyz/anchor@npm:^0.28.0": version: 0.28.0 resolution: "@coral-xyz/anchor@npm:0.28.0" @@ -136,14 +145,16 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@npm:^0.6.42": - version: 0.6.42 - resolution: "@helium/account-fetch-cache@npm:0.6.42" +"@helium/account-fetch-cache@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: - "@solana/web3.js": ^1.78.4 - checksum: 76547e0d844a901dac8aee14a87e407cb8c9f615cd48d682dbaf9f6cca7c399a215af72803b15e5a41eafe8aac9eac749b7fb73b1c8652e5e681b4e1bfee0903 - languageName: node - linkType: hard + "@solana/web3.js": ^1.78.8 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft "@helium/address@npm:^4.10.2": version: 4.10.2 @@ -156,6 +167,20 @@ __metadata: languageName: node linkType: hard +"@helium/anchor-resolvers@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" + dependencies: + "@solana/spl-token": ^0.3.8 + "@solana/web3.js": ^1.78.8 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + peerDependencies: + "@coral-xyz/anchor": ^0.28.0 + languageName: unknown + linkType: soft + "@helium/anchor-resolvers@npm:^0.2.17": version: 0.2.21 resolution: "@helium/anchor-resolvers@npm:0.2.21" @@ -168,18 +193,6 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@npm:^0.6.42": - version: 0.6.42 - resolution: "@helium/anchor-resolvers@npm:0.6.42" - dependencies: - "@solana/spl-token": ^0.3.8 - "@solana/web3.js": ^1.78.4 - peerDependencies: - "@coral-xyz/anchor": ^0.28.0 - checksum: 25ceab8b1cb6a68fd95c5bf2d57f7a5faf5b473504d1e056588f0f6f8cf21401bb9edd84fb5df6d360af6198f1395d02f1a2e40b57f8da164677e8fb741d110a - languageName: node - linkType: hard - "@helium/helium-vote-service@workspace:.": version: 0.0.0-use.local resolution: "@helium/helium-vote-service@workspace:." @@ -187,8 +200,8 @@ __metadata: "@fastify/cors": ^8.1.1 "@fastify/static": ^6 "@helium/organization-sdk": ^0.0.5 - "@helium/spl-utils": ^0.6.2 - "@helium/voter-stake-registry-sdk": ^0.6.2 + "@helium/spl-utils": ^0.7.6 + "@helium/voter-stake-registry-sdk": ^0.7.6 "@types/bn.js": ^5.1.1 dotenv: ^16.0.3 fastify: ^4.13.0 @@ -202,18 +215,19 @@ __metadata: languageName: unknown linkType: soft -"@helium/idls@npm:^0.6.42": - version: 0.6.42 - resolution: "@helium/idls@npm:0.6.42" +"@helium/idls@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/idls@workspace:packages/idls" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@solana/web3.js": ^1.78.4 + "@solana/web3.js": ^1.78.8 bn.js: ^5.2.0 borsh: ^0.7.0 bs58: ^4.0.1 - checksum: 7285ccb1b171c2490f5d4071ff21d37c2ecccbd02d0499c007ee32b185c628b85c642cfcc3a020fe899434cbefcf45dbfacb69b9d6024c3be10576d43e9c2039 - languageName: node - linkType: hard + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft "@helium/modular-governance-idls@npm:^0.0.5": version: 0.0.5 @@ -225,6 +239,28 @@ __metadata: languageName: node linkType: hard +"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": + version: 0.0.8-next.17 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@solana/spl-token": ^0.3.8 + checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + languageName: node + linkType: hard + "@helium/organization-sdk@npm:^0.0.5": version: 0.0.5 resolution: "@helium/organization-sdk@npm:0.0.5" @@ -248,40 +284,47 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@npm:^0.6.2": - version: 0.6.42 - resolution: "@helium/spl-utils@npm:0.6.42" +"@helium/spl-utils@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.6.42 + "@helium/account-fetch-cache": ^0.7.6 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.6.42 + "@helium/anchor-resolvers": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 - "@solana/web3.js": ^1.78.4 + "@solana/web3.js": ^1.78.8 axios: ^1.5.0 bn.js: ^5.2.0 borsh: ^0.7.0 bs58: ^4.0.1 - checksum: 2b1bf38d34b4fe645fdf9b84efcd6ff06ba7bc2ba396fd3338258406809220e4a03073bd0e6ea370c8b6c1b085734b9c11c35258c2c5672951f01342c344d140 - languageName: node - linkType: hard + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft -"@helium/voter-stake-registry-sdk@npm:^0.6.2": - version: 0.6.42 - resolution: "@helium/voter-stake-registry-sdk@npm:0.6.42" +"@helium/voter-stake-registry-sdk@^0.7.6": + version: 0.0.0-use.local + resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.6.42 - "@helium/idls": ^0.6.42 + "@helium/anchor-resolvers": ^0.7.6 + "@helium/idls": ^0.7.6 + "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/spl-utils": ^0.7.6 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 bs58: ^4.0.1 - checksum: 64985aa25b29e05e24b624793bd2a925181228aa87a9f913215dfe380e42f3798e91d2353bba2c45df1a7953e40ed4c7c81574508cca84765306ba7f390a6b4f - languageName: node - linkType: hard + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + ts-node: ^10.9.1 + typescript: ^5.2.2 + languageName: unknown + linkType: soft "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 @@ -398,6 +441,15 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:^1.2.0": + version: 1.4.0 + resolution: "@noble/curves@npm:1.4.0" + dependencies: + "@noble/hashes": 1.4.0 + checksum: 0014ff561d16e98da4a57e2310a4015e4bdab3b1e1eafcd18d3f9b955c29c3501452ca5d702fddf8ca92d570bbeadfbe53fe16ebbd81a319c414f739154bb26b + languageName: node + linkType: hard + "@noble/hashes@npm:1.3.2, @noble/hashes@npm:^1.3.1": version: 1.3.2 resolution: "@noble/hashes@npm:1.3.2" @@ -405,6 +457,13 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": + version: 1.4.0 + resolution: "@noble/hashes@npm:1.4.0" + checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 + languageName: node + linkType: hard + "@npmcli/fs@npm:^3.1.0": version: 3.1.0 resolution: "@npmcli/fs@npm:3.1.0" @@ -433,7 +492,7 @@ __metadata: languageName: node linkType: hard -"@solana/buffer-layout@npm:^4.0.0": +"@solana/buffer-layout@npm:^4.0.0, @solana/buffer-layout@npm:^4.0.1": version: 4.0.1 resolution: "@solana/buffer-layout@npm:4.0.1" dependencies: @@ -494,6 +553,29 @@ __metadata: languageName: node linkType: hard +"@solana/web3.js@npm:^1.78.8": + version: 1.91.6 + resolution: "@solana/web3.js@npm:1.91.6" + dependencies: + "@babel/runtime": ^7.23.4 + "@noble/curves": ^1.2.0 + "@noble/hashes": ^1.3.3 + "@solana/buffer-layout": ^4.0.1 + agentkeepalive: ^4.5.0 + bigint-buffer: ^1.1.5 + bn.js: ^5.2.1 + borsh: ^0.7.0 + bs58: ^4.0.1 + buffer: 6.0.3 + fast-stable-stringify: ^1.0.0 + jayson: ^4.1.0 + node-fetch: ^2.7.0 + rpc-websockets: ^7.5.1 + superstruct: ^0.14.2 + checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + languageName: node + linkType: hard + "@tootallnate/once@npm:2": version: 2.0.0 resolution: "@tootallnate/once@npm:2.0.0" @@ -667,7 +749,7 @@ __metadata: languageName: node linkType: hard -"agentkeepalive@npm:^4.2.1, agentkeepalive@npm:^4.3.0": +"agentkeepalive@npm:^4.2.1, agentkeepalive@npm:^4.3.0, agentkeepalive@npm:^4.5.0": version: 4.5.0 resolution: "agentkeepalive@npm:4.5.0" dependencies: @@ -2245,7 +2327,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.12": +"node-fetch@npm:^2.6.12, node-fetch@npm:^2.7.0": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" dependencies: diff --git a/packages/spl-utils/src/constants.ts b/packages/spl-utils/src/constants.ts index 14400ac2a..917289063 100644 --- a/packages/spl-utils/src/constants.ts +++ b/packages/spl-utils/src/constants.ts @@ -1,14 +1,25 @@ import { PublicKey } from "@solana/web3.js"; -export const DC_MINT = new PublicKey("dcuc8Amr83Wz27ZkQ2K9NS6r8zRpf1J6cvArEBDZDmm"); +export const DC_MINT = new PublicKey( + "dcuc8Amr83Wz27ZkQ2K9NS6r8zRpf1J6cvArEBDZDmm" +); -export const HNT_MINT = new PublicKey("hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux"); +// export const HNT_MINT = new PublicKey("hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux"); +export const HNT_MINT = new PublicKey( + "APqAVo5q9erS8GaXcbJuy3Gx4ikuSzXjzY4SnyppPUm1" +); +// export const MOBILE_MINT = new PublicKey( +// "mb1eu7TzEc71KxDpsmsKoucSSuuoGLv1drys1oP2jh6" +// ); export const MOBILE_MINT = new PublicKey( - "mb1eu7TzEc71KxDpsmsKoucSSuuoGLv1drys1oP2jh6" + "CoQciaEADT77zudZQm4atzWjHmHcJKfzZBivbifHScvZ" ); -export const IOT_MINT = new PublicKey("iotEVVZLEywoTn1QdwNPddxPWszn3zFhEot3MfL9fns"); +// export const IOT_MINT = new PublicKey("iotEVVZLEywoTn1QdwNPddxPWszn3zFhEot3MfL9fns"); +export const IOT_MINT = new PublicKey( + "g69eEQjY4bv1UvjaeTUcaCNoJ6v8jSsjL3dojN6uC4B" +); // TODO: Replace with actual HNT feed export const HNT_PYTH_PRICE_FEED = new PublicKey( diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index 1b205f0cb..2f38d67cf 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -99,14 +99,19 @@ export const HeliumVsrStateProvider: React.FC<{ () => mint && getRegistrarKey(mint), [mint?.toBase58()] ); + const urlVoteService = useMemo(() => { + return heliumVoteUri && registrarKey + ? new VoteService({ + baseURL: heliumVoteUri, + registrar: registrarKey, + }) + : undefined; + }, [heliumVoteUri, registrarKey]); // Allow vote service either from native rpc or from api const { result: voteService } = useAsync(async () => { if (registrarKey) { - if (heliumVoteUri) { - return new VoteService({ - baseURL: heliumVoteUri, - registrar: registrarKey, - }); + if (urlVoteService) { + return urlVoteService; } else { const program = await init(provider as any); const nftProxyProgram = await initNftProxy(provider as any); @@ -117,7 +122,7 @@ export const HeliumVsrStateProvider: React.FC<{ }); } } - }, [provider, registrarKey]); + }, [provider, registrarKey, urlVoteService]); const args = useMemo( () => wallet && @@ -152,9 +157,9 @@ export const HeliumVsrStateProvider: React.FC<{ const proxyAccountsByAsset = useMemo(() => { return proxyAccounts?.reduce((acc, del) => { acc[del.asset.toBase58()] = del; - return acc - }, {} as Record) - }, [proxyAccounts]) + return acc; + }, {} as Record); + }, [proxyAccounts]); const myOwnedPositionsEndIdx = result?.positionKeys?.length; // Assume that my positions are a small amount, so we don't need to say they're static const { accounts: myPositions, loading: loadingMyPositions } = usePositions( @@ -169,82 +174,79 @@ export const HeliumVsrStateProvider: React.FC<{ ); const now = useSolanaUnixNow(60 * 5 * 1000); - const { - amountLocked, - votingPower, - positionsWithMeta, - amountProxyLocked, - } = useMemo(() => { - if (positions && registrar && delegatedAccounts && now) { - let amountLocked = new BN(0); - let amountProxyLocked = new BN(0); - let votingPower = new BN(0); - const mintCfgs = registrar?.votingMints; - const positionsWithMeta = positions - .map((position, idx) => { - if (position && position.info) { - const isDelegated = !!delegatedAccounts?.[idx]?.info; - const proxy = proxyAccountsByAsset?.[position.info.mint.toBase58()]; - const delegatedSubDao = isDelegated - ? delegatedAccounts[idx]?.info?.subDao - : null; - const hasRewards = isDelegated - ? delegatedAccounts[idx]!.info!.lastClaimedEpoch.add( - new BN(1) - ).lt(new BN(now).div(new BN(EPOCH_LENGTH))) - : false; + const { amountLocked, votingPower, positionsWithMeta, amountProxyLocked } = + useMemo(() => { + if (positions && registrar && delegatedAccounts && now) { + let amountLocked = new BN(0); + let amountProxyLocked = new BN(0); + let votingPower = new BN(0); + const mintCfgs = registrar?.votingMints; + const positionsWithMeta = positions + .map((position, idx) => { + if (position && position.info) { + const isDelegated = !!delegatedAccounts?.[idx]?.info; + const proxy = + proxyAccountsByAsset?.[position.info.mint.toBase58()]; + const delegatedSubDao = isDelegated + ? delegatedAccounts[idx]?.info?.subDao + : null; + const hasRewards = isDelegated + ? delegatedAccounts[idx]!.info!.lastClaimedEpoch.add( + new BN(1) + ).lt(new BN(now).div(new BN(EPOCH_LENGTH))) + : false; - const posVotingPower = calcPositionVotingPower({ - position: position?.info || null, - registrar, - unixNow: new BN(now), - }); + const posVotingPower = calcPositionVotingPower({ + position: position?.info || null, + registrar, + unixNow: new BN(now), + }); - const isProxiedToMe = idx >= (myOwnedPositionsEndIdx || 0); - if (isProxiedToMe) { - amountProxyLocked = amountProxyLocked.add( - position.info.amountDepositedNative - ); - } else { - amountLocked = amountLocked.add( - position.info.amountDepositedNative - ); - } + const isProxiedToMe = idx >= (myOwnedPositionsEndIdx || 0); + if (isProxiedToMe) { + amountProxyLocked = amountProxyLocked.add( + position.info.amountDepositedNative + ); + } else { + amountLocked = amountLocked.add( + position.info.amountDepositedNative + ); + } - votingPower = votingPower.add(posVotingPower); + votingPower = votingPower.add(posVotingPower); - return { - ...position.info, - pubkey: position?.publicKey, - isDelegated, - delegatedSubDao, - hasRewards, - hasGenesisMultiplier: position.info.genesisEnd.gt(new BN(now)), - votingPower: posVotingPower, - votingMint: mintCfgs[position.info.votingMintConfigIdx], - isProxiedToMe, - proxy, - } as PositionWithMeta; - } - }) - .filter(truthy); + return { + ...position.info, + pubkey: position?.publicKey, + isDelegated, + delegatedSubDao, + hasRewards, + hasGenesisMultiplier: position.info.genesisEnd.gt(new BN(now)), + votingPower: posVotingPower, + votingMint: mintCfgs[position.info.votingMintConfigIdx], + isProxiedToMe, + proxy, + } as PositionWithMeta; + } + }) + .filter(truthy); - return { - positionsWithMeta, - amountLocked, - votingPower, - amountProxyLocked, - }; - } + return { + positionsWithMeta, + amountLocked, + votingPower, + amountProxyLocked, + }; + } - return {}; - }, [ - myOwnedPositionsEndIdx, - positions, - registrar, - delegatedAccounts, - proxyAccounts, - ]); + return {}; + }, [ + myOwnedPositionsEndIdx, + positions, + registrar, + delegatedAccounts, + proxyAccounts, + ]); const sortedPositions = useMemo( () => diff --git a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts index 6bebdcb47..cb0ff6df5 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts @@ -3,15 +3,15 @@ import { PROGRAM_ID, init } from "@helium/nft-proxy-sdk"; import { Status, batchParallelInstructions, - sendInstructions, + batchParallelInstructionsWithPriorityFee, } from "@helium/spl-utils"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; +import BN from "bn.js"; import { useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { PositionWithMeta } from "../sdk/types"; -import BN from "bn.js"; -export const useVotingDelegatePositions = () => { +export const useAssignProxies = () => { const { provider, registrar, refetch } = useHeliumVsrState(); const { error, loading, execute } = useAsyncCallback( async ({ @@ -71,14 +71,16 @@ export const useVotingDelegatePositions = () => { if (onInstructions) { await onInstructions(instructions); } else { - await batchParallelInstructions({ + await batchParallelInstructionsWithPriorityFee( provider, instructions, - onProgress, - triesRemaining: 10, - extraSigners: [], - maxSignatureBatch, - }); + { + onProgress, + triesRemaining: 10, + extraSigners: [], + maxSignatureBatch, + } + ); } // Wait a couple seconds for changes to hit pg-sink @@ -90,6 +92,6 @@ export const useVotingDelegatePositions = () => { return { error, loading, - proxiedPositions: execute, + assignProxies: execute, }; }; diff --git a/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts index 0d4a9097e..cb9f2abfb 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts @@ -1,6 +1,11 @@ import { Program } from "@coral-xyz/anchor"; import { PROGRAM_ID, proxyKey, init } from "@helium/nft-proxy-sdk"; -import { truthy, batchParallelInstructions, Status } from "@helium/spl-utils"; +import { + truthy, + batchParallelInstructions, + Status, + batchParallelInstructionsWithPriorityFee, +} from "@helium/spl-utils"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; @@ -42,19 +47,16 @@ export const useUnassignProxies = () => { position.mint, provider.wallet.publicKey )[0]; - let proxy = - await nftProxyProgram.account.proxyV0.fetchNullable( - currentProxy - ); + let proxy = await nftProxyProgram.account.proxyV0.fetchNullable( + currentProxy + ); if (!proxy) { currentProxy = proxyKey( registrar.proxyConfig, position.mint, PublicKey.default )[0]; - proxy = await nftProxyProgram.account.proxyV0.fetch( - currentProxy - ); + proxy = await nftProxyProgram.account.proxyV0.fetch(currentProxy); } const toUndelegate = await voteService.getProxiesForWallet( position.pubkey, @@ -91,14 +93,16 @@ export const useUnassignProxies = () => { if (onInstructions) { await onInstructions(instructions); } else { - await batchParallelInstructions({ + await batchParallelInstructionsWithPriorityFee( provider, instructions, - onProgress, - triesRemaining: 10, - extraSigners: [], - maxSignatureBatch, - }); + { + onProgress, + triesRemaining: 10, + extraSigners: [], + maxSignatureBatch, + } + ); } // Wait a couple seconds for changes to hit pg-sink setTimeout(refetch, 2 * 1000); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts deleted file mode 100644 index 3ce1ec108..000000000 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotingDelegatedTo.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { PublicKey } from "@solana/web3.js"; -import { useHeliumVsrState } from "../contexts/heliumVsrContext"; -import { useMemo } from "react"; -import { PositionWithMeta } from "../sdk/types"; -import BN from "bn.js"; -import { calcPositionVotingPower } from "../utils/calcPositionVotingPower"; -import { getRegistrarKey } from "@helium/voter-stake-registry-sdk"; -import { useSolanaUnixNow } from "@helium/helium-react-hooks"; - -export function useProxiedTo(wallet?: PublicKey): { - positions?: PositionWithMeta[]; - votingPower?: BN; -} { - const { positions, registrar } = useHeliumVsrState(); - const now = useSolanaUnixNow(60 * 5 * 1000); - - const result = useMemo(() => { - if (wallet) { - return positions?.filter( - (position) => - position.proxy && - position.proxy.nextOwner.equals(wallet) - ); - } - }, [positions]); - const votingPower = useMemo(() => { - if (registrar && now) - return result?.reduce((acc, position) => { - const power = calcPositionVotingPower({ - position: position, - registrar, - unixNow: new BN(now), - }); - acc = acc.add(power); - return acc; - }, new BN(0)); - }, [result, registrar, now]); - - return { - positions: result, - votingPower, - }; -} diff --git a/packages/voter-stake-registry-hooks/src/index.ts b/packages/voter-stake-registry-hooks/src/index.ts index 2283aa920..c142740d3 100644 --- a/packages/voter-stake-registry-hooks/src/index.ts +++ b/packages/voter-stake-registry-hooks/src/index.ts @@ -21,9 +21,10 @@ export { useRegistrar } from "./hooks/useRegistrar"; export { calcLockupMultiplier } from "./utils/calcLockupMultiplier"; export { calcPositionVotingPower } from "./utils/calcPositionVotingPower"; export * from "./sdk/types"; -export { useVotingDelegatePositions } from "./hooks/useAssignProxies"; -export { useUnassignProxies as useVotingUndelegatePositions } from "./hooks/useUnassignProxies"; +export { useAssignProxies } from "./hooks/useAssignProxies"; +export { useUnassignProxies } from "./hooks/useUnassignProxies"; export { useProxies } from "./hooks/useProxies" +export { useProxiedTo } from "./hooks/useProxiedTo"; export { getPositionKeys } from "./utils/getPositionKeys"; export { getSubDaos } from "./utils/getSubDaos"; export { useVoteMarkers } from "./hooks/useVoteMarkers"; diff --git a/packages/voter-stake-registry-sdk/src/index.ts b/packages/voter-stake-registry-sdk/src/index.ts index 423fd531b..c6a70b33d 100644 --- a/packages/voter-stake-registry-sdk/src/index.ts +++ b/packages/voter-stake-registry-sdk/src/index.ts @@ -10,9 +10,9 @@ export * from "./resolvers"; export { VoteService } from "./voteService"; export type { ProposalWithVotes, - Proxy as Delegation, - Proxy, - EnhancedProxy, + ProxyAssignment as Delegation, + ProxyAssignment as Proxy, + EnhancedProxy as EnhancedProxy, EnhancedProxyData, } from "./voteService"; diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index 3962951dd..7a6c2ff1c 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -4,7 +4,7 @@ import { NftProxy } from "@helium/modular-governance-idls/lib/types/nft_proxy"; import { PublicKey } from "@solana/web3.js"; import axios, { AxiosInstance } from "axios"; -export type Proxy = { +export type ProxyAssignment = { owner: string; nextOwner: string; index: number; @@ -16,7 +16,7 @@ export type Proxy = { expirationTime: string; }; -export type ProxyDef = { +export type Proxy = { name: string; image: string; wallet: string; @@ -28,6 +28,9 @@ export type EnhancedProxyData = { numDelegations: string; delegatedVeTokens: string; percent: string; + numProposalsVoted: string; + numProxies: string; + lastVotedAt: Date | null; }; export type EnhancedProxy = Proxy & EnhancedProxyData; @@ -63,7 +66,7 @@ export class VoteService { private client: AxiosInstance | undefined; private program: Program | undefined; private nftProxyProgram: Program | undefined; - private registrar: PublicKey; + registrar: PublicKey; // Wrapper arÍound vsr bulk operations that either uses // an API or gPA calls @@ -84,13 +87,12 @@ export class VoteService { this.program = program; this.nftProxyProgram = nftProxyProgram; this.registrar = registrar; + + this.mapRoutes = this.mapRoutes.bind(this) } - getAssetUrl(baseUrl: string) { - return baseUrl.replace( - "./", - `${this.client!.getUri()}/helium-vote-proxies/` - ); + assetUrl(url: string) { + return url.replace("\.\/", `${this.client!.getUri()}/helium-vote-proxies/`); } async getVotesForWallet({ @@ -105,7 +107,7 @@ export class VoteService { if (this.client) { return ( await this.client.get( - `/registrars/${this.registrar.toBase58()}/votes/${wallet.toBase58()}`, + `/v1/registrars/${this.registrar.toBase58()}/votes/${wallet.toBase58()}`, { params: { limit, page }, } @@ -119,10 +121,10 @@ export class VoteService { async getProxiesForWallet( wallet: PublicKey, minProxyIndex: number = 0 - ): Promise { + ): Promise { if (this.client) { return ( - await this.client.get(`/proxies`, { + await this.client.get(`/v1/proxy-assignments`, { params: { limit: 10000, owner: wallet.toBase58(), @@ -172,10 +174,10 @@ export class VoteService { async getPositionProxies( position: PublicKey, minIndex: number - ): Promise { + ): Promise { if (this.client) { return ( - await this.client.get(`/proxys`, { + await this.client.get(`/v1/proxy-assignments`, { params: { limit: 10000, position, minIndex }, }) ).data; @@ -231,12 +233,12 @@ export class VoteService { throw new Error("This operation is not supported without an API"); } const response = await this.client.get( - `/registrars/${this.registrar.toBase58()}/proxies`, + `/v1/registrars/${this.registrar.toBase58()}/proxies`, { params: { page, limit }, } ); - return response.data; + return response.data.map(this.mapRoutes); } async getProxy(wallet: string): Promise { @@ -244,9 +246,9 @@ export class VoteService { throw new Error("This operation is not supported without an API"); } const response = await this.client.get( - `/registrars/${this.registrar.toBase58()}/proxies/${wallet}` + `/v1/registrars/${this.registrar.toBase58()}/proxies/${wallet}` ); - return response.data; + return this.mapRoutes(response.data); } async searchProxies({ query }: { query: string }): Promise { @@ -255,11 +257,19 @@ export class VoteService { } const response = await this.client.get( - `/registrar/${this.registrar.toBase58()}/proxies/search`, + `/v1/registrars/${this.registrar.toBase58()}/proxies/search`, { params: { query }, } ); - return response.data; + return response.data.map(this.mapRoutes); + } + + mapRoutes(data: T): T { + return { + ...data, + image: this.assetUrl(data.image), + detail: this.assetUrl(data.detail), + }; } } diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 6473c7fe8..acea1c6bd 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -38,20 +38,20 @@ echo "Using $RND for dao names" # init the dao and subdaos ./packages/helium-admin-cli/bin/helium-admin.js create-dao \ --hntPriceOracle 7moA1i5vQUpfDwSpK6Pw9s56ahB7WFGidtbL2ujWrVvm \ - --numHnt 200136852 --numHst 200000000 --numDc 2000000000000 --realmName "Helium DAO" -u $CLUSTER_URL + --numHnt 200136852 --numHst 200000000 --numDc 2000000000000 --realmName "Helium" -u $CLUSTER_URL ./packages/helium-admin-cli/bin/helium-admin.js create-subdao \ --hntPubkey $(solana address -k packages/helium-admin-cli/keypairs/hnt.json) \ -rewardsOracleUrl https://iot-oracle.oracle.test-helium.com \ -n IOT --subdaoKeypair packages/helium-admin-cli/keypairs/iot.json \ - --numTokens 100302580998 --startEpochRewards 65000000000 --realmName "Helium IOT SubDAO" --dcBurnAuthority $(solana address) -u $CLUSTER_URL --decimals 6 --delegatorRewardsPercent 6 \ + --numTokens 100302580998 --startEpochRewards 65000000000 --realmName "Helium IOT" --dcBurnAuthority $(solana address) -u $CLUSTER_URL --decimals 6 --delegatorRewardsPercent 6 \ --emissionSchedulePath ./packages/helium-admin-cli/emissions/iot.json ./packages/helium-admin-cli/bin/helium-admin.js create-subdao \ --hntPubkey $(solana address -k packages/helium-admin-cli/keypairs/hnt.json) \ -rewardsOracleUrl https://mobile-oracle.oracle.test-helium.com \ -n MOBILE --subdaoKeypair packages/helium-admin-cli/keypairs/mobile.json \ - --numTokens 100302580998 --startEpochRewards 66000000000 --realmName "Helium MOBILE SubDAO" --decimals 6 \ + --numTokens 100302580998 --startEpochRewards 66000000000 --realmName "Helium MOBILE" --decimals 6 \ --dcBurnAuthority $(solana address) -u $CLUSTER_URL --delegatorRewardsPercent 6 --emissionSchedulePath ./packages/helium-admin-cli/emissions/mobile.json # if test -f "./packages/helium-admin-cli/makers.json"; then diff --git a/yarn.lock b/yarn.lock index 11bedd7b0..1412cc5cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -637,15 +637,6 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@npm:^0.6.42": - version: 0.6.42 - resolution: "@helium/account-fetch-cache@npm:0.6.42" - dependencies: - "@solana/web3.js": ^1.78.4 - checksum: 76547e0d844a901dac8aee14a87e407cb8c9f615cd48d682dbaf9f6cca7c399a215af72803b15e5a41eafe8aac9eac749b7fb73b1c8652e5e681b4e1bfee0903 - languageName: node - linkType: hard - "@helium/account-postgres-sink-service@workspace:packages/account-postgres-sink-service": version: 0.0.0-use.local resolution: "@helium/account-postgres-sink-service@workspace:packages/account-postgres-sink-service" @@ -761,18 +752,6 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@npm:^0.6.42": - version: 0.6.42 - resolution: "@helium/anchor-resolvers@npm:0.6.42" - dependencies: - "@solana/spl-token": ^0.3.8 - "@solana/web3.js": ^1.78.4 - peerDependencies: - "@coral-xyz/anchor": ^0.28.0 - checksum: 25ceab8b1cb6a68fd95c5bf2d57f7a5faf5b473504d1e056588f0f6f8cf21401bb9edd84fb5df6d360af6198f1395d02f1a2e40b57f8da164677e8fb741d110a - languageName: node - linkType: hard - "@helium/circuit-breaker-sdk@^0.7.6, @helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk": version: 0.0.0-use.local resolution: "@helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk" @@ -1151,8 +1130,8 @@ __metadata: "@fastify/cors": ^8.1.1 "@fastify/static": ^6 "@helium/organization-sdk": ^0.0.5 - "@helium/spl-utils": ^0.6.2 - "@helium/voter-stake-registry-sdk": ^0.6.2 + "@helium/spl-utils": ^0.7.6 + "@helium/voter-stake-registry-sdk": ^0.7.6 "@types/bn.js": ^5.1.1 dotenv: ^16.0.3 fastify: ^4.13.0 @@ -1224,19 +1203,6 @@ __metadata: languageName: node linkType: hard -"@helium/idls@npm:^0.6.42": - version: 0.6.42 - resolution: "@helium/idls@npm:0.6.42" - dependencies: - "@coral-xyz/anchor": ^0.28.0 - "@solana/web3.js": ^1.78.4 - bn.js: ^5.2.0 - borsh: ^0.7.0 - bs58: ^4.0.1 - checksum: 7285ccb1b171c2490f5d4071ff21d37c2ecccbd02d0499c007ee32b185c628b85c642cfcc3a020fe899434cbefcf45dbfacb69b9d6024c3be10576d43e9c2039 - languageName: node - linkType: hard - "@helium/lazy-distributor-sdk@^0.7.6, @helium/lazy-distributor-sdk@workspace:packages/lazy-distributor-sdk": version: 0.0.0-use.local resolution: "@helium/lazy-distributor-sdk@workspace:packages/lazy-distributor-sdk" @@ -1633,26 +1599,6 @@ __metadata: languageName: unknown linkType: soft -"@helium/spl-utils@npm:^0.6.2": - version: 0.6.42 - resolution: "@helium/spl-utils@npm:0.6.42" - dependencies: - "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.6.42 - "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.6.42 - "@metaplex-foundation/mpl-token-metadata": ^2.10.0 - "@solana/spl-account-compression": ^0.1.7 - "@solana/spl-token": ^0.3.8 - "@solana/web3.js": ^1.78.4 - axios: ^1.5.0 - bn.js: ^5.2.0 - borsh: ^0.7.0 - bs58: ^4.0.1 - checksum: 2b1bf38d34b4fe645fdf9b84efcd6ff06ba7bc2ba396fd3338258406809220e4a03073bd0e6ea370c8b6c1b085734b9c11c35258c2c5672951f01342c344d140 - languageName: node - linkType: hard - "@helium/state-controller-sdk@npm:0.0.8-next.17+7ff2115": version: 0.0.8-next.17 resolution: "@helium/state-controller-sdk@npm:0.0.8-next.17" @@ -1785,21 +1731,6 @@ __metadata: languageName: unknown linkType: soft -"@helium/voter-stake-registry-sdk@npm:^0.6.2": - version: 0.6.42 - resolution: "@helium/voter-stake-registry-sdk@npm:0.6.42" - dependencies: - "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.6.42 - "@helium/idls": ^0.6.42 - "@metaplex-foundation/mpl-token-metadata": ^2.10.0 - "@solana/spl-token": ^0.3.8 - bn.js: ^5.2.0 - bs58: ^4.0.1 - checksum: 64985aa25b29e05e24b624793bd2a925181228aa87a9f913215dfe380e42f3798e91d2353bba2c45df1a7953e40ed4c7c81574508cca84765306ba7f390a6b4f - languageName: node - linkType: hard - "@helium/vsr-metadata-service@workspace:packages/vsr-metadata-service": version: 0.0.0-use.local resolution: "@helium/vsr-metadata-service@workspace:packages/vsr-metadata-service" From 6af1019f8be259eaaa6d6ea9b3b998f9ebfc0e43 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Thu, 2 May 2024 10:09:05 -0500 Subject: [PATCH 019/130] WIP --- .../src/hooks/useProxiedTo.ts | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 packages/voter-stake-registry-hooks/src/hooks/useProxiedTo.ts diff --git a/packages/voter-stake-registry-hooks/src/hooks/useProxiedTo.ts b/packages/voter-stake-registry-hooks/src/hooks/useProxiedTo.ts new file mode 100644 index 000000000..722f9b628 --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/hooks/useProxiedTo.ts @@ -0,0 +1,42 @@ +import { useSolanaUnixNow } from "@helium/helium-react-hooks"; +import { PublicKey } from "@solana/web3.js"; +import BN from "bn.js"; +import { useMemo } from "react"; +import { useHeliumVsrState } from "../contexts/heliumVsrContext"; +import { PositionWithMeta } from "../sdk/types"; +import { calcPositionVotingPower } from "../utils/calcPositionVotingPower"; + +export function useProxiedTo(wallet?: PublicKey): { + positions?: PositionWithMeta[]; + votingPower?: BN; +} { + const { positions, registrar } = useHeliumVsrState(); + const now = useSolanaUnixNow(60 * 5 * 1000); + + const result = useMemo(() => { + if (wallet) { + return positions?.filter( + (position) => + position.proxy && + position.proxy.nextOwner.equals(wallet) + ); + } + }, [positions]); + const votingPower = useMemo(() => { + if (registrar && now) + return result?.reduce((acc, position) => { + const power = calcPositionVotingPower({ + position: position, + registrar, + unixNow: new BN(now), + }); + acc = acc.add(power); + return acc; + }, new BN(0)); + }, [result, registrar, now]); + + return { + positions: result, + votingPower, + }; +} From d6105953f9500a8e04d2761f7fb80a0ede83de5b Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Thu, 2 May 2024 12:27:14 -0500 Subject: [PATCH 020/130] Assign and unassign working --- packages/crons/yarn.deploy.lock | 16 +-- packages/data-credits-sdk/yarn.deploy.lock | 20 +-- packages/distributor-oracle/yarn.deploy.lock | 8 +- packages/entity-invalidator/yarn.deploy.lock | 8 +- .../helium-admin-cli/delegation-seasons.json | 9 -- packages/helium-admin-cli/package.json | 2 +- packages/helium-admin-cli/proxy-seasons.json | 8 ++ packages/helium-admin-cli/src/create-dao.ts | 15 +- packages/helium-admin-cli/yarn.deploy.lock | 28 ++-- .../yarn.deploy.lock | 8 +- packages/helium-sub-daos-sdk/yarn.deploy.lock | 20 +-- packages/helium-vote-service/package.json | 2 +- packages/helium-vote-service/yarn.deploy.lock | 18 +-- packages/hexboosting-sdk/yarn.deploy.lock | 20 +-- packages/hotspot-utils/yarn.deploy.lock | 8 +- packages/metadata-service/yarn.deploy.lock | 8 +- packages/migration-service/yarn.deploy.lock | 8 +- .../yarn.deploy.lock | 8 +- packages/monitor-service/yarn.deploy.lock | 8 +- packages/spl-utils/src/mplAssetAPI.ts | 32 +++++ .../voter-stake-registry-hooks/package.json | 2 +- .../src/contexts/heliumVsrContext.tsx | 12 +- .../src/hooks/useAssignProxies.ts | 55 +++++++- .../src/hooks/useUnassignProxies.ts | 2 +- .../src/utils/getPositionKeys.ts | 133 +++++++++++++----- .../yarn.deploy.lock | 10 +- .../voter-stake-registry-sdk/package.json | 2 +- .../src/voteService.ts | 61 +++++++- .../voter-stake-registry-sdk/yarn.deploy.lock | 18 +-- .../vsr-metadata-service/yarn.deploy.lock | 10 +- packages/xnft-hotspot/yarn.deploy.lock | 8 +- yarn.lock | 44 +++--- 32 files changed, 407 insertions(+), 204 deletions(-) delete mode 100644 packages/helium-admin-cli/delegation-seasons.json create mode 100644 packages/helium-admin-cli/proxy-seasons.json diff --git a/packages/crons/yarn.deploy.lock b/packages/crons/yarn.deploy.lock index ff555348c..a5b101bc5 100644 --- a/packages/crons/yarn.deploy.lock +++ b/packages/crons/yarn.deploy.lock @@ -204,11 +204,11 @@ __metadata: "@helium/organization-sdk": ^0.0.8 "@helium/price-oracle-sdk": ^0.7.12 "@helium/proposal-sdk": ^0.0.8 - "@helium/rewards-oracle-sdk": ^0.7.6 - "@helium/spl-utils": ^0.7.6 + "@helium/rewards-oracle-sdk": ^0.7.12 + "@helium/spl-utils": ^0.7.12 "@helium/state-controller-sdk": 0.0.8-next.17+7ff2115 - "@helium/treasury-management-sdk": ^0.7.6 - "@helium/voter-stake-registry-sdk": ^0.7.6 + "@helium/treasury-management-sdk": ^0.7.12 + "@helium/voter-stake-registry-sdk": ^0.7.12 "@solana/spl-token": ^0.3.8 "@solana/web3.js": ^1.78.8 "@types/bn.js": ^5.1.0 @@ -407,7 +407,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6": +"@helium/no-emit-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -532,10 +532,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/data-credits-sdk/yarn.deploy.lock b/packages/data-credits-sdk/yarn.deploy.lock index f517ba37c..8d5081340 100644 --- a/packages/data-credits-sdk/yarn.deploy.lock +++ b/packages/data-credits-sdk/yarn.deploy.lock @@ -67,7 +67,7 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@^0.7.6": +"@helium/account-fetch-cache@^0.7.12": version: 0.0.0-use.local resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: @@ -89,7 +89,7 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@^0.7.6": +"@helium/anchor-resolvers@^0.7.12": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" dependencies: @@ -115,7 +115,7 @@ __metadata: languageName: node linkType: hard -"@helium/circuit-breaker-sdk@^0.7.6": +"@helium/circuit-breaker-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk" dependencies: @@ -205,14 +205,14 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.7.6": +"@helium/spl-utils@^0.7.12": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.7.6 + "@helium/account-fetch-cache": ^0.7.12 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 @@ -227,7 +227,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/treasury-management-sdk@^0.7.6": +"@helium/treasury-management-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/treasury-management-sdk@workspace:packages/treasury-management-sdk" dependencies: @@ -249,10 +249,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/distributor-oracle/yarn.deploy.lock b/packages/distributor-oracle/yarn.deploy.lock index 736370935..e362ea9f9 100644 --- a/packages/distributor-oracle/yarn.deploy.lock +++ b/packages/distributor-oracle/yarn.deploy.lock @@ -334,7 +334,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6": +"@helium/no-emit-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -410,10 +410,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/entity-invalidator/yarn.deploy.lock b/packages/entity-invalidator/yarn.deploy.lock index 66b75072a..1e02cbbfd 100644 --- a/packages/entity-invalidator/yarn.deploy.lock +++ b/packages/entity-invalidator/yarn.deploy.lock @@ -264,7 +264,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6": +"@helium/no-emit-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -324,10 +324,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-admin-cli/delegation-seasons.json b/packages/helium-admin-cli/delegation-seasons.json deleted file mode 100644 index a09a6483a..000000000 --- a/packages/helium-admin-cli/delegation-seasons.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - "2024-08-01T00:00:00Z", - "2025-08-01T00:00:00Z", - "2026-08-01T00:00:00Z", - "2027-08-01T00:00:00Z", - "2028-08-01T00:00:00Z", - "2029-08-01T00:00:00Z", - "2030-08-01T00:00:00Z" -] diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index 05c55d906..532f118e7 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -43,13 +43,13 @@ "@helium/circuit-breaker-sdk": "^0.7.12", "@helium/crypto": "^4.10.2", "@helium/data-credits-sdk": "^0.7.12", - "@helium/nft-proxy-sdk": "0.0.8-next.17+7ff2115", "@helium/distributor-oracle": "^0.7.12", "@helium/fanout-sdk": "^0.7.12", "@helium/helium-entity-manager-sdk": "^0.7.12", "@helium/helium-sub-daos-sdk": "^0.7.12", "@helium/lazy-distributor-sdk": "^0.7.12", "@helium/mobile-entity-manager-sdk": "^0.7.12", + "@helium/nft-proxy-sdk": "0.0.8-next.17+7ff2115", "@helium/price-oracle-sdk": "^0.7.12", "@helium/spl-utils": "^0.7.12", "@helium/treasury-management-sdk": "^0.7.12", diff --git a/packages/helium-admin-cli/proxy-seasons.json b/packages/helium-admin-cli/proxy-seasons.json new file mode 100644 index 000000000..ddd6555a8 --- /dev/null +++ b/packages/helium-admin-cli/proxy-seasons.json @@ -0,0 +1,8 @@ +[ + { "start": "2023-07-01T00:00:00Z", "end": "2024-08-01T00:00:00Z" }, + { "start": "2024-07-01T00:00:00Z", "end": "2025-08-01T00:00:00Z" }, + { "start": "2025-07-01T00:00:00Z", "end": "2026-08-01T00:00:00Z" }, + { "start": "2026-07-01T00:00:00Z", "end": "2027-08-01T00:00:00Z" }, + { "start": "2027-07-01T00:00:00Z", "end": "2028-08-01T00:00:00Z" }, + { "start": "2028-07-01T00:00:00Z", "end": "2029-08-01T00:00:00Z" } +] diff --git a/packages/helium-admin-cli/src/create-dao.ts b/packages/helium-admin-cli/src/create-dao.ts index 779030eb7..9189ad60d 100644 --- a/packages/helium-admin-cli/src/create-dao.ts +++ b/packages/helium-admin-cli/src/create-dao.ts @@ -176,9 +176,9 @@ export async function run(args: any = process.argv) { describe: "Path to the merkle keypair", default: `${__dirname}/../../keypairs/data-only-merkle.json`, }, - delegationSeasonsFile: { + proxySeasonsFile: { type: "string", - default: `${__dirname}/../../delegation-seasons.json`, + default: `${__dirname}/../../proxy-seasons.json`, }, }); @@ -211,12 +211,15 @@ export async function run(args: any = process.argv) { console.log("DAO", dao.toString()); - const delegationSeasonsFile = fs.readFileSync( - argv.delegationSeasonsFile, + const proxySeasonsFile = fs.readFileSync( + argv.proxySeasonsFile, "utf8" ); - const seasons = JSON.parse(delegationSeasonsFile).map( - (s) => new anchor.BN(Math.floor(Date.parse(s) / 1000)) + const seasons = JSON.parse(proxySeasonsFile).map( + (s) => ({ + start: new anchor.BN(Math.floor(Date.parse(s.start) / 1000)), + end: new anchor.BN(Math.floor(Date.parse(s.end) / 1000)), + }) ); const conn = provider.connection; diff --git a/packages/helium-admin-cli/yarn.deploy.lock b/packages/helium-admin-cli/yarn.deploy.lock index a17aa7c56..d0cc4d758 100644 --- a/packages/helium-admin-cli/yarn.deploy.lock +++ b/packages/helium-admin-cli/yarn.deploy.lock @@ -318,17 +318,17 @@ __metadata: "@helium/address": ^4.10.2 "@helium/circuit-breaker-sdk": ^0.7.12 "@helium/crypto": ^4.10.2 - "@helium/data-credits-sdk": ^0.7.6 - "@helium/distributor-oracle": ^0.7.6 - "@helium/fanout-sdk": ^0.7.6 - "@helium/helium-entity-manager-sdk": ^0.7.6 - "@helium/helium-sub-daos-sdk": ^0.7.6 - "@helium/lazy-distributor-sdk": ^0.7.6 - "@helium/mobile-entity-manager-sdk": ^0.7.6 + "@helium/data-credits-sdk": ^0.7.12 + "@helium/distributor-oracle": ^0.7.12 + "@helium/fanout-sdk": ^0.7.12 + "@helium/helium-entity-manager-sdk": ^0.7.12 + "@helium/helium-sub-daos-sdk": ^0.7.12 + "@helium/lazy-distributor-sdk": ^0.7.12 + "@helium/mobile-entity-manager-sdk": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/price-oracle-sdk": ^0.7.6 - "@helium/spl-utils": ^0.7.6 - "@helium/treasury-management-sdk": ^0.7.6 + "@helium/price-oracle-sdk": ^0.7.12 + "@helium/spl-utils": ^0.7.12 + "@helium/treasury-management-sdk": ^0.7.12 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-governance": ^0.3.18 "@solana/spl-token": ^0.3.8 @@ -472,7 +472,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6": +"@helium/no-emit-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -563,10 +563,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-entity-manager-sdk/yarn.deploy.lock b/packages/helium-entity-manager-sdk/yarn.deploy.lock index 93029b632..dafcfab1e 100644 --- a/packages/helium-entity-manager-sdk/yarn.deploy.lock +++ b/packages/helium-entity-manager-sdk/yarn.deploy.lock @@ -233,7 +233,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6": +"@helium/no-emit-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -293,10 +293,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-sub-daos-sdk/yarn.deploy.lock b/packages/helium-sub-daos-sdk/yarn.deploy.lock index d15e98be8..1dcaec9a8 100644 --- a/packages/helium-sub-daos-sdk/yarn.deploy.lock +++ b/packages/helium-sub-daos-sdk/yarn.deploy.lock @@ -67,7 +67,7 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@^0.7.6": +"@helium/account-fetch-cache@^0.7.12": version: 0.0.0-use.local resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: @@ -89,7 +89,7 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@^0.7.6": +"@helium/anchor-resolvers@^0.7.12": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" dependencies: @@ -115,7 +115,7 @@ __metadata: languageName: node linkType: hard -"@helium/circuit-breaker-sdk@^0.7.6": +"@helium/circuit-breaker-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk" dependencies: @@ -185,14 +185,14 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.7.6": +"@helium/spl-utils@^0.7.12": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.7.6 + "@helium/account-fetch-cache": ^0.7.12 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 @@ -207,7 +207,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/treasury-management-sdk@^0.7.6": +"@helium/treasury-management-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/treasury-management-sdk@workspace:packages/treasury-management-sdk" dependencies: @@ -229,10 +229,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-vote-service/package.json b/packages/helium-vote-service/package.json index 434aa298a..720c8a714 100644 --- a/packages/helium-vote-service/package.json +++ b/packages/helium-vote-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.7.6", + "version": "0.7.12", "description": "API for helium vote", "repository": { "type": "git", diff --git a/packages/helium-vote-service/yarn.deploy.lock b/packages/helium-vote-service/yarn.deploy.lock index 596180fa9..dd83caf8f 100644 --- a/packages/helium-vote-service/yarn.deploy.lock +++ b/packages/helium-vote-service/yarn.deploy.lock @@ -145,7 +145,7 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@^0.7.6": +"@helium/account-fetch-cache@^0.7.12": version: 0.0.0-use.local resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: @@ -167,7 +167,7 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@^0.7.6": +"@helium/anchor-resolvers@^0.7.12": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" dependencies: @@ -215,7 +215,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/idls@^0.7.6": +"@helium/idls@^0.7.12": version: 0.0.0-use.local resolution: "@helium/idls@workspace:packages/idls" dependencies: @@ -284,14 +284,14 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.7.6": +"@helium/spl-utils@^0.7.12, @helium/spl-utils@^0.7.6": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.7.6 + "@helium/account-fetch-cache": ^0.7.12 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 @@ -311,10 +311,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/hexboosting-sdk/yarn.deploy.lock b/packages/hexboosting-sdk/yarn.deploy.lock index 4a391ab48..cad578c42 100644 --- a/packages/hexboosting-sdk/yarn.deploy.lock +++ b/packages/hexboosting-sdk/yarn.deploy.lock @@ -67,7 +67,7 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@^0.7.6": +"@helium/account-fetch-cache@^0.7.12": version: 0.0.0-use.local resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: @@ -89,7 +89,7 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@^0.7.6": +"@helium/anchor-resolvers@^0.7.12": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" dependencies: @@ -115,7 +115,7 @@ __metadata: languageName: node linkType: hard -"@helium/circuit-breaker-sdk@^0.7.6": +"@helium/circuit-breaker-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk" dependencies: @@ -202,14 +202,14 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.7.6": +"@helium/spl-utils@^0.7.12": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.7.6 + "@helium/account-fetch-cache": ^0.7.12 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 @@ -224,7 +224,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/treasury-management-sdk@^0.7.6": +"@helium/treasury-management-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/treasury-management-sdk@workspace:packages/treasury-management-sdk" dependencies: @@ -246,10 +246,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/hotspot-utils/yarn.deploy.lock b/packages/hotspot-utils/yarn.deploy.lock index 8bbab34e7..bdaccfc9e 100644 --- a/packages/hotspot-utils/yarn.deploy.lock +++ b/packages/hotspot-utils/yarn.deploy.lock @@ -247,7 +247,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6": +"@helium/no-emit-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -307,10 +307,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/metadata-service/yarn.deploy.lock b/packages/metadata-service/yarn.deploy.lock index aa4447149..79d899723 100644 --- a/packages/metadata-service/yarn.deploy.lock +++ b/packages/metadata-service/yarn.deploy.lock @@ -361,7 +361,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6": +"@helium/no-emit-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -421,10 +421,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/migration-service/yarn.deploy.lock b/packages/migration-service/yarn.deploy.lock index 5d99f1cd2..83fde8991 100644 --- a/packages/migration-service/yarn.deploy.lock +++ b/packages/migration-service/yarn.deploy.lock @@ -476,7 +476,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6": +"@helium/no-emit-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -552,10 +552,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/mobile-entity-manager-sdk/yarn.deploy.lock b/packages/mobile-entity-manager-sdk/yarn.deploy.lock index 9f63f83af..c10696264 100644 --- a/packages/mobile-entity-manager-sdk/yarn.deploy.lock +++ b/packages/mobile-entity-manager-sdk/yarn.deploy.lock @@ -251,7 +251,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6": +"@helium/no-emit-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -311,10 +311,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/monitor-service/yarn.deploy.lock b/packages/monitor-service/yarn.deploy.lock index 578e13735..a8822b1e3 100644 --- a/packages/monitor-service/yarn.deploy.lock +++ b/packages/monitor-service/yarn.deploy.lock @@ -362,7 +362,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6": +"@helium/no-emit-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -437,10 +437,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/spl-utils/src/mplAssetAPI.ts b/packages/spl-utils/src/mplAssetAPI.ts index 263501480..0accf6f7c 100644 --- a/packages/spl-utils/src/mplAssetAPI.ts +++ b/packages/spl-utils/src/mplAssetAPI.ts @@ -58,6 +58,11 @@ export async function getAsset( Expires: "0", }, }); + + if (response.data && response.data.error) { + throw new Error(response.data.error.message); + } + const result = response.data.result; if (result) { return toAsset(result); @@ -84,6 +89,11 @@ export async function getAssetBatch( Expires: "0", }, }); + + if (response.data && response.data.error) { + throw new Error(response.data.error.message); + } + const result = response.data.result; if (result) { return result.map(toAsset); @@ -126,6 +136,10 @@ export async function getAssets( data: JSON.stringify(batch), }); + if (response.data && response.data.error) { + throw new Error(response.data.error.message); + } + const result = response.data ? response.data.map((res: any) => res?.result || undefined) : []; @@ -205,6 +219,11 @@ export async function getAssetProof( Expires: "0", }, }); + + if (response.data && response.data.error) { + throw new Error(response.data.error.message); + } + const result = response.data.result; if (result) { return { @@ -237,6 +256,11 @@ export async function getAssetProofBatch( Expires: "0", }, }); + + if (response.data && response.data.error) { + throw new Error(response.data.error.message); + } + const result = response.data.result; if (result) { return Object.entries(result as Record).reduce( @@ -291,6 +315,10 @@ export async function getAssetsByOwner( }, }); + if (response.data && response.data.error) { + throw new Error(response.data.error.message); + } + return response.data.result?.items.map(toAsset); } catch (error) { console.error(error); @@ -366,6 +394,10 @@ export async function searchAssetsWithPageInfo( }, }); + if (response.data && response.data.error) { + throw new Error(response.data.error.message); + } + const ret = response.data.result; return { items: ret.items?.map(toAsset), diff --git a/packages/voter-stake-registry-hooks/package.json b/packages/voter-stake-registry-hooks/package.json index 1b4713398..14d9a94f2 100644 --- a/packages/voter-stake-registry-hooks/package.json +++ b/packages/voter-stake-registry-hooks/package.json @@ -38,8 +38,8 @@ "@helium/helium-react-hooks": "^0.7.12", "@helium/helium-sub-daos-sdk": "^0.7.12", "@helium/modular-governance-hooks": "^0.0.8", - "@helium/spl-utils": "^0.7.12", "@helium/modular-governance-idls": "0.0.8-next.17+7ff2115", + "@helium/spl-utils": "^0.7.12", "@helium/voter-stake-registry-sdk": "^0.7.12", "@solana/wallet-adapter-base": "^0.9.22", "@solana/wallet-adapter-react": "^0.15.32", diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index 2f38d67cf..4c33c79bb 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -155,8 +155,8 @@ export const HeliumVsrStateProvider: React.FC<{ const proxyAccounts = result?.proxies; const proxyAccountsByAsset = useMemo(() => { - return proxyAccounts?.reduce((acc, del) => { - acc[del.asset.toBase58()] = del; + return proxyAccounts?.reduce((acc, prox) => { + acc[prox.asset.toBase58()] = prox; return acc; }, {} as Record); }, [proxyAccounts]); @@ -165,12 +165,12 @@ export const HeliumVsrStateProvider: React.FC<{ const { accounts: myPositions, loading: loadingMyPositions } = usePositions( result?.positionKeys ); - // Delegated positions may be a lot, set to static - const { accounts: delegatedPositions, loading: loadingDelPositions } = + // Proxied positions may be a lot, set to static + const { accounts: proxiedPositions, loading: loadingDelPositions } = usePositions(result?.proxiedPositionKeys, true); const positions = useMemo( - () => [...(myPositions || []), ...(delegatedPositions || [])], - [myPositions, delegatedPositions] + () => [...(myPositions || []), ...(proxiedPositions || [])], + [myPositions, proxiedPositions] ); const now = useSolanaUnixNow(60 * 5 * 1000); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts index cb0ff6df5..3b80d47c4 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts @@ -1,9 +1,10 @@ import { Program } from "@coral-xyz/anchor"; -import { PROGRAM_ID, init } from "@helium/nft-proxy-sdk"; +import { PROGRAM_ID, init, proxyKey } from "@helium/nft-proxy-sdk"; import { Status, batchParallelInstructions, batchParallelInstructionsWithPriorityFee, + truthy, } from "@helium/spl-utils"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import BN from "bn.js"; @@ -12,7 +13,7 @@ import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { PositionWithMeta } from "../sdk/types"; export const useAssignProxies = () => { - const { provider, registrar, refetch } = useHeliumVsrState(); + const { provider, registrar, refetch, voteService } = useHeliumVsrState(); const { error, loading, execute } = useAsyncCallback( async ({ positions, @@ -40,11 +41,59 @@ export const useAssignProxies = () => { if (loading) return; - if (isInvalid || !nftProxyProgram || !registrar) { + if (isInvalid || !nftProxyProgram || !registrar || !voteService) { throw new Error("Unable to voting delegate, Invalid params"); } else { const instructions: TransactionInstruction[] = []; for (const position of positions) { + let currentProxy = proxyKey( + registrar.proxyConfig, + position.mint, + provider.wallet.publicKey + )[0]; + let proxy = await nftProxyProgram.account.proxyV0.fetchNullable( + currentProxy + ); + if (!proxy) { + currentProxy = proxyKey( + registrar.proxyConfig, + position.mint, + PublicKey.default + )[0]; + proxy = await nftProxyProgram.account.proxyV0.fetch(currentProxy); + } + if (proxy && !proxy.nextOwner?.equals(PublicKey.default)) { + const toUndelegate = + await voteService.getProxyAssignmentsForPosition( + position.pubkey, + proxy.index + ); + const ixs = ( + await Promise.all( + toUndelegate.map((proxy, index) => { + // Can't undelegate the 1st one (Pubkey.default) + if (index == toUndelegate.length - 1) { + return Promise.resolve(undefined); + } + + const prevProxy = new PublicKey( + toUndelegate[index + 1].address + ); + return nftProxyProgram.methods + .unassignProxyV0() + .accounts({ + asset: position.mint, + prevProxy, + currentProxy, + proxy: new PublicKey(proxy.address), + }) + .instruction(); + }) + ) + ).filter(truthy); + + instructions.push(...ixs); + } const { instruction, pubkeys: { nextProxy }, diff --git a/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts index cb9f2abfb..7de1d879f 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts @@ -58,7 +58,7 @@ export const useUnassignProxies = () => { )[0]; proxy = await nftProxyProgram.account.proxyV0.fetch(currentProxy); } - const toUndelegate = await voteService.getProxiesForWallet( + const toUndelegate = await voteService.getProxyAssignmentsForPosition( position.pubkey, proxy.index ); diff --git a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts index df84276e7..8e5710177 100644 --- a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts +++ b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts @@ -1,14 +1,20 @@ import { AnchorProvider } from "@coral-xyz/anchor"; -import { Asset, searchAssets } from "@helium/spl-utils"; +import { Asset, searchAssets, truthy } from "@helium/spl-utils"; +import { unpackAccount } from "@solana/spl-token"; import { VoteService, getRegistrarKey, init as initVsr, positionKey, } from "@helium/voter-stake-registry-sdk"; -import { PublicKey } from "@solana/web3.js"; +import { AccountInfo, Connection, PublicKey } from "@solana/web3.js"; import { BN } from "bn.js"; import { Proxy, Registrar } from "../sdk/types"; +import { TOKEN_PROGRAM_ID } from "@coral-xyz/anchor/dist/cjs/utils/token"; +import { + PROGRAM_ID as MPL_PID, + Metadata, +} from "@metaplex-foundation/mpl-token-metadata"; export interface GetPositionsArgs { wallet: PublicKey; @@ -22,12 +28,9 @@ export const getPositionKeys = async ( ): Promise<{ proxiedPositionKeys: PublicKey[]; positionKeys: PublicKey[]; - nfts: Asset[]; proxies: Proxy[]; }> => { const { mint, wallet, provider, voteService } = args; - const connection = provider.connection; - const me = wallet; const registrarPk = getRegistrarKey(mint); @@ -36,41 +39,79 @@ export const getPositionKeys = async ( registrarPk )) as Registrar; - const myProxies = await voteService.getProxiesForWallet(me); + const myProxies = await voteService.getProxyAssignmentsForWallet(me); const delegationPositions = myProxies.map( (del) => positionKey(new PublicKey(del.asset))[0] ); - let page = 1; - const limit = 1000; - let allAssets: Asset[] = []; - while (true) { - const assets = - (await searchAssets(provider.connection.rpcEndpoint, { - page, - limit, - ownerAddress: wallet.toBase58(), - tokenType: "fungible", - collection: registrar.collection.toBase58(), - })) || []; - allAssets = allAssets.concat(assets); + let positionKeys: PublicKey[] = []; + try { + let page = 1; + const limit = 1000; + let allAssets: Asset[] = []; + while (true) { + const assets = + (await searchAssets(provider.connection.rpcEndpoint, { + page, + limit, + ownerAddress: wallet.toBase58(), + tokenType: "fungible", + collection: registrar.collection.toBase58(), + })) || []; - if (assets.length < limit) { - break; - } + allAssets = allAssets.concat(assets); - page++; - } + if (assets.length < limit) { + break; + } - const positionKeys = allAssets - .filter((asset) => - asset.grouping?.find( - (group) => - group.group_key === "collection" && - group.group_value.equals(registrar.collection) + page++; + } + positionKeys = allAssets + .filter((asset) => + asset.grouping?.find( + (group) => + group.group_key === "collection" && + group.group_value.equals(registrar.collection) + ) + ) + .map((asset) => positionKey(asset.id)[0]); + } catch (e) { + // If DAS not supported + console.error(e); + const tokens = await provider.connection.getTokenAccountsByOwner(wallet, { + programId: TOKEN_PROGRAM_ID, + }); + const metadatas = ( + await getMultipleAccounts({ + connection: provider.connection, + keys: tokens.value.map( + (t) => + PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata", "utf-8"), + MPL_PID.toBuffer(), + unpackAccount( + t.pubkey, + t.account, + TOKEN_PROGRAM_ID + ).mint.toBuffer(), + ], + MPL_PID + )[0] + ), + }) + ).map((i) => i.account && Metadata.fromAccountInfo(i.account)[0]); + positionKeys = metadatas + .filter( + (m) => + m && + m.collection?.key.equals(registrar.collection) && + m.collection?.verified ) - ) - .map((asset) => positionKey(asset.id)[0]); + .filter(truthy) + .map((m) => positionKey(m.mint)[0]); + } return { positionKeys, @@ -84,8 +125,32 @@ export const getPositionKeys = async ( proxyConfig: new PublicKey(d.proxyConfig), index: d.index, bumpSeed: d.bumpSeed, - expirationTime: new BN(d.expirationTime) + expirationTime: new BN(d.expirationTime), })), - nfts: allAssets, }; }; + +async function getMultipleAccounts({ + connection, + keys, +}: { + connection: Connection; + keys: PublicKey[]; +}): Promise<{ pubkey: PublicKey; account: AccountInfo | null }[]> { + const batchSize = 100; + const batches = Math.ceil(keys.length / batchSize); + const results: { pubkey: PublicKey; account: AccountInfo | null }[] = + []; + + for (let i = 0; i < batches; i++) { + const batchKeys = keys.slice(i * batchSize, (i + 1) * batchSize); + const batchResults = await connection.getMultipleAccountsInfo(batchKeys, { + commitment: "confirmed", + }); + results.push( + ...batchResults.map((account, i) => ({ account, pubkey: batchKeys[i] })) + ); + } + + return results; +} diff --git a/packages/voter-stake-registry-hooks/yarn.deploy.lock b/packages/voter-stake-registry-hooks/yarn.deploy.lock index 3ce1bfc9b..4d2d3796e 100644 --- a/packages/voter-stake-registry-hooks/yarn.deploy.lock +++ b/packages/voter-stake-registry-hooks/yarn.deploy.lock @@ -381,8 +381,8 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.7.12 "@helium/modular-governance-hooks": ^0.0.8 "@helium/modular-governance-idls": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 - "@helium/voter-stake-registry-sdk": ^0.7.6 + "@helium/spl-utils": ^0.7.12 + "@helium/voter-stake-registry-sdk": ^0.7.12 "@solana/wallet-adapter-base": ^0.9.22 "@solana/wallet-adapter-react": ^0.15.32 "@solana/web3.js": ^1.78.8 @@ -403,10 +403,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/voter-stake-registry-sdk/package.json b/packages/voter-stake-registry-sdk/package.json index bb5225a28..f542a1b39 100644 --- a/packages/voter-stake-registry-sdk/package.json +++ b/packages/voter-stake-registry-sdk/package.json @@ -34,9 +34,9 @@ "@coral-xyz/anchor": "^0.28.0", "@helium/anchor-resolvers": "^0.7.12", "@helium/idls": "^0.7.12", - "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@helium/nft-proxy-sdk": "0.0.8-next.17+7ff2115", "@helium/spl-utils": "^0.7.12", + "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", "bn.js": "^5.2.0", "bs58": "^4.0.1" diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index 7a6c2ff1c..370878b90 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -88,11 +88,11 @@ export class VoteService { this.nftProxyProgram = nftProxyProgram; this.registrar = registrar; - this.mapRoutes = this.mapRoutes.bind(this) + this.mapRoutes = this.mapRoutes.bind(this); } assetUrl(url: string) { - return url.replace("\.\/", `${this.client!.getUri()}/helium-vote-proxies/`); + return url.replace("./", `${this.client!.getUri()}/helium-vote-proxies/`); } async getVotesForWallet({ @@ -118,7 +118,62 @@ export class VoteService { } } - async getProxiesForWallet( + async getProxyAssignmentsForPosition( + position: PublicKey, + minProxyIndex: number = 0 + ): Promise { + if (this.client) { + return ( + await this.client.get(`/v1/proxy-assignments`, { + params: { + limit: 10000, + asset: position.toBase58(), + minIndex: minProxyIndex, + }, + }) + ).data; + } + + if (this.nftProxyProgram && this.program) { + const registrar = await this.program.account.registrar.fetch( + this.registrar + ); + const positionAcc = await this.program.account.positionV0.fetch(position) + + return ( + await this.nftProxyProgram.account.proxyV0.all([ + { + memcmp: { + offset: 8 + 32 + 32, + bytes: positionAcc.mint.toBase58(), + }, + }, + { + memcmp: { + offset: 8 + 32, + bytes: registrar.proxyConfig.toBase58(), + }, + }, + ]) + ) + .sort((a, b) => b.account.index - a.account.index) + .map((a) => ({ + owner: a.account.owner.toBase58(), + nextOwner: a.account.nextOwner.toBase58(), + index: a.account.index, + address: a.publicKey.toBase58(), + asset: a.account.asset.toBase58(), + proxyConfig: a.account.proxyConfig.toBase58(), + rentRefund: a.account.rentRefund.toBase58(), + bumpSeed: a.account.bumpSeed, + expirationTime: a.account.expirationTime.toString(), + })); + } else { + throw new Error("No nft proxy program or api url"); + } + } + + async getProxyAssignmentsForWallet( wallet: PublicKey, minProxyIndex: number = 0 ): Promise { diff --git a/packages/voter-stake-registry-sdk/yarn.deploy.lock b/packages/voter-stake-registry-sdk/yarn.deploy.lock index 5a04043a8..bd56806e2 100644 --- a/packages/voter-stake-registry-sdk/yarn.deploy.lock +++ b/packages/voter-stake-registry-sdk/yarn.deploy.lock @@ -67,7 +67,7 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@^0.7.6": +"@helium/account-fetch-cache@^0.7.12": version: 0.0.0-use.local resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: @@ -89,7 +89,7 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@^0.7.6": +"@helium/anchor-resolvers@^0.7.12": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" dependencies: @@ -115,7 +115,7 @@ __metadata: languageName: node linkType: hard -"@helium/idls@^0.7.6": +"@helium/idls@^0.7.12": version: 0.0.0-use.local resolution: "@helium/idls@workspace:packages/idls" dependencies: @@ -151,14 +151,14 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.7.6": +"@helium/spl-utils@^0.7.12": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.7.6 + "@helium/account-fetch-cache": ^0.7.12 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 @@ -178,10 +178,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:." dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/vsr-metadata-service/yarn.deploy.lock b/packages/vsr-metadata-service/yarn.deploy.lock index 8728e33d4..d404bcce0 100644 --- a/packages/vsr-metadata-service/yarn.deploy.lock +++ b/packages/vsr-metadata-service/yarn.deploy.lock @@ -159,7 +159,7 @@ __metadata: languageName: node linkType: hard -"@helium/idls@^0.7.6": +"@helium/idls@^0.7.12": version: 0.0.0-use.local resolution: "@helium/idls@workspace:packages/idls" dependencies: @@ -195,7 +195,7 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.7.6": +"@helium/spl-utils@^0.7.12": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: @@ -222,10 +222,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/xnft-hotspot/yarn.deploy.lock b/packages/xnft-hotspot/yarn.deploy.lock index 00fd1d81f..dfa5fc1a4 100644 --- a/packages/xnft-hotspot/yarn.deploy.lock +++ b/packages/xnft-hotspot/yarn.deploy.lock @@ -567,7 +567,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6": +"@helium/no-emit-sdk@^0.7.12": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -643,10 +643,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/yarn.lock b/yarn.lock index c8a52ee0b..c8a201fe9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -785,11 +785,11 @@ __metadata: "@helium/organization-sdk": ^0.0.8 "@helium/price-oracle-sdk": ^0.7.12 "@helium/proposal-sdk": ^0.0.8 - "@helium/rewards-oracle-sdk": ^0.7.6 - "@helium/spl-utils": ^0.7.6 + "@helium/rewards-oracle-sdk": ^0.7.12 + "@helium/spl-utils": ^0.7.12 "@helium/state-controller-sdk": 0.0.8-next.17+7ff2115 - "@helium/treasury-management-sdk": ^0.7.6 - "@helium/voter-stake-registry-sdk": ^0.7.6 + "@helium/treasury-management-sdk": ^0.7.12 + "@helium/voter-stake-registry-sdk": ^0.7.12 "@solana/spl-token": ^0.3.8 "@solana/web3.js": ^1.78.8 "@types/bn.js": ^5.1.0 @@ -1009,17 +1009,17 @@ __metadata: "@helium/address": ^4.10.2 "@helium/circuit-breaker-sdk": ^0.7.12 "@helium/crypto": ^4.10.2 - "@helium/data-credits-sdk": ^0.7.6 - "@helium/distributor-oracle": ^0.7.6 - "@helium/fanout-sdk": ^0.7.6 - "@helium/helium-entity-manager-sdk": ^0.7.6 - "@helium/helium-sub-daos-sdk": ^0.7.6 - "@helium/lazy-distributor-sdk": ^0.7.6 - "@helium/mobile-entity-manager-sdk": ^0.7.6 + "@helium/data-credits-sdk": ^0.7.12 + "@helium/distributor-oracle": ^0.7.12 + "@helium/fanout-sdk": ^0.7.12 + "@helium/helium-entity-manager-sdk": ^0.7.12 + "@helium/helium-sub-daos-sdk": ^0.7.12 + "@helium/lazy-distributor-sdk": ^0.7.12 + "@helium/mobile-entity-manager-sdk": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/price-oracle-sdk": ^0.7.6 - "@helium/spl-utils": ^0.7.6 - "@helium/treasury-management-sdk": ^0.7.6 + "@helium/price-oracle-sdk": ^0.7.12 + "@helium/spl-utils": ^0.7.12 + "@helium/treasury-management-sdk": ^0.7.12 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-governance": ^0.3.18 "@solana/spl-token": ^0.3.8 @@ -1444,7 +1444,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.7.6, @helium/no-emit-sdk@workspace:packages/no-emit-sdk": +"@helium/no-emit-sdk@^0.7.12, @helium/no-emit-sdk@workspace:packages/no-emit-sdk": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -1577,7 +1577,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/spl-utils@^0.7.12, @helium/spl-utils@workspace:packages/spl-utils": +"@helium/spl-utils@^0.7.12, @helium/spl-utils@^0.7.6, @helium/spl-utils@workspace:packages/spl-utils": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: @@ -1694,8 +1694,8 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.7.12 "@helium/modular-governance-hooks": ^0.0.8 "@helium/modular-governance-idls": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 - "@helium/voter-stake-registry-sdk": ^0.7.6 + "@helium/spl-utils": ^0.7.12 + "@helium/voter-stake-registry-sdk": ^0.7.12 "@solana/wallet-adapter-base": ^0.9.22 "@solana/wallet-adapter-react": ^0.15.32 "@solana/web3.js": ^1.78.8 @@ -1711,15 +1711,15 @@ __metadata: languageName: unknown linkType: soft -"@helium/voter-stake-registry-sdk@^0.7.12, @helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk": +"@helium/voter-stake-registry-sdk@^0.7.12, @helium/voter-stake-registry-sdk@^0.7.6, @helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk": version: 0.0.0-use.local resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.6 - "@helium/idls": ^0.7.6 + "@helium/anchor-resolvers": ^0.7.12 + "@helium/idls": ^0.7.12 "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/spl-utils": ^0.7.6 + "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 From b70c8dd6d48305d03640791cc1df3111120d1625 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 3 May 2024 10:01:43 -0500 Subject: [PATCH 021/130] WIP before rename to proxy assignment --- packages/helium-vote-service/src/index.ts | 15 +++++++++++---- packages/voter-stake-registry-sdk/src/index.ts | 1 + .../voter-stake-registry-sdk/src/voteService.ts | 9 +++++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index 46e9d4cc1..0132dc0d7 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -123,7 +123,7 @@ WITH proxies.wallet as wallet, description, detail, - count(p.owner) as "numProxies", + count(p.owner) as "numAssignments", floor(sum(p.ve_tokens)) as "delegatedVeTokens", 100 * sum(p.ve_tokens) / (select total_vetokens from total_vetokens) as "percent" FROM @@ -144,7 +144,7 @@ SELECT MAX(vm.created_at) as "lastVotedAt" FROM proxies_with_assignments pa LEFT OUTER JOIN vote_markers vm ON vm.voter = pa.wallet -GROUP BY pa.name, pa.image, pa.wallet, pa.description, pa.detail, pa."numProxies", pa."delegatedVeTokens", pa.percent +GROUP BY pa.name, pa.image, pa.wallet, pa.description, pa.detail, pa."numAssignments", pa."delegatedVeTokens", pa.percent ORDER BY "delegatedVeTokens" DESC OFFSET ${offset} LIMIT ${limit}; @@ -186,7 +186,7 @@ WITH proxies.wallet as wallet, description, detail, - count(p.owner) as "numProxies", + count(p.owner) as "numAssignments", floor(sum(p.ve_tokens)) as "delegatedVeTokens", 100 * sum(p.ve_tokens) / (select total_vetokens from total_vetokens) as "percent" FROM @@ -200,10 +200,17 @@ WITH proxies.wallet, description, detail + ), + proxies_with_rank AS( + SELECT + pa.*, + COUNT(*) OVER () as "numProxies", + RANK() OVER (ORDER BY "delegatedVeTokens" DESC) as rank + FROM proxies_with_assignments pa ) SELECT * -FROM proxies_with_assignments +FROM proxies_with_rank LIMIT 1 `); return proxies[0][0]; diff --git a/packages/voter-stake-registry-sdk/src/index.ts b/packages/voter-stake-registry-sdk/src/index.ts index c6a70b33d..fbf7cd42f 100644 --- a/packages/voter-stake-registry-sdk/src/index.ts +++ b/packages/voter-stake-registry-sdk/src/index.ts @@ -13,6 +13,7 @@ export type { ProxyAssignment as Delegation, ProxyAssignment as Proxy, EnhancedProxy as EnhancedProxy, + WithRank, EnhancedProxyData, } from "./voteService"; diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index 370878b90..8a8c92e93 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -29,10 +29,15 @@ export type EnhancedProxyData = { delegatedVeTokens: string; percent: string; numProposalsVoted: string; - numProxies: string; + numAssignments: string; lastVotedAt: Date | null; }; +export type WithRank = { + numProxies: string; + rank: string; +} + export type EnhancedProxy = Proxy & EnhancedProxyData; export type Proposal = { @@ -296,7 +301,7 @@ export class VoteService { return response.data.map(this.mapRoutes); } - async getProxy(wallet: string): Promise { + async getProxy(wallet: string): Promise { if (!this.client) { throw new Error("This operation is not supported without an API"); } From 2b9035d5fbbe1f7609a0cde2749d1a11ba62e5f5 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 3 May 2024 16:13:55 -0500 Subject: [PATCH 022/130] Refactor to proxy assignment from proxy --- package.json | 6 +- .../yarn.deploy.lock | 54 ++++---- packages/account-fetch-cache/yarn.deploy.lock | 54 ++++---- .../vote_service_example.json | 2 +- .../yarn.deploy.lock | 50 ++++--- packages/anchor-resolvers/yarn.deploy.lock | 44 +++++-- packages/circuit-breaker-sdk/yarn.deploy.lock | 44 +++++-- packages/crons/package.json | 2 +- packages/crons/yarn.deploy.lock | 70 ++++++---- packages/currency-utils/yarn.deploy.lock | 44 +++++-- packages/data-credits-sdk/yarn.deploy.lock | 58 +++++--- packages/distributor-oracle/yarn.deploy.lock | 58 +++++--- packages/entity-invalidator/yarn.deploy.lock | 58 +++++--- .../fanout-metadata-service/yarn.deploy.lock | 44 +++++-- packages/fanout-sdk/yarn.deploy.lock | 44 +++++-- packages/faucet-service/yarn.deploy.lock | 44 +++++-- packages/helium-admin-cli/package.json | 2 +- packages/helium-admin-cli/yarn.deploy.lock | 60 ++++++--- .../yarn.deploy.lock | 58 +++++--- packages/helium-react-hooks/yarn.deploy.lock | 44 +++++-- packages/helium-sub-daos-sdk/yarn.deploy.lock | 58 +++++--- packages/helium-vote-service/src/index.ts | 24 ++-- packages/helium-vote-service/src/model.ts | 10 +- packages/helium-vote-service/yarn.deploy.lock | 58 +++++--- packages/hexboosting-sdk/yarn.deploy.lock | 58 +++++--- packages/hotspot-utils/yarn.deploy.lock | 58 +++++--- packages/idls/yarn.deploy.lock | 44 +++++-- .../lazy-distributor-sdk/yarn.deploy.lock | 44 +++++-- .../lazy-transactions-sdk/yarn.deploy.lock | 44 +++++-- packages/metadata-service/yarn.deploy.lock | 78 ++++++----- packages/migration-service/yarn.deploy.lock | 58 +++++--- .../yarn.deploy.lock | 58 +++++--- packages/monitor-service/yarn.deploy.lock | 58 +++++--- packages/price-oracle-sdk/yarn.deploy.lock | 44 +++++-- packages/rewards-oracle-sdk/yarn.deploy.lock | 44 +++++-- packages/spl-utils/yarn.deploy.lock | 44 +++++-- packages/sus/yarn.deploy.lock | 44 +++++-- .../tokens-to-rent-service/yarn.deploy.lock | 44 +++++-- .../treasury-management-sdk/yarn.deploy.lock | 44 +++++-- .../voter-stake-registry-hooks/package.json | 2 +- .../src/contexts/heliumVsrContext.tsx | 6 +- .../src/hooks/useAssignProxies.ts | 34 ++--- .../src/hooks/useProxiedTo.ts | 2 +- .../src/hooks/useProxies.ts | 6 +- .../src/hooks/useRelinquishVote.ts | 2 +- .../src/hooks/useUnassignProxies.ts | 22 ++-- .../src/hooks/useVote.ts | 4 +- .../voter-stake-registry-hooks/src/index.ts | 2 +- .../src/sdk/types.ts | 6 +- .../src/utils/getPositionKeys.ts | 4 +- .../yarn.deploy.lock | 68 ++++++---- .../voter-stake-registry-sdk/package.json | 2 +- .../voter-stake-registry-sdk/src/resolvers.ts | 10 +- .../src/voteService.ts | 24 ++-- .../voter-stake-registry-sdk/yarn.deploy.lock | 58 +++++--- .../vsr-metadata-service/yarn.deploy.lock | 58 +++++--- packages/xnft-hotspot/yarn.deploy.lock | 58 +++++--- .../proxied_relinquish_vote_v0.rs | 20 +-- .../src/instructions/proxied_vote_v0.rs | 20 +-- tests/voter-stake-registry.ts | 24 ++-- utils/nft-proxy/idl.json | 57 +++++--- yarn.lock | 124 ++++++++++-------- 62 files changed, 1510 insertions(+), 857 deletions(-) diff --git a/package.json b/package.json index a5261fcb9..e26c491e3 100644 --- a/package.json +++ b/package.json @@ -34,9 +34,9 @@ "@coral-xyz/anchor-cli": "^0.28.0", "@coral-xyz/borsh": "^0.2.6", "@helium/crypto": "^4.10.2", - "@helium/modular-governance-idls": "0.0.8-next.17+7ff2115", - "@helium/nft-proxy-sdk": "0.0.8-next.17+7ff2115", - "@helium/proposal-sdk": "0.0.8-next.17+7ff2115", + "@helium/modular-governance-idls": "0.0.8-next.19+4fa4c6b", + "@helium/nft-proxy-sdk": "0.0.8-next.19+4fa4c6b", + "@helium/proposal-sdk": "0.0.8-next.19+4fa4c6b", "@helium/transactions": "^3.38.0", "@metaplex-foundation/mpl-bubblegum": "^0.7.0", "@pythnetwork/client": "^2.8.0", diff --git a/packages/account-fetch-cache-hooks/yarn.deploy.lock b/packages/account-fetch-cache-hooks/yarn.deploy.lock index fdec0a881..a27b9a9ac 100644 --- a/packages/account-fetch-cache-hooks/yarn.deploy.lock +++ b/packages/account-fetch-cache-hooks/yarn.deploy.lock @@ -5,21 +5,12 @@ __metadata: version: 6 cacheKey: 8 -"@babel/runtime@npm:^7.17.2": - version: 7.22.11 - resolution: "@babel/runtime@npm:7.22.11" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: a5cd6683a8fcdb8065cb1677f221e22f6c67ec8f15ad1d273b180b93ab3bd86c66da2c48f500d4e72d8d2cfa85ff4872a3f350e5aa3855630036af5da765c001 - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -64,7 +55,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -73,7 +64,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -106,12 +97,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -122,9 +113,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1267,22 +1258,21 @@ __metadata: languageName: node linkType: hard -"rpc-websockets@npm:^7.5.1": - version: 7.6.0 - resolution: "rpc-websockets@npm:7.6.0" +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" dependencies: - "@babel/runtime": "npm:^7.17.2" - bufferutil: "npm:^4.0.1" - eventemitter3: "npm:^4.0.7" - utf-8-validate: "npm:^5.0.2" - uuid: "npm:^8.3.2" - ws: "npm:^8.5.0" + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 dependenciesMeta: bufferutil: optional: true utf-8-validate: optional: true - checksum: af2b254f65985610bd354e8e13de07b5a36010b94672b0b5a9d226b9bb1b8b17d01c63221cad97263845888f3610e55867a32e4c0017dfb92fddf89417c4cb6c + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 languageName: node linkType: hard diff --git a/packages/account-fetch-cache/yarn.deploy.lock b/packages/account-fetch-cache/yarn.deploy.lock index 5cecfb22a..54aa7e880 100644 --- a/packages/account-fetch-cache/yarn.deploy.lock +++ b/packages/account-fetch-cache/yarn.deploy.lock @@ -5,21 +5,12 @@ __metadata: version: 6 cacheKey: 8 -"@babel/runtime@npm:^7.17.2": - version: 7.22.11 - resolution: "@babel/runtime@npm:7.22.11" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: a5cd6683a8fcdb8065cb1677f221e22f6c67ec8f15ad1d273b180b93ab3bd86c66da2c48f500d4e72d8d2cfa85ff4872a3f350e5aa3855630036af5da765c001 - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -48,7 +39,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -57,7 +48,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -90,12 +81,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -106,9 +97,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1242,22 +1233,21 @@ __metadata: languageName: node linkType: hard -"rpc-websockets@npm:^7.5.1": - version: 7.6.0 - resolution: "rpc-websockets@npm:7.6.0" +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" dependencies: - "@babel/runtime": "npm:^7.17.2" - bufferutil: "npm:^4.0.1" - eventemitter3: "npm:^4.0.7" - utf-8-validate: "npm:^5.0.2" - uuid: "npm:^8.3.2" - ws: "npm:^8.5.0" + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 dependenciesMeta: bufferutil: optional: true utf-8-validate: optional: true - checksum: af2b254f65985610bd354e8e13de07b5a36010b94672b0b5a9d226b9bb1b8b17d01c63221cad97263845888f3610e55867a32e4c0017dfb92fddf89417c4cb6c + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 languageName: node linkType: hard diff --git a/packages/account-postgres-sink-service/vote_service_example.json b/packages/account-postgres-sink-service/vote_service_example.json index 519e29a7b..df65a17f4 100644 --- a/packages/account-postgres-sink-service/vote_service_example.json +++ b/packages/account-postgres-sink-service/vote_service_example.json @@ -11,7 +11,7 @@ { "programId": "nprx42sXf5rpVnwBWEdRg1d8tuCWsTuVLys1pRWwE6p", "accounts": [ - { "type": "ProxyV0", "table": "proxy_assignments", "schema": "public" } + { "type": "ProxyAssignmentV0", "table": "proxy_assignments", "schema": "public" } ] }, { diff --git a/packages/account-postgres-sink-service/yarn.deploy.lock b/packages/account-postgres-sink-service/yarn.deploy.lock index 2aead9160..3f0fe0405 100644 --- a/packages/account-postgres-sink-service/yarn.deploy.lock +++ b/packages/account-postgres-sink-service/yarn.deploy.lock @@ -23,19 +23,19 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard "@bufbuild/protobuf@npm:^1.7.2": - version: 1.8.0 - resolution: "@bufbuild/protobuf@npm:1.8.0" - checksum: 148755fce3cc28891a42c35a375596a3817710e2e8f4a452f034ffd988bbec1c9154135865b0b846f5f56765c93eb88cacc2f42af053925fb14f09b6a2b8c295 + version: 1.9.0 + resolution: "@bufbuild/protobuf@npm:1.9.0" + checksum: 2e276d3cf1367683e04a85fbb6fd361e29ec91cba0b6ab9dc3e2bfbbd886c7f781036ffcbabeb352951344a2004b93dbba2f2fdb5731c6e6967b36c804a22a8e languageName: node linkType: hard @@ -309,7 +309,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -325,7 +325,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -406,12 +406,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -422,9 +422,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -3432,6 +3432,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/anchor-resolvers/yarn.deploy.lock b/packages/anchor-resolvers/yarn.deploy.lock index 1fedb388b..e6eb20169 100644 --- a/packages/anchor-resolvers/yarn.deploy.lock +++ b/packages/anchor-resolvers/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -60,7 +60,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -76,7 +76,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -157,12 +157,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -173,9 +173,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1316,6 +1316,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/circuit-breaker-sdk/yarn.deploy.lock b/packages/circuit-breaker-sdk/yarn.deploy.lock index 2b14bab3b..e89c4b791 100644 --- a/packages/circuit-breaker-sdk/yarn.deploy.lock +++ b/packages/circuit-breaker-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -158,7 +158,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -174,7 +174,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -255,12 +255,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -271,9 +271,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1559,6 +1559,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/crons/package.json b/packages/crons/package.json index 4960d401e..8d0da85a5 100644 --- a/packages/crons/package.json +++ b/packages/crons/package.json @@ -46,7 +46,7 @@ "@helium/proposal-sdk": "^0.0.8", "@helium/rewards-oracle-sdk": "^0.7.12", "@helium/spl-utils": "^0.7.12", - "@helium/state-controller-sdk": "0.0.8-next.17+7ff2115", + "@helium/state-controller-sdk": "0.0.8-next.19+4fa4c6b", "@helium/treasury-management-sdk": "^0.7.12", "@helium/voter-stake-registry-sdk": "^0.7.12", "@solana/spl-token": "^0.3.8", diff --git a/packages/crons/yarn.deploy.lock b/packages/crons/yarn.deploy.lock index a5b101bc5..cf530d3ec 100644 --- a/packages/crons/yarn.deploy.lock +++ b/packages/crons/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -206,7 +206,7 @@ __metadata: "@helium/proposal-sdk": ^0.0.8 "@helium/rewards-oracle-sdk": ^0.7.12 "@helium/spl-utils": ^0.7.12 - "@helium/state-controller-sdk": 0.0.8-next.17+7ff2115 + "@helium/state-controller-sdk": 0.0.8-next.19+4fa4c6b "@helium/treasury-management-sdk": ^0.7.12 "@helium/voter-stake-registry-sdk": ^0.7.12 "@solana/spl-token": ^0.3.8 @@ -385,7 +385,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -395,15 +395,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -499,14 +499,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/state-controller-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/state-controller-sdk@npm:0.0.8-next.17" +"@helium/state-controller-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 - checksum: e77e88e7e8c24fb52e07dd9dda76494a237e1ed69e429f10b0a2d501c45a3974528ccfff9f766e2c90dd5f8f196ba20d597cb9416977909df40840d300c5b85c + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b + checksum: 51ac8d1151e7b02843e4ad437d7a20af03678198e67971698870ad1399f83ee976245df915998e9411310dc31d55f26ea7bc25f7235f20a20d573e0ff560a964 languageName: node linkType: hard @@ -534,7 +534,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -655,7 +655,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -671,7 +671,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -789,12 +789,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -805,9 +805,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -3491,6 +3491,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/currency-utils/yarn.deploy.lock b/packages/currency-utils/yarn.deploy.lock index 51d8bcf8a..510ab439e 100644 --- a/packages/currency-utils/yarn.deploy.lock +++ b/packages/currency-utils/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -91,7 +91,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -107,7 +107,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -201,12 +201,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -217,9 +217,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1348,6 +1348,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/data-credits-sdk/yarn.deploy.lock b/packages/data-credits-sdk/yarn.deploy.lock index 8d5081340..ffa446e20 100644 --- a/packages/data-credits-sdk/yarn.deploy.lock +++ b/packages/data-credits-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -183,7 +183,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -193,15 +193,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -251,7 +251,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -356,7 +356,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -372,7 +372,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -469,12 +469,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -485,9 +485,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1902,6 +1902,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/distributor-oracle/yarn.deploy.lock b/packages/distributor-oracle/yarn.deploy.lock index e362ea9f9..1173aa9d1 100644 --- a/packages/distributor-oracle/yarn.deploy.lock +++ b/packages/distributor-oracle/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -312,7 +312,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -322,15 +322,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -412,7 +412,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -533,7 +533,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -549,7 +549,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -667,12 +667,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -683,9 +683,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -3303,6 +3303,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/entity-invalidator/yarn.deploy.lock b/packages/entity-invalidator/yarn.deploy.lock index 1e02cbbfd..9ad25f712 100644 --- a/packages/entity-invalidator/yarn.deploy.lock +++ b/packages/entity-invalidator/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -242,7 +242,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -252,15 +252,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -326,7 +326,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -431,7 +431,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -447,7 +447,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -544,12 +544,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -560,9 +560,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -2729,6 +2729,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/fanout-metadata-service/yarn.deploy.lock b/packages/fanout-metadata-service/yarn.deploy.lock index 0f7a75909..5e9e1fa48 100644 --- a/packages/fanout-metadata-service/yarn.deploy.lock +++ b/packages/fanout-metadata-service/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -318,7 +318,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -334,7 +334,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -431,12 +431,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -447,9 +447,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -2446,6 +2446,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/fanout-sdk/yarn.deploy.lock b/packages/fanout-sdk/yarn.deploy.lock index 9fbc5b7d3..927722fda 100644 --- a/packages/fanout-sdk/yarn.deploy.lock +++ b/packages/fanout-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -158,7 +158,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -174,7 +174,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -255,12 +255,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -271,9 +271,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1559,6 +1559,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/faucet-service/yarn.deploy.lock b/packages/faucet-service/yarn.deploy.lock index c3a547cd6..fb8824306 100644 --- a/packages/faucet-service/yarn.deploy.lock +++ b/packages/faucet-service/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -302,7 +302,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -318,7 +318,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -415,12 +415,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -431,9 +431,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -2665,6 +2665,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index 532f118e7..0bfb4b5cb 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -49,7 +49,7 @@ "@helium/helium-sub-daos-sdk": "^0.7.12", "@helium/lazy-distributor-sdk": "^0.7.12", "@helium/mobile-entity-manager-sdk": "^0.7.12", - "@helium/nft-proxy-sdk": "0.0.8-next.17+7ff2115", + "@helium/nft-proxy-sdk": "0.0.8-next.19+4fa4c6b", "@helium/price-oracle-sdk": "^0.7.12", "@helium/spl-utils": "^0.7.12", "@helium/treasury-management-sdk": "^0.7.12", diff --git a/packages/helium-admin-cli/yarn.deploy.lock b/packages/helium-admin-cli/yarn.deploy.lock index d0cc4d758..b0158c57a 100644 --- a/packages/helium-admin-cli/yarn.deploy.lock +++ b/packages/helium-admin-cli/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -325,7 +325,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.7.12 "@helium/lazy-distributor-sdk": ^0.7.12 "@helium/mobile-entity-manager-sdk": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/price-oracle-sdk": ^0.7.12 "@helium/spl-utils": ^0.7.12 "@helium/treasury-management-sdk": ^0.7.12 @@ -450,7 +450,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -460,15 +460,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -565,7 +565,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -686,7 +686,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -702,7 +702,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -835,12 +835,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -851,9 +851,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -3622,6 +3622,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/helium-entity-manager-sdk/yarn.deploy.lock b/packages/helium-entity-manager-sdk/yarn.deploy.lock index dafcfab1e..8b5eb7152 100644 --- a/packages/helium-entity-manager-sdk/yarn.deploy.lock +++ b/packages/helium-entity-manager-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -211,7 +211,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -221,15 +221,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -295,7 +295,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -400,7 +400,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -416,7 +416,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -513,12 +513,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -529,9 +529,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1946,6 +1946,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/helium-react-hooks/yarn.deploy.lock b/packages/helium-react-hooks/yarn.deploy.lock index 98c678099..1cb18b056 100644 --- a/packages/helium-react-hooks/yarn.deploy.lock +++ b/packages/helium-react-hooks/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -131,7 +131,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -147,7 +147,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -366,12 +366,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -382,9 +382,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1680,6 +1680,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/helium-sub-daos-sdk/yarn.deploy.lock b/packages/helium-sub-daos-sdk/yarn.deploy.lock index 1dcaec9a8..6709d7554 100644 --- a/packages/helium-sub-daos-sdk/yarn.deploy.lock +++ b/packages/helium-sub-daos-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -163,7 +163,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -173,15 +173,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -231,7 +231,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -336,7 +336,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -352,7 +352,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -449,12 +449,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -465,9 +465,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1868,6 +1868,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index 0132dc0d7..60395e6be 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -43,23 +43,23 @@ server.get<{ Querystring: { page: number; limit: number; - owner: string; - nextOwner: string; + voter: string; + nextVoter: string; minIndex: number; position: string; }; }>("/v1/proxy-assignments", async (request, reply) => { const { position, - owner, - nextOwner, + voter: voter, + nextVoter, page = 1, limit = 1000, minIndex, } = request.query; const where: any = {}; - if (owner) where.owner = owner; - if (nextOwner) where.nextOwner = nextOwner; + if (voter) where.voter = voter; + if (nextVoter) where.nextVoter = nextVoter; if (typeof minIndex !== "undefined") { where.index = { [Op.gte]: minIndex, @@ -105,7 +105,7 @@ WITH FROM positions_with_vetokens p JOIN proxy_assignments d on d.asset = p.asset - AND d.next_owner = '11111111111111111111111111111111' + AND d.next_voter = '11111111111111111111111111111111' WHERE registrar = ${escapedRegistrar} ), total_vetokens as ( @@ -123,13 +123,13 @@ WITH proxies.wallet as wallet, description, detail, - count(p.owner) as "numAssignments", + count(p.voter) as "numAssignments", floor(sum(p.ve_tokens)) as "delegatedVeTokens", 100 * sum(p.ve_tokens) / (select total_vetokens from total_vetokens) as "percent" FROM proxies JOIN proxy_registrars pr ON pr.wallet = proxies.wallet - LEFT OUTER JOIN positions_with_proxy_assignments p ON p.owner = proxies.wallet + LEFT OUTER JOIN positions_with_proxy_assignments p ON p.voter = proxies.wallet WHERE pr.registrar = ${escapedRegistrar} GROUP BY name, @@ -168,7 +168,7 @@ WITH FROM positions_with_vetokens p JOIN proxy_assignments d on d.asset = p.asset - AND d.next_owner = '11111111111111111111111111111111' + AND d.next_voter = '11111111111111111111111111111111' WHERE registrar = ${escapedRegistrar} ), total_vetokens as ( @@ -186,13 +186,13 @@ WITH proxies.wallet as wallet, description, detail, - count(p.owner) as "numAssignments", + count(p.voter) as "numAssignments", floor(sum(p.ve_tokens)) as "delegatedVeTokens", 100 * sum(p.ve_tokens) / (select total_vetokens from total_vetokens) as "percent" FROM proxies JOIN proxy_registrars pr ON pr.wallet = proxies.wallet - LEFT OUTER JOIN positions_with_proxy_assignments p ON p.owner = proxies.wallet + LEFT OUTER JOIN positions_with_proxy_assignments p ON p.voter = proxies.wallet WHERE pr.registrar = ${escapedRegistrar} AND proxies.wallet = ${escapedWallet} GROUP BY name, diff --git a/packages/helium-vote-service/src/model.ts b/packages/helium-vote-service/src/model.ts index e3765e140..b2fe7d9c1 100644 --- a/packages/helium-vote-service/src/model.ts +++ b/packages/helium-vote-service/src/model.ts @@ -286,8 +286,8 @@ ProxyRegistrar.init( export class ProxyAssignment extends Model { declare address: string; - declare owner: string; - declare nextOwner: string; + declare voter: string; + declare nextVoter: string; declare index: number; declare asset: string; declare proxyConfig: string @@ -300,8 +300,8 @@ ProxyAssignment.init( type: DataTypes.STRING, primaryKey: true }, - owner: DataTypes.STRING, - nextOwner: DataTypes.STRING, + voter: DataTypes.STRING, + nextVoter: DataTypes.STRING, index: DataTypes.INTEGER, asset: DataTypes.STRING, proxyConfig: DataTypes.STRING, @@ -322,7 +322,7 @@ ProxyAssignment.init( export function setRelations() { ProxyAssignment.belongsTo(Position, { foreignKey: "asset", targetKey: "asset" }); Position.hasMany(ProxyAssignment, { foreignKey: "asset", sourceKey: "asset" }); - Proxy.hasMany(ProxyAssignment, { foreignKey: "owner", sourceKey: "wallet" }); + Proxy.hasMany(ProxyAssignment, { foreignKey: "voter", sourceKey: "wallet" }); ProxyRegistrar.hasMany(Proxy, { foreignKey: "wallet", sourceKey: "wallet" }); Proxy.hasMany(ProxyRegistrar, { foreignKey: "wallet", sourceKey: "wallet" }); } diff --git a/packages/helium-vote-service/yarn.deploy.lock b/packages/helium-vote-service/yarn.deploy.lock index dd83caf8f..8d1b67c38 100644 --- a/packages/helium-vote-service/yarn.deploy.lock +++ b/packages/helium-vote-service/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -239,7 +239,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -249,15 +249,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -313,7 +313,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -441,7 +441,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -457,7 +457,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -554,12 +554,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -570,9 +570,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -2726,6 +2726,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/hexboosting-sdk/yarn.deploy.lock b/packages/hexboosting-sdk/yarn.deploy.lock index cad578c42..5ddbe0a7f 100644 --- a/packages/hexboosting-sdk/yarn.deploy.lock +++ b/packages/hexboosting-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -180,7 +180,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -190,15 +190,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -248,7 +248,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -353,7 +353,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -369,7 +369,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -466,12 +466,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -482,9 +482,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1885,6 +1885,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/hotspot-utils/yarn.deploy.lock b/packages/hotspot-utils/yarn.deploy.lock index bdaccfc9e..c3945c798 100644 --- a/packages/hotspot-utils/yarn.deploy.lock +++ b/packages/hotspot-utils/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -225,7 +225,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -235,15 +235,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -309,7 +309,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -414,7 +414,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -430,7 +430,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -527,12 +527,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -543,9 +543,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1960,6 +1960,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/idls/yarn.deploy.lock b/packages/idls/yarn.deploy.lock index 6a91fdc5a..31e747099 100644 --- a/packages/idls/yarn.deploy.lock +++ b/packages/idls/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -95,7 +95,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -111,7 +111,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -167,12 +167,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -183,9 +183,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1383,6 +1383,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/lazy-distributor-sdk/yarn.deploy.lock b/packages/lazy-distributor-sdk/yarn.deploy.lock index fdc2aab39..f40207f64 100644 --- a/packages/lazy-distributor-sdk/yarn.deploy.lock +++ b/packages/lazy-distributor-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -174,7 +174,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -190,7 +190,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -271,12 +271,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -287,9 +287,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1575,6 +1575,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/lazy-transactions-sdk/yarn.deploy.lock b/packages/lazy-transactions-sdk/yarn.deploy.lock index 8481cbd83..0e6397975 100644 --- a/packages/lazy-transactions-sdk/yarn.deploy.lock +++ b/packages/lazy-transactions-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -249,7 +249,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -265,7 +265,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -362,12 +362,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -378,9 +378,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1781,6 +1781,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/metadata-service/yarn.deploy.lock b/packages/metadata-service/yarn.deploy.lock index 79d899723..4c3458452 100644 --- a/packages/metadata-service/yarn.deploy.lock +++ b/packages/metadata-service/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -112,26 +112,26 @@ __metadata: linkType: hard "@grpc/grpc-js@npm:^1.10.1": - version: 1.10.6 - resolution: "@grpc/grpc-js@npm:1.10.6" + version: 1.10.7 + resolution: "@grpc/grpc-js@npm:1.10.7" dependencies: - "@grpc/proto-loader": ^0.7.10 + "@grpc/proto-loader": ^0.7.13 "@js-sdsl/ordered-map": ^4.4.2 - checksum: 343d70ee435d6b4b82c72160d31a4749ac2621938f58328dd71df3013377665128c890df60e057fde381b12b83d34f802d586f7feb61d079793d89adfc0f40e8 + checksum: 69e88768e59b53ca020e2cfa9474fbd645f4ee7dd3269559c9fb91970273da6e8db480c0c439bdd73b49f1831d8f47c9bc5305dc5f9ed4db8873d53572e4f019 languageName: node linkType: hard -"@grpc/proto-loader@npm:^0.7.10": - version: 0.7.12 - resolution: "@grpc/proto-loader@npm:0.7.12" +"@grpc/proto-loader@npm:^0.7.13": + version: 0.7.13 + resolution: "@grpc/proto-loader@npm:0.7.13" dependencies: lodash.camelcase: ^4.3.0 long: ^5.0.0 - protobufjs: ^7.2.4 + protobufjs: ^7.2.5 yargs: ^17.7.2 bin: proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 5132b683b3f809417f46b421231ffa083d6300406d1276a12fc619d771b4f8e0e8ad5a935e0b381caaa9a57ef47630191dd2310b739d1be5aa90cc87b97fce0f + checksum: 399c1b8a4627f93dc31660d9636ea6bf58be5675cc7581e3df56a249369e5be02c6cd0d642c5332b0d5673bc8621619bc06fb045aa3e8f57383737b5d35930dc languageName: node linkType: hard @@ -339,7 +339,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -349,15 +349,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -423,7 +423,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -554,7 +554,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -570,7 +570,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -740,12 +740,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -756,9 +756,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -3152,7 +3152,7 @@ __metadata: languageName: node linkType: hard -"protobufjs@npm:^7.2.4": +"protobufjs@npm:^7.2.5": version: 7.2.6 resolution: "protobufjs@npm:7.2.6" dependencies: @@ -3361,6 +3361,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/migration-service/yarn.deploy.lock b/packages/migration-service/yarn.deploy.lock index 83fde8991..0e15deab7 100644 --- a/packages/migration-service/yarn.deploy.lock +++ b/packages/migration-service/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -454,7 +454,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -464,15 +464,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -554,7 +554,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -675,7 +675,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -691,7 +691,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -821,12 +821,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -837,9 +837,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -3716,6 +3716,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/mobile-entity-manager-sdk/yarn.deploy.lock b/packages/mobile-entity-manager-sdk/yarn.deploy.lock index c10696264..ca1a62044 100644 --- a/packages/mobile-entity-manager-sdk/yarn.deploy.lock +++ b/packages/mobile-entity-manager-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -229,7 +229,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -239,15 +239,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -313,7 +313,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -418,7 +418,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -434,7 +434,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -531,12 +531,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -547,9 +547,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1964,6 +1964,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/monitor-service/yarn.deploy.lock b/packages/monitor-service/yarn.deploy.lock index a8822b1e3..63523981d 100644 --- a/packages/monitor-service/yarn.deploy.lock +++ b/packages/monitor-service/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -299,7 +299,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -350,15 +350,15 @@ __metadata: languageName: unknown linkType: soft -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -439,7 +439,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -560,7 +560,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -576,7 +576,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -687,12 +687,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -703,9 +703,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -3186,6 +3186,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/price-oracle-sdk/yarn.deploy.lock b/packages/price-oracle-sdk/yarn.deploy.lock index be09c0cd0..835885238 100644 --- a/packages/price-oracle-sdk/yarn.deploy.lock +++ b/packages/price-oracle-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -143,7 +143,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -159,7 +159,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -215,12 +215,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -231,9 +231,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1512,6 +1512,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/rewards-oracle-sdk/yarn.deploy.lock b/packages/rewards-oracle-sdk/yarn.deploy.lock index f3c27db37..56ccadc5b 100644 --- a/packages/rewards-oracle-sdk/yarn.deploy.lock +++ b/packages/rewards-oracle-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -158,7 +158,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -174,7 +174,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -255,12 +255,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -271,9 +271,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1559,6 +1559,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/spl-utils/yarn.deploy.lock b/packages/spl-utils/yarn.deploy.lock index dbc221bf6..a2c61afc3 100644 --- a/packages/spl-utils/yarn.deploy.lock +++ b/packages/spl-utils/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -184,7 +184,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -200,7 +200,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -297,12 +297,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -313,9 +313,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1644,6 +1644,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/sus/yarn.deploy.lock b/packages/sus/yarn.deploy.lock index 4b363de05..1cd10c5a4 100644 --- a/packages/sus/yarn.deploy.lock +++ b/packages/sus/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -143,7 +143,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -159,7 +159,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -240,12 +240,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -256,9 +256,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1573,6 +1573,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/tokens-to-rent-service/yarn.deploy.lock b/packages/tokens-to-rent-service/yarn.deploy.lock index ec7b3df6d..a6870fc8f 100644 --- a/packages/tokens-to-rent-service/yarn.deploy.lock +++ b/packages/tokens-to-rent-service/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -293,7 +293,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -309,7 +309,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -406,12 +406,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -422,9 +422,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -2453,6 +2453,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/treasury-management-sdk/yarn.deploy.lock b/packages/treasury-management-sdk/yarn.deploy.lock index 90848b5d3..2f18c3515 100644 --- a/packages/treasury-management-sdk/yarn.deploy.lock +++ b/packages/treasury-management-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -175,7 +175,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -191,7 +191,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -272,12 +272,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -288,9 +288,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1576,6 +1576,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/voter-stake-registry-hooks/package.json b/packages/voter-stake-registry-hooks/package.json index 14d9a94f2..f6751ec7c 100644 --- a/packages/voter-stake-registry-hooks/package.json +++ b/packages/voter-stake-registry-hooks/package.json @@ -38,7 +38,7 @@ "@helium/helium-react-hooks": "^0.7.12", "@helium/helium-sub-daos-sdk": "^0.7.12", "@helium/modular-governance-hooks": "^0.0.8", - "@helium/modular-governance-idls": "0.0.8-next.17+7ff2115", + "@helium/modular-governance-idls": "0.0.8-next.19+4fa4c6b", "@helium/spl-utils": "^0.7.12", "@helium/voter-stake-registry-sdk": "^0.7.12", "@solana/wallet-adapter-base": "^0.9.22", diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index 4c33c79bb..ea4507788 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -17,11 +17,11 @@ import React, { } from "react"; import { useAsync } from "react-async-hook"; import { useDelegatedPositions } from "../hooks/useDelegatedPositions"; -import { useProxies } from "../hooks/useProxies"; +import { useProxyAssignments } from "../hooks/useProxies"; import { usePositions } from "../hooks/usePositions"; import { useRegistrar } from "../hooks/useRegistrar"; import { init as initNftProxy } from "@helium/nft-proxy-sdk"; -import { ProxyV0, PositionWithMeta } from "../sdk/types"; +import { ProxyAssignmentV0, PositionWithMeta } from "../sdk/types"; import { calcPositionVotingPower } from "../utils/calcPositionVotingPower"; import { GetPositionsArgs as GetPosArgs, @@ -158,7 +158,7 @@ export const HeliumVsrStateProvider: React.FC<{ return proxyAccounts?.reduce((acc, prox) => { acc[prox.asset.toBase58()] = prox; return acc; - }, {} as Record); + }, {} as Record); }, [proxyAccounts]); const myOwnedPositionsEndIdx = result?.positionKeys?.length; // Assume that my positions are a small amount, so we don't need to say they're static diff --git a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts index 3b80d47c4..7f6828b5e 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts @@ -1,10 +1,9 @@ import { Program } from "@coral-xyz/anchor"; -import { PROGRAM_ID, init, proxyKey } from "@helium/nft-proxy-sdk"; +import { PROGRAM_ID, init, proxyAssignmentKey } from "@helium/nft-proxy-sdk"; import { Status, - batchParallelInstructions, batchParallelInstructionsWithPriorityFee, - truthy, + truthy } from "@helium/spl-utils"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import BN from "bn.js"; @@ -24,6 +23,7 @@ export const useAssignProxies = () => { onProgress, maxSignatureBatch, }: { + positions: PositionWithMeta[]; recipient: PublicKey; programId?: PublicKey; @@ -46,27 +46,27 @@ export const useAssignProxies = () => { } else { const instructions: TransactionInstruction[] = []; for (const position of positions) { - let currentProxy = proxyKey( + let currentProxyAssignment = proxyAssignmentKey( registrar.proxyConfig, position.mint, provider.wallet.publicKey )[0]; - let proxy = await nftProxyProgram.account.proxyV0.fetchNullable( - currentProxy + let proxyAssignment = await nftProxyProgram.account.proxyAssignmentV0.fetchNullable( + currentProxyAssignment ); - if (!proxy) { - currentProxy = proxyKey( + if (!proxyAssignment) { + currentProxyAssignment = proxyAssignmentKey( registrar.proxyConfig, position.mint, PublicKey.default )[0]; - proxy = await nftProxyProgram.account.proxyV0.fetch(currentProxy); + proxyAssignment = await nftProxyProgram.account.proxyAssignmentV0.fetchNullable(currentProxyAssignment); } - if (proxy && !proxy.nextOwner?.equals(PublicKey.default)) { + if (proxyAssignment && !proxyAssignment.nextVoter?.equals(PublicKey.default)) { const toUndelegate = await voteService.getProxyAssignmentsForPosition( position.pubkey, - proxy.index + proxyAssignment.index ); const ixs = ( await Promise.all( @@ -76,16 +76,16 @@ export const useAssignProxies = () => { return Promise.resolve(undefined); } - const prevProxy = new PublicKey( + const prevProxyAssignment = new PublicKey( toUndelegate[index + 1].address ); return nftProxyProgram.methods .unassignProxyV0() .accounts({ asset: position.mint, - prevProxy, - currentProxy, - proxy: new PublicKey(proxy.address), + prevProxyAssignment, + currentProxyAssignment, + proxyAssignment: new PublicKey(proxy.address), }) .instruction(); }) @@ -96,7 +96,7 @@ export const useAssignProxies = () => { } const { instruction, - pubkeys: { nextProxy }, + pubkeys: { nextProxyAssignment }, } = await nftProxyProgram.methods .assignProxyV0({ expirationTime, @@ -108,7 +108,7 @@ export const useAssignProxies = () => { }) .prepare(); // Don't delegate where there's already a proxy. - if (await provider.connection.getAccountInfo(nextProxy!)) { + if (await provider.connection.getAccountInfo(nextProxyAssignment!)) { throw new Error( "Recipient wallet is already a proxy to this position" ); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useProxiedTo.ts b/packages/voter-stake-registry-hooks/src/hooks/useProxiedTo.ts index 722f9b628..57c4ce38a 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useProxiedTo.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useProxiedTo.ts @@ -18,7 +18,7 @@ export function useProxiedTo(wallet?: PublicKey): { return positions?.filter( (position) => position.proxy && - position.proxy.nextOwner.equals(wallet) + position.proxy.nextVoter.equals(wallet) ); } }, [positions]); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useProxies.ts index 9dc83e3e7..7564b818f 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useProxies.ts @@ -2,13 +2,13 @@ import { useAnchorAccounts } from "@helium/helium-react-hooks"; import { NftProxy } from "@helium/modular-governance-idls/lib/types/nft_proxy"; import { PublicKey } from "@solana/web3.js"; -export const useProxies = ( +export const useProxyAssignments = ( delegationKeys: PublicKey[] | undefined, isStatic: boolean = false ) => { - return useAnchorAccounts( + return useAnchorAccounts( delegationKeys, - "proxyV0", + "proxyAssignmentV0", isStatic ); }; diff --git a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts index 3fd1f6ff7..31d846395 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useRelinquishVote.ts @@ -80,7 +80,7 @@ export const useRelinquishVote = (proposal: PublicKey) => { }) .accounts({ proposal, - owner: provider.wallet.publicKey, + voter: provider.wallet.publicKey, position: position.pubkey, }) .instruction(); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts index 7de1d879f..fb5b6f4b8 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts @@ -1,5 +1,5 @@ import { Program } from "@coral-xyz/anchor"; -import { PROGRAM_ID, proxyKey, init } from "@helium/nft-proxy-sdk"; +import { PROGRAM_ID, proxyAssignmentKey, init } from "@helium/nft-proxy-sdk"; import { truthy, batchParallelInstructions, @@ -42,21 +42,23 @@ export const useUnassignProxies = () => { } else { const instructions: TransactionInstruction[] = []; for (const position of positions) { - let currentProxy = proxyKey( + let currentProxyAssignment = proxyAssignmentKey( registrar.proxyConfig, position.mint, provider.wallet.publicKey )[0]; - let proxy = await nftProxyProgram.account.proxyV0.fetchNullable( - currentProxy + let proxy = await nftProxyProgram.account.proxyAssignmentV0.fetchNullable( + currentProxyAssignment ); if (!proxy) { - currentProxy = proxyKey( + currentProxyAssignment = proxyAssignmentKey( registrar.proxyConfig, position.mint, PublicKey.default )[0]; - proxy = await nftProxyProgram.account.proxyV0.fetch(currentProxy); + proxy = await nftProxyProgram.account.proxyAssignmentV0.fetch( + currentProxyAssignment + ); } const toUndelegate = await voteService.getProxyAssignmentsForPosition( position.pubkey, @@ -72,16 +74,16 @@ export const useUnassignProxies = () => { return Promise.resolve(undefined); } - const prevProxy = new PublicKey( + const prevProxyAssignment = new PublicKey( toUndelegate[index + 1].address ); return nftProxyProgram.methods .unassignProxyV0() .accounts({ asset: position.mint, - prevProxy, - currentProxy, - proxy: new PublicKey(proxy.address), + prevProxyAssignment, + currentProxyAssignment, + proxyAssignment: new PublicKey(proxy.address), }) .instruction(); }) diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts index 138c86cf1..04e60b2ef 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts @@ -107,7 +107,7 @@ export const useVote = (proposalKey: PublicKey) => { }) .accounts({ proposal: proposalKey, - owner: provider.wallet.publicKey, + voter: provider.wallet.publicKey, position: position.pubkey, registrar: registrar?.pubkey, }) @@ -137,7 +137,7 @@ export const useVote = (proposalKey: PublicKey) => { onProgress, triesRemaining: 10, extraSigners: [], - maxSignatureBatch + maxSignatureBatch, }); } } diff --git a/packages/voter-stake-registry-hooks/src/index.ts b/packages/voter-stake-registry-hooks/src/index.ts index c142740d3..a40fa8b00 100644 --- a/packages/voter-stake-registry-hooks/src/index.ts +++ b/packages/voter-stake-registry-hooks/src/index.ts @@ -23,7 +23,7 @@ export { calcPositionVotingPower } from "./utils/calcPositionVotingPower"; export * from "./sdk/types"; export { useAssignProxies } from "./hooks/useAssignProxies"; export { useUnassignProxies } from "./hooks/useUnassignProxies"; -export { useProxies } from "./hooks/useProxies" +export { useProxyAssignments } from "./hooks/useProxies" export { useProxiedTo } from "./hooks/useProxiedTo"; export { getPositionKeys } from "./utils/getPositionKeys"; export { getSubDaos } from "./utils/getSubDaos"; diff --git a/packages/voter-stake-registry-hooks/src/sdk/types.ts b/packages/voter-stake-registry-hooks/src/sdk/types.ts index 8a21aadba..056927f79 100644 --- a/packages/voter-stake-registry-hooks/src/sdk/types.ts +++ b/packages/voter-stake-registry-hooks/src/sdk/types.ts @@ -9,15 +9,15 @@ type RegistrarV0 = IdlAccounts['registrar'] export type Lockup = IdlTypes['Lockup'] export type PositionV0 = IdlAccounts['positionV0'] export type DelegatedPositionV0 = IdlAccounts['delegatedPositionV0'] -export type ProxyV0 = - IdlAccounts["proxyV0"]; +export type ProxyAssignmentV0 = + IdlAccounts["proxyAssignmentV0"]; export interface Registrar extends RegistrarV0 { votingMints: VotingMintConfig[] } export interface Position extends Omit { lockup: Lockup } -export type Proxy = ProxyV0 & { address: PublicKey }; +export type Proxy = ProxyAssignmentV0 & { address: PublicKey }; export interface PositionWithMeta extends Position { pubkey: PublicKey isDelegated: boolean diff --git a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts index 8e5710177..93bac87ec 100644 --- a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts +++ b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts @@ -117,8 +117,8 @@ export const getPositionKeys = async ( positionKeys, proxiedPositionKeys: delegationPositions, proxies: myProxies.map((d) => ({ - owner: new PublicKey(d.owner), - nextOwner: new PublicKey(d.nextOwner), + voter: new PublicKey(d.voter), + nextVoter: new PublicKey(d.nextVoter), address: new PublicKey(d.address), asset: new PublicKey(d.asset), rentRefund: new PublicKey(d.rentRefund), diff --git a/packages/voter-stake-registry-hooks/yarn.deploy.lock b/packages/voter-stake-registry-hooks/yarn.deploy.lock index 4d2d3796e..3a99a579b 100644 --- a/packages/voter-stake-registry-hooks/yarn.deploy.lock +++ b/packages/voter-stake-registry-hooks/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -275,17 +275,17 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/modular-governance-idls@npm:0.0.8-next.17" +"@helium/modular-governance-idls@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/modular-governance-idls@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@solana/web3.js": ^1.78.4 - checksum: 1c45344f0f5cfcc5880459a65691152d4ad55e1f6262d5799d3070e555e51ebad58373c5cd7e8a1c1840c29cb4f09ad3d55256f8e561738040dd783fcf361de4 + checksum: 109d5ceca42944851485274cb231d4a01c075eea6ce67ab0128a751ec112018ec5d681f7c4a79633d49b1b3da3b1312a7b6a79ddd9d8dbe7f2fba1f333a56002 languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -295,15 +295,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -380,7 +380,7 @@ __metadata: "@helium/helium-react-hooks": ^0.7.12 "@helium/helium-sub-daos-sdk": ^0.7.12 "@helium/modular-governance-hooks": ^0.0.8 - "@helium/modular-governance-idls": 0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@helium/voter-stake-registry-sdk": ^0.7.12 "@solana/wallet-adapter-base": ^0.9.22 @@ -405,7 +405,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -510,7 +510,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -526,7 +526,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -761,12 +761,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -777,9 +777,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -2246,6 +2246,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/voter-stake-registry-sdk/package.json b/packages/voter-stake-registry-sdk/package.json index f542a1b39..5157fc799 100644 --- a/packages/voter-stake-registry-sdk/package.json +++ b/packages/voter-stake-registry-sdk/package.json @@ -34,7 +34,7 @@ "@coral-xyz/anchor": "^0.28.0", "@helium/anchor-resolvers": "^0.7.12", "@helium/idls": "^0.7.12", - "@helium/nft-proxy-sdk": "0.0.8-next.17+7ff2115", + "@helium/nft-proxy-sdk": "0.0.8-next.19+4fa4c6b", "@helium/spl-utils": "^0.7.12", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", diff --git a/packages/voter-stake-registry-sdk/src/resolvers.ts b/packages/voter-stake-registry-sdk/src/resolvers.ts index 515313743..d80c14ede 100644 --- a/packages/voter-stake-registry-sdk/src/resolvers.ts +++ b/packages/voter-stake-registry-sdk/src/resolvers.ts @@ -9,7 +9,7 @@ import { getAccount } from "@solana/spl-token"; import { PublicKey } from "@solana/web3.js"; import { init } from "."; import { voterWeightRecordKey } from "./pdas"; -import { proxyKey, nftProxyResolvers } from "@helium/nft-proxy-sdk"; +import { proxyAssignmentKey, nftProxyResolvers } from "@helium/nft-proxy-sdk"; export * from "./constants"; export * from "./pdas"; @@ -113,19 +113,19 @@ export const vsrResolvers = combineResolvers( // @ts-ignore return provider.wallet.publicKey; } else if ( - path[path.length - 1] == "proxy" && + path[path.length - 1] == "proxyAssignment" && accounts.registrar && - accounts.owner && + accounts.voter && accounts.mint ) { const program = await init(provider as any, programId); const registrar = await program.account.registrar.fetch( accounts.registrar as PublicKey ); - return proxyKey( + return proxyAssignmentKey( registrar.proxyConfig, accounts.mint as PublicKey, - accounts.owner as PublicKey + accounts.voter as PublicKey )[0]; } diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index 8a8c92e93..29cdfbc76 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -5,8 +5,8 @@ import { PublicKey } from "@solana/web3.js"; import axios, { AxiosInstance } from "axios"; export type ProxyAssignment = { - owner: string; - nextOwner: string; + voter: string; + nextVoter: string; index: number; address: string; asset: string; @@ -146,7 +146,7 @@ export class VoteService { const positionAcc = await this.program.account.positionV0.fetch(position) return ( - await this.nftProxyProgram.account.proxyV0.all([ + await this.nftProxyProgram.account.proxyAssignmentV0.all([ { memcmp: { offset: 8 + 32 + 32, @@ -163,8 +163,8 @@ export class VoteService { ) .sort((a, b) => b.account.index - a.account.index) .map((a) => ({ - owner: a.account.owner.toBase58(), - nextOwner: a.account.nextOwner.toBase58(), + voter: a.account.voter.toBase58(), + nextVoter: a.account.nextVoter.toBase58(), index: a.account.index, address: a.publicKey.toBase58(), asset: a.account.asset.toBase58(), @@ -187,7 +187,7 @@ export class VoteService { await this.client.get(`/v1/proxy-assignments`, { params: { limit: 10000, - owner: wallet.toBase58(), + voter: wallet.toBase58(), minIndex: minProxyIndex, }, }) @@ -199,7 +199,7 @@ export class VoteService { this.registrar ); return ( - await this.nftProxyProgram.account.proxyV0.all([ + await this.nftProxyProgram.account.proxyAssignmentV0.all([ { memcmp: { offset: 8, @@ -216,8 +216,8 @@ export class VoteService { ) .sort((a, b) => b.account.index - a.account.index) .map((a) => ({ - owner: a.account.owner.toBase58(), - nextOwner: a.account.nextOwner.toBase58(), + voter: a.account.voter.toBase58(), + nextVoter: a.account.nextVoter.toBase58(), index: a.account.index, address: a.publicKey.toBase58(), asset: a.account.asset.toBase58(), @@ -249,7 +249,7 @@ export class VoteService { ); const positionAcc = await this.program.account.positionV0.fetch(position); return ( - await this.nftProxyProgram.account.proxyV0.all([ + await this.nftProxyProgram.account.proxyAssignmentV0.all([ { memcmp: { offset: 8 + 32, @@ -267,8 +267,8 @@ export class VoteService { .filter((a) => a.account.index >= minIndex) .sort((a, b) => b.account.index - a.account.index) .map((a) => ({ - owner: a.account.owner.toBase58(), - nextOwner: a.account.nextOwner.toBase58(), + voter: a.account.voter.toBase58(), + nextVoter: a.account.nextVoter.toBase58(), index: a.account.index, address: a.publicKey.toBase58(), asset: a.account.asset.toBase58(), diff --git a/packages/voter-stake-registry-sdk/yarn.deploy.lock b/packages/voter-stake-registry-sdk/yarn.deploy.lock index bd56806e2..b252a971b 100644 --- a/packages/voter-stake-registry-sdk/yarn.deploy.lock +++ b/packages/voter-stake-registry-sdk/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -129,7 +129,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -139,15 +139,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -180,7 +180,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -285,7 +285,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -301,7 +301,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -398,12 +398,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -414,9 +414,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -1817,6 +1817,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/vsr-metadata-service/yarn.deploy.lock b/packages/vsr-metadata-service/yarn.deploy.lock index d404bcce0..1186eb5bf 100644 --- a/packages/vsr-metadata-service/yarn.deploy.lock +++ b/packages/vsr-metadata-service/yarn.deploy.lock @@ -14,12 +14,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -173,7 +173,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -183,15 +183,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -224,7 +224,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -356,7 +356,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -372,7 +372,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -469,12 +469,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -485,9 +485,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -2484,6 +2484,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/packages/xnft-hotspot/yarn.deploy.lock b/packages/xnft-hotspot/yarn.deploy.lock index dfa5fc1a4..de95e5a79 100644 --- a/packages/xnft-hotspot/yarn.deploy.lock +++ b/packages/xnft-hotspot/yarn.deploy.lock @@ -42,12 +42,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard @@ -545,7 +545,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -555,15 +555,15 @@ __metadata: languageName: node linkType: hard -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -645,7 +645,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -1088,7 +1088,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -1104,7 +1104,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -2257,12 +2257,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -2273,9 +2273,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -7460,6 +7460,24 @@ __metadata: languageName: node linkType: hard +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" diff --git a/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs b/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs index bc2662661..6b66e8337 100644 --- a/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs +++ b/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs @@ -1,7 +1,7 @@ use crate::{error::VsrError, RelinquishVoteArgsV1}; use anchor_lang::prelude::*; use anchor_spl::token::Mint; -use nft_proxy::ProxyV0; +use nft_proxy::ProxyAssignmentV0; use proposal::{ProposalConfigV0, ProposalV0}; use crate::{registrar_seeds, state::*}; @@ -21,15 +21,15 @@ pub struct ProxiedRelinquishVoteV0<'info> { )] pub marker: Box>, pub registrar: Box>, - pub owner: Signer<'info>, + pub voter: Signer<'info>, #[account( - has_one = owner, - constraint = proxy.proxy_config == registrar.proxy_config, - constraint = proxy.expiration_time > Clock::get().unwrap().unix_timestamp, + has_one = voter, + constraint = proxy_assignment.proxy_config == registrar.proxy_config, + constraint = proxy_assignment.expiration_time > Clock::get().unwrap().unix_timestamp, // only the current or earlier delegates can change vote. - constraint = proxy.index <= marker.proxy_index + constraint = proxy_assignment.index <= marker.proxy_index )] - pub proxy: Box>, + pub proxy_assignment: Box>, #[account( mut, has_one = mint, @@ -64,9 +64,9 @@ pub struct ProxiedRelinquishVoteV0<'info> { pub fn handler(ctx: Context, args: RelinquishVoteArgsV1) -> Result<()> { let marker = &mut ctx.accounts.marker; - marker.proxy_index = ctx.accounts.proxy.index; + marker.proxy_index = ctx.accounts.proxy_assignment.index; marker.proposal = ctx.accounts.proposal.key(); - marker.voter = ctx.accounts.owner.key(); + marker.voter = ctx.accounts.voter.key(); ctx.accounts.position.num_active_votes -= 1; require!( @@ -85,7 +85,7 @@ pub fn handler(ctx: Context, args: RelinquishVoteArgsV1 CpiContext::new_with_signer( ctx.accounts.proposal_program.to_account_info(), proposal::cpi::accounts::VoteV0 { - voter: ctx.accounts.owner.to_account_info(), + voter: ctx.accounts.voter.to_account_info(), vote_controller: ctx.accounts.registrar.to_account_info(), state_controller: ctx.accounts.state_controller.to_account_info(), proposal_config: ctx.accounts.proposal_config.to_account_info(), diff --git a/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs b/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs index 835d3f51c..0087483b0 100644 --- a/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs +++ b/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs @@ -1,7 +1,7 @@ use crate::{error::VsrError, VoteArgsV0}; use anchor_lang::prelude::*; use anchor_spl::token::Mint; -use nft_proxy::ProxyV0; +use nft_proxy::ProxyAssignmentV0; use crate::{registrar_seeds, state::*}; use proposal::{ProposalConfigV0, ProposalV0}; @@ -19,7 +19,7 @@ pub struct ProxiedVoteV0<'info> { )] pub marker: Box>, pub registrar: Box>, - pub owner: Signer<'info>, + pub voter: Signer<'info>, #[account( mut, has_one = mint, @@ -28,13 +28,13 @@ pub struct ProxiedVoteV0<'info> { pub position: Box>, pub mint: Box>, #[account( - has_one = owner, - constraint = proxy.proxy_config == registrar.proxy_config, - constraint = proxy.expiration_time > Clock::get().unwrap().unix_timestamp, + has_one = voter, + constraint = proxy_assignment.proxy_config == registrar.proxy_config, + constraint = proxy_assignment.expiration_time > Clock::get().unwrap().unix_timestamp, // only the current or earlier proxies can change vote. Or if proposal not set, this was an `init` for the marker - constraint = proxy.index <= marker.proxy_index || marker.proposal == Pubkey::default() + constraint = proxy_assignment.index <= marker.proxy_index || marker.proposal == Pubkey::default() )] - pub proxy: Box>, + pub proxy_assignment: Box>, #[account( mut, has_one = proposal_config, @@ -67,10 +67,10 @@ pub fn handler(ctx: Context, args: VoteArgsV0) -> Result<()> { } marker.proposal = ctx.accounts.proposal.key(); marker.bump_seed = ctx.bumps["marker"]; - marker.voter = ctx.accounts.owner.key(); + marker.voter = ctx.accounts.voter.key(); marker.mint = ctx.accounts.mint.key(); marker.registrar = ctx.accounts.registrar.key(); - marker.proxy_index = ctx.accounts.proxy.index; + marker.proxy_index = ctx.accounts.proxy_assignment.index; // Don't allow voting for the same choice twice. require!( @@ -106,7 +106,7 @@ pub fn handler(ctx: Context, args: VoteArgsV0) -> Result<()> { CpiContext::new_with_signer( ctx.accounts.proposal_program.to_account_info(), proposal::cpi::accounts::VoteV0 { - voter: ctx.accounts.owner.to_account_info(), + voter: ctx.accounts.voter.to_account_info(), vote_controller: ctx.accounts.registrar.to_account_info(), state_controller: ctx.accounts.state_controller.to_account_info(), proposal_config: ctx.accounts.proposal_config.to_account_info(), diff --git a/tests/voter-stake-registry.ts b/tests/voter-stake-registry.ts index c669cc8d2..4475b752b 100644 --- a/tests/voter-stake-registry.ts +++ b/tests/voter-stake-registry.ts @@ -41,7 +41,7 @@ import { SPL_GOVERNANCE_PID } from "./utils/vsr"; import { PROGRAM_ID as DEL_PID, init as initNftProxy, - proxyKey, + proxyAssignmentKey, } from "@helium/nft-proxy-sdk"; import { NftProxy } from "@helium/modular-governance-idls/lib/types/nft_proxy"; import { ensureVSRIdl } from "./utils/fixtures"; @@ -497,7 +497,7 @@ describe("voter-stake-registry", () => { mint, proposal, position, - owner: delegatee.publicKey, + voter: delegatee.publicKey, }) .signers([delegatee]) .rpcAndKeys({ skipPreflight: true }); @@ -517,7 +517,7 @@ describe("voter-stake-registry", () => { mint, proposal, position, - owner: delegatee.publicKey, + voter: delegatee.publicKey, }) .signers([delegatee]) .rpc({ skipPreflight: true }); @@ -541,7 +541,7 @@ describe("voter-stake-registry", () => { mint, proposal, position, - owner: delegatee.publicKey, + voter: delegatee.publicKey, }) .signers([delegatee]) .rpcAndKeys({ skipPreflight: true }); @@ -593,23 +593,23 @@ describe("voter-stake-registry", () => { }); it("allows the original owner to undelegate", async () => { - const toUnProxy = proxyKey(proxyConfig!, mint, delegatee.publicKey)[0]; - const myProxy = proxyKey(proxyConfig!, mint, PublicKey.default)[0]; + const toUnProxy = proxyAssignmentKey(proxyConfig!, mint, delegatee.publicKey)[0]; + const myProxy = proxyAssignmentKey(proxyConfig!, mint, PublicKey.default)[0]; await proxyProgram.methods .unassignProxyV0() .accounts({ - proxy: toUnProxy, - prevProxy: myProxy, - currentProxy: myProxy, + proxyAssignment: toUnProxy, + prevProxyAssignment: myProxy, + currentProxyAssignment: myProxy, }) .rpc({ skipPreflight: true }); expect( ( - await proxyProgram.account.proxyV0.fetch(myProxy) - ).nextOwner.toBase58() + await proxyProgram.account.proxyAssignmentV0.fetch(myProxy) + ).nextVoter.toBase58() ).to.eq(PublicKey.default.toBase58()); - expect(await proxyProgram.account.proxyV0.fetchNullable(toUnProxy)).to + expect(await proxyProgram.account.proxyAssignmentV0.fetchNullable(toUnProxy)).to .be.null; }); }); diff --git a/utils/nft-proxy/idl.json b/utils/nft-proxy/idl.json index f7fd547b2..923b328ee 100644 --- a/utils/nft-proxy/idl.json +++ b/utils/nft-proxy/idl.json @@ -70,7 +70,7 @@ "isSigner": true }, { - "name": "owner", + "name": "voter", "isMut": false, "isSigner": false, "docs": [ @@ -88,7 +88,7 @@ "isSigner": false }, { - "name": "currentProxy", + "name": "currentProxyAssignment", "isMut": true, "isSigner": false, "pda": { @@ -96,7 +96,7 @@ { "kind": "const", "type": "string", - "value": "proxy" + "value": "proxy_assignment" }, { "kind": "account", @@ -113,7 +113,7 @@ { "kind": "account", "type": "publicKey", - "path": "owner" + "path": "voter" } ] } @@ -124,7 +124,7 @@ "isSigner": false }, { - "name": "nextProxy", + "name": "nextProxyAssignment", "isMut": true, "isSigner": false, "pda": { @@ -132,7 +132,7 @@ { "kind": "const", "type": "string", - "value": "proxy" + "value": "proxy_assignment" }, { "kind": "account", @@ -188,7 +188,7 @@ "isSigner": true }, { - "name": "owner", + "name": "voter", "isMut": false, "isSigner": false, "docs": [ @@ -201,18 +201,18 @@ "isSigner": false }, { - "name": "currentProxy", + "name": "currentProxyAssignment", "isMut": false, "isSigner": false, - "relations": ["owner", "asset"] + "relations": ["voter", "asset"] }, { - "name": "prevProxy", + "name": "prevProxyAssignment", "isMut": true, "isSigner": false }, { - "name": "proxy", + "name": "proxyAssignment", "isMut": true, "isSigner": false, "relations": ["rent_refund"] @@ -247,19 +247,21 @@ { "name": "seasons", "type": { - "vec": "i64" + "vec": { + "defined": "SeasonV0" + } } } ] } }, { - "name": "ProxyV0", + "name": "ProxyAssignmentV0", "type": { "kind": "struct", "fields": [ { - "name": "owner", + "name": "voter", "type": "publicKey" }, { @@ -275,7 +277,7 @@ "type": "u16" }, { - "name": "nextOwner", + "name": "nextVoter", "type": "publicKey" }, { @@ -323,11 +325,29 @@ { "name": "seasons", "type": { - "vec": "i64" + "vec": { + "defined": "SeasonV0" + } } } ] } + }, + { + "name": "SeasonV0", + "type": { + "kind": "struct", + "fields": [ + { + "name": "start", + "type": "i64" + }, + { + "name": "end", + "type": "i64" + } + ] + } } ], "errors": [ @@ -351,5 +371,8 @@ "name": "ExpirationExceedsPreceedingProxy", "msg": "The specified expiration time exceeds the expiration of the existing delegatio" } - ] + ], + "metadata": { + "address": "nprx42sXf5rpVnwBWEdRg1d8tuCWsTuVLys1pRWwE6p" + } } diff --git a/yarn.lock b/yarn.lock index c8a201fe9..14de0018c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -105,19 +105,19 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.24.4 - resolution: "@babel/runtime@npm:7.24.4" +"@babel/runtime@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/runtime@npm:7.24.5" dependencies: regenerator-runtime: ^0.14.0 - checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 + checksum: 755383192f3ac32ba4c62bd4f1ae92aed5b82d2c6665f39eb28fa94546777cf5c63493ea92dd03f1c2e621b17e860f190c056684b7f234270fdc91e29beda063 languageName: node linkType: hard "@bufbuild/protobuf@npm:^1.7.2": - version: 1.8.0 - resolution: "@bufbuild/protobuf@npm:1.8.0" - checksum: 148755fce3cc28891a42c35a375596a3817710e2e8f4a452f034ffd988bbec1c9154135865b0b846f5f56765c93eb88cacc2f42af053925fb14f09b6a2b8c295 + version: 1.9.0 + resolution: "@bufbuild/protobuf@npm:1.9.0" + checksum: 2e276d3cf1367683e04a85fbb6fd361e29ec91cba0b6ab9dc3e2bfbbd886c7f781036ffcbabeb352951344a2004b93dbba2f2fdb5731c6e6967b36c804a22a8e languageName: node linkType: hard @@ -551,26 +551,26 @@ __metadata: linkType: hard "@grpc/grpc-js@npm:^1.10.1": - version: 1.10.6 - resolution: "@grpc/grpc-js@npm:1.10.6" + version: 1.10.7 + resolution: "@grpc/grpc-js@npm:1.10.7" dependencies: - "@grpc/proto-loader": ^0.7.10 + "@grpc/proto-loader": ^0.7.13 "@js-sdsl/ordered-map": ^4.4.2 - checksum: 343d70ee435d6b4b82c72160d31a4749ac2621938f58328dd71df3013377665128c890df60e057fde381b12b83d34f802d586f7feb61d079793d89adfc0f40e8 + checksum: 69e88768e59b53ca020e2cfa9474fbd645f4ee7dd3269559c9fb91970273da6e8db480c0c439bdd73b49f1831d8f47c9bc5305dc5f9ed4db8873d53572e4f019 languageName: node linkType: hard -"@grpc/proto-loader@npm:^0.7.10": - version: 0.7.12 - resolution: "@grpc/proto-loader@npm:0.7.12" +"@grpc/proto-loader@npm:^0.7.13": + version: 0.7.13 + resolution: "@grpc/proto-loader@npm:0.7.13" dependencies: lodash.camelcase: ^4.3.0 long: ^5.0.0 - protobufjs: ^7.2.4 + protobufjs: ^7.2.5 yargs: ^17.7.2 bin: proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 5132b683b3f809417f46b421231ffa083d6300406d1276a12fc619d771b4f8e0e8ad5a935e0b381caaa9a57ef47630191dd2310b739d1be5aa90cc87b97fce0f + checksum: 399c1b8a4627f93dc31660d9636ea6bf58be5675cc7581e3df56a249369e5be02c6cd0d642c5332b0d5673bc8621619bc06fb045aa3e8f57383737b5d35930dc languageName: node linkType: hard @@ -787,7 +787,7 @@ __metadata: "@helium/proposal-sdk": ^0.0.8 "@helium/rewards-oracle-sdk": ^0.7.12 "@helium/spl-utils": ^0.7.12 - "@helium/state-controller-sdk": 0.0.8-next.17+7ff2115 + "@helium/state-controller-sdk": 0.0.8-next.19+4fa4c6b "@helium/treasury-management-sdk": ^0.7.12 "@helium/voter-stake-registry-sdk": ^0.7.12 "@solana/spl-token": ^0.3.8 @@ -1016,7 +1016,7 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.7.12 "@helium/lazy-distributor-sdk": ^0.7.12 "@helium/mobile-entity-manager-sdk": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/price-oracle-sdk": ^0.7.12 "@helium/spl-utils": ^0.7.12 "@helium/treasury-management-sdk": ^0.7.12 @@ -1361,13 +1361,13 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/modular-governance-idls@npm:0.0.8-next.17" +"@helium/modular-governance-idls@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/modular-governance-idls@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@solana/web3.js": ^1.78.4 - checksum: 1c45344f0f5cfcc5880459a65691152d4ad55e1f6262d5799d3070e555e51ebad58373c5cd7e8a1c1840c29cb4f09ad3d55256f8e561738040dd783fcf361de4 + checksum: 109d5ceca42944851485274cb231d4a01c075eea6ce67ab0128a751ec112018ec5d681f7c4a79633d49b1b3da3b1312a7b6a79ddd9d8dbe7f2fba1f333a56002 languageName: node linkType: hard @@ -1381,7 +1381,7 @@ __metadata: languageName: node linkType: hard -"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.17+7ff2115": +"@helium/modular-governance-idls@npm:^0.0.8, @helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": version: 0.0.8 resolution: "@helium/modular-governance-idls@npm:0.0.8" dependencies: @@ -1432,15 +1432,15 @@ __metadata: languageName: unknown linkType: soft -"@helium/nft-proxy-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.17" +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.2.17 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b "@solana/spl-token": ^0.3.8 - checksum: 2199e8a88d03de7683d85976f8f57c14266b4cb7190ab06e75403e97b3a17144a619249ba4bf7e62d404861103fccf6fe08dd4d2571cec0b8104c8f472f62047 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 languageName: node linkType: hard @@ -1499,14 +1499,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/proposal-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/proposal-sdk@npm:0.0.8-next.17" +"@helium/proposal-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/proposal-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 - checksum: 9b604a0030d0f30158706b92f1e67fbe75af69c1db6bb456345e6548c97b1a1960e271774f368d32509d61c9a8dcec3614f9e57d23f56714cba0beed02714468 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b + checksum: 122cea1a097e05aabf9a535e48c87d650b9d2d2723aba19d6e6a51e39885a7bd4d7257606ebdb961e0379f7d4e8cce94d9ee6f33b18c5a43d1207a818934b37f languageName: node linkType: hard @@ -1599,14 +1599,14 @@ __metadata: languageName: unknown linkType: soft -"@helium/state-controller-sdk@npm:0.0.8-next.17+7ff2115": - version: 0.0.8-next.17 - resolution: "@helium/state-controller-sdk@npm:0.0.8-next.17" +"@helium/state-controller-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/state-controller-sdk@npm:0.0.8-next.19" dependencies: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.5.0 - "@helium/modular-governance-idls": ^0.0.8-next.17+7ff2115 - checksum: e77e88e7e8c24fb52e07dd9dda76494a237e1ed69e429f10b0a2d501c45a3974528ccfff9f766e2c90dd5f8f196ba20d597cb9416977909df40840d300c5b85c + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b + checksum: 51ac8d1151e7b02843e4ad437d7a20af03678198e67971698870ad1399f83ee976245df915998e9411310dc31d55f26ea7bc25f7235f20a20d573e0ff560a964 languageName: node linkType: hard @@ -1693,7 +1693,7 @@ __metadata: "@helium/helium-react-hooks": ^0.7.12 "@helium/helium-sub-daos-sdk": ^0.7.12 "@helium/modular-governance-hooks": ^0.0.8 - "@helium/modular-governance-idls": 0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@helium/voter-stake-registry-sdk": ^0.7.12 "@solana/wallet-adapter-base": ^0.9.22 @@ -1718,7 +1718,7 @@ __metadata: "@coral-xyz/anchor": ^0.28.0 "@helium/anchor-resolvers": ^0.7.12 "@helium/idls": ^0.7.12 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b "@helium/spl-utils": ^0.7.12 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 @@ -3221,7 +3221,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.2.0": +"@noble/curves@npm:^1.4.0": version: 1.4.0 resolution: "@noble/curves@npm:1.4.0" dependencies: @@ -3237,7 +3237,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.3": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 @@ -4967,12 +4967,12 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.78.8": - version: 1.91.6 - resolution: "@solana/web3.js@npm:1.91.6" + version: 1.91.8 + resolution: "@solana/web3.js@npm:1.91.8" dependencies: - "@babel/runtime": ^7.23.4 - "@noble/curves": ^1.2.0 - "@noble/hashes": ^1.3.3 + "@babel/runtime": ^7.24.5 + "@noble/curves": ^1.4.0 + "@noble/hashes": ^1.4.0 "@solana/buffer-layout": ^4.0.1 agentkeepalive: ^4.5.0 bigint-buffer: ^1.1.5 @@ -4983,9 +4983,9 @@ __metadata: fast-stable-stringify: ^1.0.0 jayson: ^4.1.0 node-fetch: ^2.7.0 - rpc-websockets: ^7.5.1 + rpc-websockets: ^7.11.0 superstruct: ^0.14.2 - checksum: 95509d651c41abc71ea5732618b9aca3ff0baac7817549e913ade9eb9567e077472c2319cb422675dbeab13a22b26d036d2ce5b621b8786cb38dce076c188ab1 + checksum: ffc3c31a58fbf401b12c90d87615e5e611ba878c976092bc0a8bd2b96accf14c9898883c5dcdba8cc3a98c3e410f3261c06b5c7a42936c23dcbc69d084d3ad1d languageName: node linkType: hard @@ -15370,7 +15370,7 @@ __metadata: languageName: node linkType: hard -"protobufjs@npm:^7.2.4": +"protobufjs@npm:^7.2.5": version: 7.2.6 resolution: "protobufjs@npm:7.2.6" dependencies: @@ -16140,9 +16140,9 @@ __metadata: "@coral-xyz/anchor-cli": ^0.28.0 "@coral-xyz/borsh": ^0.2.6 "@helium/crypto": ^4.10.2 - "@helium/modular-governance-idls": 0.0.8-next.17+7ff2115 - "@helium/nft-proxy-sdk": 0.0.8-next.17+7ff2115 - "@helium/proposal-sdk": 0.0.8-next.17+7ff2115 + "@helium/modular-governance-idls": 0.0.8-next.19+4fa4c6b + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b + "@helium/proposal-sdk": 0.0.8-next.19+4fa4c6b "@helium/transactions": ^3.38.0 "@metaplex-foundation/mpl-bubblegum": ^0.7.0 "@pythnetwork/client": ^2.8.0 @@ -16168,6 +16168,24 @@ __metadata: languageName: unknown linkType: soft +"rpc-websockets@npm:^7.11.0": + version: 7.11.0 + resolution: "rpc-websockets@npm:7.11.0" + dependencies: + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: bf8b760e661a1ac4a26d4d139cf98978d14b79dd6463d7acfd8a300355db4be57675f8e2cf5e2feada8cd9cc2ab063914f3b63fce442540a66141dff69e74f60 + languageName: node + linkType: hard + "rpc-websockets@npm:^7.5.1": version: 7.6.0 resolution: "rpc-websockets@npm:7.6.0" From 40f5b7d136f6ed003c6b51be8349c9f10ecd47b6 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Thu, 23 May 2024 07:28:36 -0700 Subject: [PATCH 023/130] Minor fix --- packages/helium-vote-service/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index 60395e6be..9c5953a88 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -224,7 +224,10 @@ server.get<{ Params: { registrar: string }; Querystring: { query: string } }>( const proxies = await Proxy.findAll({ attributes: ["name", "description", "image", "wallet", "detail"], where: { - [Op.or]: [{ name: { [Op.iLike]: `%${query}%` } }], + [Op.or]: [ + { name: { [Op.iLike]: `%${query}%` } }, + { wallet: { [Op.like]: `${query}%` } }, + ], }, include: [ { From 75612dcb8c0765157e6489c27456465101734d09 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 24 May 2024 15:12:40 -0700 Subject: [PATCH 024/130] WIP --- packages/helium-vote-service/package.json | 3 +- packages/helium-vote-service/src/env.ts | 1 + packages/helium-vote-service/src/index.ts | 50 ++++++- .../src/contexts/heliumVsrContext.tsx | 15 ++- .../src/utils/getPositionKeys.ts | 114 ++-------------- .../voter-stake-registry-sdk/src/helpers.ts | 124 ++++++++++++++++++ .../voter-stake-registry-sdk/src/index.ts | 1 + .../src/voteService.ts | 2 + 8 files changed, 200 insertions(+), 110 deletions(-) create mode 100644 packages/voter-stake-registry-sdk/src/helpers.ts diff --git a/packages/helium-vote-service/package.json b/packages/helium-vote-service/package.json index 720c8a714..f5a737746 100644 --- a/packages/helium-vote-service/package.json +++ b/packages/helium-vote-service/package.json @@ -40,7 +40,8 @@ "dotenv": "^16.0.3", "fastify": "^4.13.0", "sequelize": "^6.28.0", - "simple-git": "^3.21.0" + "simple-git": "^3.21.0", + "@solana/web3.js": "^1.78.8" }, "devDependencies": { "@types/bn.js": "^5.1.1", diff --git a/packages/helium-vote-service/src/env.ts b/packages/helium-vote-service/src/env.ts index d22684271..bd3f10614 100644 --- a/packages/helium-vote-service/src/env.ts +++ b/packages/helium-vote-service/src/env.ts @@ -8,3 +8,4 @@ export const HELIUM_VOTE_PROXY_REPO = "https://github.com/helium/helium-vote-proxies.git"; +export const SOLANA_URL = process.env.SOLANA_URL || "http://localhost:8899"; diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index 9c5953a88..c90c4745d 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -1,12 +1,23 @@ import cors from "@fastify/cors"; import fastifyStatic from "@fastify/static"; import { organizationKey } from "@helium/organization-sdk"; -import { HNT_MINT, IOT_MINT, MOBILE_MINT } from "@helium/spl-utils"; +import { + Asset, + HNT_MINT, + IOT_MINT, + MOBILE_MINT, + searchAssets, +} from "@helium/spl-utils"; +import { + getPositionKeysForOwner, + registrarCollectionKey, +} from "@helium/voter-stake-registry-sdk"; import Fastify, { FastifyInstance } from "fastify"; import fs from "fs"; import { camelCase, isPlainObject, mapKeys } from "lodash"; import path from "path"; import { Op } from "sequelize"; +import { SOLANA_URL } from "./env"; import { Position, Proxy, @@ -17,6 +28,7 @@ import { setRelations, } from "./model"; import { cloneRepo, readProxiesAndUpsert } from "./repo"; +import { Connection, PublicKey } from "@solana/web3.js"; const server: FastifyInstance = Fastify({ logger: true, @@ -47,6 +59,7 @@ server.get<{ nextVoter: string; minIndex: number; position: string; + votingMint: string; }; }>("/v1/proxy-assignments", async (request, reply) => { const { @@ -56,9 +69,42 @@ server.get<{ page = 1, limit = 1000, minIndex, + votingMint, } = request.query; const where: any = {}; - if (voter) where.voter = voter; + if (voter) { + const registrar = ( + ( + await sequelize.query( + `SELECT address FROM registrars WHERE voting_mints[1]->>'mint' = ${sequelize.escape( + votingMint + )}` + ) + )[0][0] as any + ).address; + const collection = registrarCollectionKey(new PublicKey(registrar))[0]; + const { assets } = await getPositionKeysForOwner({ + connection: new Connection(SOLANA_URL), + owner: new PublicKey(voter), + collection, + }); + + where[Op.or] = [ + { + voter, + }, + { + [Op.and]: [ + { + asset: { + [Op.in]: assets.map((a) => a.toBase58()), + }, + voter: PublicKey.default.toBase58(), + }, + ], + }, + ]; + } if (nextVoter) where.nextVoter = nextVoter; if (typeof minIndex !== "undefined") { where.index = { diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index ea4507788..a0b6bac53 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -168,10 +168,17 @@ export const HeliumVsrStateProvider: React.FC<{ // Proxied positions may be a lot, set to static const { accounts: proxiedPositions, loading: loadingDelPositions } = usePositions(result?.proxiedPositionKeys, true); - const positions = useMemo( - () => [...(myPositions || []), ...(proxiedPositions || [])], - [myPositions, proxiedPositions] - ); + const positions = useMemo(() => { + const uniquePositions = new Map(); + [...(myPositions || []), ...(proxiedPositions || [])].forEach( + (position) => { + if (position) { + uniquePositions.set(position.publicKey.toBase58(), position); + } + } + ); + return Array.from(uniquePositions.values()); + }, [myPositions, proxiedPositions]); const now = useSolanaUnixNow(60 * 5 * 1000); const { amountLocked, votingPower, positionsWithMeta, amountProxyLocked } = diff --git a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts index 93bac87ec..d4be61c0d 100644 --- a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts +++ b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts @@ -1,20 +1,15 @@ import { AnchorProvider } from "@coral-xyz/anchor"; -import { Asset, searchAssets, truthy } from "@helium/spl-utils"; -import { unpackAccount } from "@solana/spl-token"; +import { } from '@helium/nft-proxy-sdk'; import { VoteService, + getPositionKeysForOwner, getRegistrarKey, init as initVsr, positionKey, } from "@helium/voter-stake-registry-sdk"; -import { AccountInfo, Connection, PublicKey } from "@solana/web3.js"; +import { PublicKey } from "@solana/web3.js"; import { BN } from "bn.js"; import { Proxy, Registrar } from "../sdk/types"; -import { TOKEN_PROGRAM_ID } from "@coral-xyz/anchor/dist/cjs/utils/token"; -import { - PROGRAM_ID as MPL_PID, - Metadata, -} from "@metaplex-foundation/mpl-token-metadata"; export interface GetPositionsArgs { wallet: PublicKey; @@ -39,83 +34,20 @@ export const getPositionKeys = async ( registrarPk )) as Registrar; - const myProxies = await voteService.getProxyAssignmentsForWallet(me); - const delegationPositions = myProxies.map( + const myProxies = await voteService.getProxyAssignmentsForWallet(me, mint); + const proxyPositions = myProxies.map( (del) => positionKey(new PublicKey(del.asset))[0] ); - let positionKeys: PublicKey[] = []; - try { - let page = 1; - const limit = 1000; - let allAssets: Asset[] = []; - while (true) { - const assets = - (await searchAssets(provider.connection.rpcEndpoint, { - page, - limit, - ownerAddress: wallet.toBase58(), - tokenType: "fungible", - collection: registrar.collection.toBase58(), - })) || []; - - allAssets = allAssets.concat(assets); - - if (assets.length < limit) { - break; - } - - page++; - } - positionKeys = allAssets - .filter((asset) => - asset.grouping?.find( - (group) => - group.group_key === "collection" && - group.group_value.equals(registrar.collection) - ) - ) - .map((asset) => positionKey(asset.id)[0]); - } catch (e) { - // If DAS not supported - console.error(e); - const tokens = await provider.connection.getTokenAccountsByOwner(wallet, { - programId: TOKEN_PROGRAM_ID, - }); - const metadatas = ( - await getMultipleAccounts({ - connection: provider.connection, - keys: tokens.value.map( - (t) => - PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata", "utf-8"), - MPL_PID.toBuffer(), - unpackAccount( - t.pubkey, - t.account, - TOKEN_PROGRAM_ID - ).mint.toBuffer(), - ], - MPL_PID - )[0] - ), - }) - ).map((i) => i.account && Metadata.fromAccountInfo(i.account)[0]); - positionKeys = metadatas - .filter( - (m) => - m && - m.collection?.key.equals(registrar.collection) && - m.collection?.verified - ) - .filter(truthy) - .map((m) => positionKey(m.mint)[0]); - } + let { positions: positionKeys } = await getPositionKeysForOwner({ + connection: provider.connection, + owner: wallet, + collection: registrar.collection, + }) return { positionKeys, - proxiedPositionKeys: delegationPositions, + proxiedPositionKeys: proxyPositions, proxies: myProxies.map((d) => ({ voter: new PublicKey(d.voter), nextVoter: new PublicKey(d.nextVoter), @@ -130,27 +62,3 @@ export const getPositionKeys = async ( }; }; -async function getMultipleAccounts({ - connection, - keys, -}: { - connection: Connection; - keys: PublicKey[]; -}): Promise<{ pubkey: PublicKey; account: AccountInfo | null }[]> { - const batchSize = 100; - const batches = Math.ceil(keys.length / batchSize); - const results: { pubkey: PublicKey; account: AccountInfo | null }[] = - []; - - for (let i = 0; i < batches; i++) { - const batchKeys = keys.slice(i * batchSize, (i + 1) * batchSize); - const batchResults = await connection.getMultipleAccountsInfo(batchKeys, { - commitment: "confirmed", - }); - results.push( - ...batchResults.map((account, i) => ({ account, pubkey: batchKeys[i] })) - ); - } - - return results; -} diff --git a/packages/voter-stake-registry-sdk/src/helpers.ts b/packages/voter-stake-registry-sdk/src/helpers.ts new file mode 100644 index 000000000..25d39b07e --- /dev/null +++ b/packages/voter-stake-registry-sdk/src/helpers.ts @@ -0,0 +1,124 @@ +import { Asset, searchAssets, truthy } from "@helium/spl-utils"; +import { AccountInfo, PublicKey, Connection } from "@solana/web3.js"; +import { positionKey } from "./pdas"; +import { TOKEN_PROGRAM_ID, unpackAccount } from "@solana/spl-token"; +import { + PROGRAM_ID as MPL_PID, + Metadata, +} from "@metaplex-foundation/mpl-token-metadata"; + +export async function getPositionKeysForOwner({ + connection, + owner, + collection, +}: { + connection: Connection; + owner: PublicKey; + collection: PublicKey; +}): Promise<{ positions: PublicKey[]; assets: PublicKey[] }> { + let positions: PublicKey[] = []; + let assets: PublicKey[] = []; + + try { + let page = 1; + const limit = 1000; + let allAssets: Asset[] = []; + while (true) { + const assets = + (await searchAssets(connection.rpcEndpoint, { + page, + limit, + ownerAddress: owner.toBase58(), + tokenType: "fungible", + collection: collection.toBase58(), + })) || []; + + allAssets = allAssets.concat(assets); + + if (assets.length < limit) { + break; + } + + page++; + } + const filtered = allAssets.filter((asset) => + asset.grouping?.find( + (group) => + group.group_key === "collection" && + group.group_value.equals(collection) + ) + ); + positions = filtered.map((asset) => positionKey(asset.id)[0]); + assets = filtered.map((f) => f.id); + } catch (e) { + // If DAS not supported + console.error(e); + const tokens = await connection.getTokenAccountsByOwner(owner, { + programId: TOKEN_PROGRAM_ID, + }); + const withMetas = tokens.value.map((t) => { + const mint = unpackAccount(t.pubkey, t.account, TOKEN_PROGRAM_ID).mint; + return { + mint, + metadata: PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata", "utf-8"), + MPL_PID.toBuffer(), + mint.toBuffer(), + ], + MPL_PID + )[0], + }; + }); + const metadatas = ( + await getMultipleAccounts({ + connection, + keys: withMetas.map((w) => w.metadata), + }) + ).map((i) => i.account && Metadata.fromAccountInfo(i.account)[0]); + const filtered = metadatas + .map((m, i) => ({ + ...withMetas[i], + metadataAcc: m, + })) + .filter( + (m) => + m && + m.metadataAcc?.collection?.key.equals(collection) && + m.metadataAcc?.collection?.verified + ) + .filter(truthy); + positions = filtered.map((m) => positionKey(m.mint)[0]); + assets = filtered.map((f) => f.mint); + } + + return { + positions, + assets, + }; +} + +async function getMultipleAccounts({ + connection, + keys, +}: { + connection: Connection; + keys: PublicKey[]; +}): Promise<{ pubkey: PublicKey; account: AccountInfo | null }[]> { + const batchSize = 100; + const batches = Math.ceil(keys.length / batchSize); + const results: { pubkey: PublicKey; account: AccountInfo | null }[] = + []; + + for (let i = 0; i < batches; i++) { + const batchKeys = keys.slice(i * batchSize, (i + 1) * batchSize); + const batchResults = await connection.getMultipleAccountsInfo(batchKeys, { + commitment: "confirmed", + }); + results.push( + ...batchResults.map((account, i) => ({ account, pubkey: batchKeys[i] })) + ); + } + + return results; +} diff --git a/packages/voter-stake-registry-sdk/src/index.ts b/packages/voter-stake-registry-sdk/src/index.ts index fbf7cd42f..4ea8403f6 100644 --- a/packages/voter-stake-registry-sdk/src/index.ts +++ b/packages/voter-stake-registry-sdk/src/index.ts @@ -16,6 +16,7 @@ export type { WithRank, EnhancedProxyData, } from "./voteService"; +export { getPositionKeysForOwner } from "./helpers"; export function getRegistrarKey(mint: PublicKey) { return registrarKey( diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index 29cdfbc76..0f40ba6e7 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -180,6 +180,7 @@ export class VoteService { async getProxyAssignmentsForWallet( wallet: PublicKey, + votingMint: PublicKey, minProxyIndex: number = 0 ): Promise { if (this.client) { @@ -189,6 +190,7 @@ export class VoteService { limit: 10000, voter: wallet.toBase58(), minIndex: minProxyIndex, + votingMint, }, }) ).data; From eba2f8c065b99d3804ed1877e99052f22374712a Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Wed, 29 May 2024 15:02:06 -0700 Subject: [PATCH 025/130] WIP: History --- packages/helium-vote-service/src/index.ts | 44 +++++++++++++++---- .../src/voteService.ts | 4 +- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index c90c4745d..80afacdef 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -136,7 +136,12 @@ server.get<{ server.get<{ Params: { registrar: string }; - Querystring: { registrar: string; page: number; limit: number }; + Querystring: { + registrar: string; + page: number; + limit: number; + query: string; + }; }>("/v1/registrars/:registrar/proxies", async (request, reply) => { const limit = Number(request.query.limit || 1000); // default limit const offset = Number((request.query.page || 1) - 1) * limit; @@ -177,6 +182,15 @@ WITH JOIN proxy_registrars pr ON pr.wallet = proxies.wallet LEFT OUTER JOIN positions_with_proxy_assignments p ON p.voter = proxies.wallet WHERE pr.registrar = ${escapedRegistrar} + ${ + request.query.query + ? `AND (proxies.name ILIKE ${sequelize.escape( + `%${request.query.query}%` + )} OR proxies.wallet ILIKE ${sequelize.escape( + `%${request.query.query}%` + )})` + : "" + } GROUP BY name, image, @@ -186,7 +200,7 @@ WITH ) SELECT pa.*, - COUNT(vm.voter) as "numProposalsVoted", + COUNT(distinct vm.proposal) as "numProposalsVoted", MAX(vm.created_at) as "lastVotedAt" FROM proxies_with_assignments pa LEFT OUTER JOIN vote_markers vm ON vm.voter = pa.wallet @@ -253,10 +267,26 @@ WITH COUNT(*) OVER () as "numProxies", RANK() OVER (ORDER BY "delegatedVeTokens" DESC) as rank FROM proxies_with_assignments pa + ), + proxies_with_votes AS ( + SELECT + name, + image, + wallet, + description, + detail, + "numAssignments", + "delegatedVeTokens", + "percent", + count(distinct vm.proposal) as "numProposalsVoted" + FROM + proxies_with_rank proxies + LEFT OUTER JOIN vote_markers vm ON vm.voter = proxies.wallet AND vm.registrar = ${escapedRegistrar} + GROUP BY name, image, wallet, description, detail, "numAssignments", "delegatedVeTokens", "percent" ) SELECT * -FROM proxies_with_rank +FROM proxies_with_votes LIMIT 1 `); return proxies[0][0]; @@ -328,11 +358,9 @@ SELECT 'choice', vms.choice, 'choiceName', p.choices[vms.choice + 1]->>'name' )) as votes -FROM exploded_choice_vote_markers vms -JOIN proposals p ON vms.proposal = p.address -WHERE p.namespace = ${sequelize.escape( - ORG_IDS[mint] - )} AND vms.registrar = ${registrar} AND vms.voter = ${wallet} +FROM proposals p +LEFT OUTER JOIN exploded_choice_vote_markers vms ON vms.proposal = p.address AND vms.registrar = ${registrar} AND vms.voter = ${wallet} +WHERE p.namespace = ${sequelize.escape(ORG_IDS[mint])} GROUP BY p.address OFFSET ${offset} LIMIT ${limit}; diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index 0f40ba6e7..9584b9b60 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -287,9 +287,11 @@ export class VoteService { async getProxies({ page, limit, + query }: { page: number; limit: number; + query?: string; }): Promise { if (!this.client) { throw new Error("This operation is not supported without an API"); @@ -297,7 +299,7 @@ export class VoteService { const response = await this.client.get( `/v1/registrars/${this.registrar.toBase58()}/proxies`, { - params: { page, limit }, + params: { page, limit, query }, } ); return response.data.map(this.mapRoutes); From 1da150d14ace2d5723a116c659982df81ddd99f0 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Thu, 30 May 2024 12:14:22 -0700 Subject: [PATCH 026/130] WIP --- packages/helium-vote-service/src/index.ts | 20 ++++++++++++++++--- .../src/voteService.ts | 10 ++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index 80afacdef..c07dd7018 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -217,7 +217,6 @@ server.get<{ }>("/v1/registrars/:registrar/proxies/:wallet", async (request, reply) => { const registrar = request.params.registrar; const escapedRegistrar = sequelize.escape(registrar); - const wallet = request.params.wallet; const escapedWallet = sequelize.escape(request.params.wallet); const proxies = await sequelize.query(` @@ -278,11 +277,14 @@ WITH "numAssignments", "delegatedVeTokens", "percent", - count(distinct vm.proposal) as "numProposalsVoted" + "numProxies", + rank, + count(distinct vm.proposal) as "numProposalsVoted", + MAX(vm.created_at) as "lastVotedAt" FROM proxies_with_rank proxies LEFT OUTER JOIN vote_markers vm ON vm.voter = proxies.wallet AND vm.registrar = ${escapedRegistrar} - GROUP BY name, image, wallet, description, detail, "numAssignments", "delegatedVeTokens", "percent" + GROUP BY "numProxies", rank, name, image, wallet, description, detail, "numAssignments", "delegatedVeTokens", "percent" ) SELECT * @@ -292,6 +294,18 @@ LIMIT 1 return proxies[0][0]; }); +server.get<{ + Params: { wallet: string }; +}>("/v1/proxies/:wallet/registrars", async (request, reply) => { + const wallet = request.params.wallet; + const registrars = await ProxyRegistrar.findAll({ + where: { + wallet, + }, + }); + return registrars.map(r => r.registrar); +}); + server.get<{ Params: { registrar: string }; Querystring: { query: string } }>( "/v1/registrars/:registrar/proxies/search", async (request, reply) => { diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index 9584b9b60..f107aeffb 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -123,6 +123,16 @@ export class VoteService { } } + async getRegistrarsForProxy(wallet: PublicKey): Promise { + if (this.client) { + return ( + await this.client.get(`/v1/proxies/${wallet.toBase58()}/registrars`) + ).data; + } else { + throw new Error("This is not supported without an indexer"); + } + } + async getProxyAssignmentsForPosition( position: PublicKey, minProxyIndex: number = 0 From 61f1893546f5e8264d2f216f988e221dc8617601 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 31 May 2024 14:16:19 -0700 Subject: [PATCH 027/130] Finish, just need to do more testing --- .../src/hooks/useVote.ts | 35 ++++++++++++++++--- .../src/voteService.ts | 2 +- .../src/instructions/relinquish_vote_v1.rs | 8 +++++ 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts index 04e60b2ef..1e58c9796 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts @@ -23,16 +23,40 @@ export const useVote = (proposalKey: PublicKey) => { const { accounts: markers } = useVoteMarkers(voteMarkerKeys); const voteWeights: BN[] | undefined = useMemo(() => { if (proposal && markers) { - return markers.reduce((acc, marker) => { + return markers.reduce((acc, marker, idx) => { + const position = positions?.[idx]; marker.info?.choices.forEach((choice) => { - acc[choice] = (acc[choice] || new BN(0)).add( - marker.info?.weight || new BN(0) - ); + // Only count my own and down the line vote weights + if ((marker?.info?.proxyIndex || 0) >= (position?.proxy?.index || 0)) { + acc[choice] = (acc[choice] || new BN(0)).add( + marker.info?.weight || new BN(0) + ); + } }); return acc; }, new Array(proposal?.choices.length)); } - }, [proposal, markers]); + }, [proposal, markers, positions]); + const voters: (PublicKey)[][] | undefined = useMemo(() => { + if (proposal && markers) { + const nonUniqueResult = markers.reduce((acc, marker, idx) => { + const position = positions?.[idx] + marker.info?.choices.forEach((choice) => { + acc[choice] ||= []; + if ( + marker.info?.voter && + marker.info.proxyIndex > (position?.proxy?.index || 0) + ) { + acc[choice].push(marker.info.voter); + } + + return acc; + }); + return acc; + }, new Array(proposal?.choices.length)); + return nonUniqueResult.map((voters) => Array.from(new Set(voters))); + } + }, [markers, positions]); const canVote = useCallback( (choice: number) => { if (!markers) return false; @@ -151,5 +175,6 @@ export const useVote = (proposalKey: PublicKey) => { markers, voteWeights, canVote, + voters, }; }; diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index f107aeffb..00d0ebdf9 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -142,7 +142,7 @@ export class VoteService { await this.client.get(`/v1/proxy-assignments`, { params: { limit: 10000, - asset: position.toBase58(), + position: position.toBase58(), minIndex: minProxyIndex, }, }) diff --git a/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs b/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs index 2888d1a67..0985dbefe 100644 --- a/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs +++ b/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs @@ -18,6 +18,7 @@ pub struct RelinquishVoteV1<'info> { bump = marker.bump_seed, has_one = registrar, has_one = mint, + has_one = rent_refund, )] pub marker: Box>, pub registrar: Box>, @@ -58,6 +59,9 @@ pub struct RelinquishVoteV1<'info> { )] pub proposal_program: AccountInfo<'info>, pub system_program: Program<'info, System>, + /// CHECK: has one on the marker gets this + #[account(mut)] + pub rent_refund: AccountInfo<'info>, } pub fn handler(ctx: Context, args: RelinquishVoteArgsV1) -> Result<()> { @@ -98,5 +102,9 @@ pub fn handler(ctx: Context, args: RelinquishVoteArgsV1) -> Re }, )?; + if marker.choices.is_empty() { + marker.close(ctx.accounts.rent_refund.to_account_info())?; + } + Ok(()) } From 1237b3967491a406b4b16f1ad44acf681fe01d9d Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Mon, 10 Jun 2024 10:45:33 -0700 Subject: [PATCH 028/130] Reset token consts --- packages/spl-utils/src/constants.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/spl-utils/src/constants.ts b/packages/spl-utils/src/constants.ts index 917289063..c2baab6b4 100644 --- a/packages/spl-utils/src/constants.ts +++ b/packages/spl-utils/src/constants.ts @@ -4,22 +4,13 @@ export const DC_MINT = new PublicKey( "dcuc8Amr83Wz27ZkQ2K9NS6r8zRpf1J6cvArEBDZDmm" ); -// export const HNT_MINT = new PublicKey("hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux"); -export const HNT_MINT = new PublicKey( - "APqAVo5q9erS8GaXcbJuy3Gx4ikuSzXjzY4SnyppPUm1" -); +export const HNT_MINT = new PublicKey("hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux"); -// export const MOBILE_MINT = new PublicKey( -// "mb1eu7TzEc71KxDpsmsKoucSSuuoGLv1drys1oP2jh6" -// ); export const MOBILE_MINT = new PublicKey( - "CoQciaEADT77zudZQm4atzWjHmHcJKfzZBivbifHScvZ" + "mb1eu7TzEc71KxDpsmsKoucSSuuoGLv1drys1oP2jh6" ); -// export const IOT_MINT = new PublicKey("iotEVVZLEywoTn1QdwNPddxPWszn3zFhEot3MfL9fns"); -export const IOT_MINT = new PublicKey( - "g69eEQjY4bv1UvjaeTUcaCNoJ6v8jSsjL3dojN6uC4B" -); +export const IOT_MINT = new PublicKey("iotEVVZLEywoTn1QdwNPddxPWszn3zFhEot3MfL9fns"); // TODO: Replace with actual HNT feed export const HNT_PYTH_PRICE_FEED = new PublicKey( From 823cc6bd9fcbc5ce9707de6c252754aed80ef40e Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Mon, 10 Jun 2024 10:46:25 -0700 Subject: [PATCH 029/130] Lint --- .../voter-stake-registry/src/instructions/proxied_vote_v0.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs b/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs index 0087483b0..2b9dbc217 100644 --- a/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs +++ b/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs @@ -95,10 +95,10 @@ pub fn handler(ctx: Context, args: VoteArgsV0) -> Result<()> { let weight = if marker.weight > 0 { marker.weight } else { - u128::from(ctx.accounts.position.voting_power( + ctx.accounts.position.voting_power( voting_mint_config, ctx.accounts.registrar.clock_unix_timestamp(), - )?) + )? }; marker.weight = weight; From f6b71e5ac74c0bb747303a5b68fa14c8c48c6632 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Thu, 13 Jun 2024 12:12:22 -0700 Subject: [PATCH 030/130] Fix bootstrap command --- .../{set-delegation-config.ts => set-proxy-config.ts} | 10 +++++----- packages/helium-vote-service/.env | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) rename packages/helium-admin-cli/src/{set-delegation-config.ts => set-proxy-config.ts} (93%) diff --git a/packages/helium-admin-cli/src/set-delegation-config.ts b/packages/helium-admin-cli/src/set-proxy-config.ts similarity index 93% rename from packages/helium-admin-cli/src/set-delegation-config.ts rename to packages/helium-admin-cli/src/set-proxy-config.ts index 281acf73d..3979e4aa4 100644 --- a/packages/helium-admin-cli/src/set-delegation-config.ts +++ b/packages/helium-admin-cli/src/set-proxy-config.ts @@ -35,9 +35,9 @@ export async function run(args: any = process.argv) { describe: "Authority index for squads. Defaults to 1", default: 1, }, - delegationSeasonsFile: { + proxySeasonsFile: { type: "string", - default: `${__dirname}/../../delegation-seasons.json`, + default: `${__dirname}/../../proxy-seasons.json`, }, }); @@ -61,11 +61,11 @@ export async function run(args: any = process.argv) { const vsrProgram = await initVsr(provider); const registrar = new PublicKey(argv.registrar); - const delegationSeasonsFile = fs.readFileSync( - argv.delegationSeasonsFile, + const proxySeasonsFile = fs.readFileSync( + argv.proxySeasonsFile, "utf8" ); - const seasons = JSON.parse(delegationSeasonsFile).map( + const seasons = JSON.parse(proxySeasonsFile).map( (s) => new anchor.BN(Math.floor(Date.parse(s) / 1000)) ); diff --git a/packages/helium-vote-service/.env b/packages/helium-vote-service/.env index 5785f49d0..4d4fecb52 100644 --- a/packages/helium-vote-service/.env +++ b/packages/helium-vote-service/.env @@ -1,3 +1,4 @@ PGDATABASE=postgres PGUSER=postgres PGPASSWORD=postgres +SOLANA_URL=https://solana-rpc.web.test-helium.com?session-key=Pluto From 80af2ea875d7337e9f3fec87d6c548e5ba7c3654 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 14 Jun 2024 15:07:58 -0700 Subject: [PATCH 031/130] WIP: React-query --- packages/helium-admin-cli/src/create-dao.ts | 2 +- .../helium-admin-cli/src/create-subdao.ts | 2 +- .../helium-admin-cli/src/set-proxy-config.ts | 14 ++- packages/helium-vote-service/src/index.ts | 54 +++-------- .../voter-stake-registry-hooks/package.json | 1 + .../src/contexts/heliumVsrContext.tsx | 77 ++++++---------- .../src/hooks/useAssignProxies.ts | 77 +++++++++++----- .../src/hooks/usePositionKeysAndProxies.ts | 91 +++++++++++++++++++ .../src/hooks/useVoters.ts | 38 ++++++++ .../src/hooks/useVotesForWallet.ts | 38 ++++++++ .../voter-stake-registry-hooks/src/index.ts | 4 +- .../src/utils/getPositionKeys.ts | 64 ------------- .../yarn.deploy.lock | 19 ++++ .../voter-stake-registry-sdk/src/index.ts | 3 +- .../src/voteService.ts | 14 --- yarn.lock | 19 ++++ 16 files changed, 317 insertions(+), 200 deletions(-) create mode 100644 packages/voter-stake-registry-hooks/src/hooks/usePositionKeysAndProxies.ts create mode 100644 packages/voter-stake-registry-hooks/src/hooks/useVoters.ts create mode 100644 packages/voter-stake-registry-hooks/src/hooks/useVotesForWallet.ts delete mode 100644 packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts diff --git a/packages/helium-admin-cli/src/create-dao.ts b/packages/helium-admin-cli/src/create-dao.ts index 9189ad60d..dff7cb3ea 100644 --- a/packages/helium-admin-cli/src/create-dao.ts +++ b/packages/helium-admin-cli/src/create-dao.ts @@ -288,7 +288,7 @@ export async function run(args: any = process.argv) { // Set max time to 2 years, though seasons should take precedent maxProxyTime: new anchor.BN(24 * 60 * 60 * 365 * 2), seasons, - name: "Helium", + name: "Helium V1", }) .accounts({ authority, diff --git a/packages/helium-admin-cli/src/create-subdao.ts b/packages/helium-admin-cli/src/create-subdao.ts index ff300774b..5f5e97979 100644 --- a/packages/helium-admin-cli/src/create-subdao.ts +++ b/packages/helium-admin-cli/src/create-subdao.ts @@ -306,7 +306,7 @@ export async function run(args: any = process.argv) { // Set max time to 2 years, though seasons should take precedent maxProxyTime: new anchor.BN(24 * 60 * 60 * 365 * 2), seasons, - name: "Helium", + name: "Helium V1", }) .accounts({ authority, diff --git a/packages/helium-admin-cli/src/set-proxy-config.ts b/packages/helium-admin-cli/src/set-proxy-config.ts index 3979e4aa4..9bc3ed15a 100644 --- a/packages/helium-admin-cli/src/set-proxy-config.ts +++ b/packages/helium-admin-cli/src/set-proxy-config.ts @@ -61,13 +61,11 @@ export async function run(args: any = process.argv) { const vsrProgram = await initVsr(provider); const registrar = new PublicKey(argv.registrar); - const proxySeasonsFile = fs.readFileSync( - argv.proxySeasonsFile, - "utf8" - ); - const seasons = JSON.parse(proxySeasonsFile).map( - (s) => new anchor.BN(Math.floor(Date.parse(s) / 1000)) - ); + const proxySeasonsFile = fs.readFileSync(argv.proxySeasonsFile, "utf8"); + const seasons = JSON.parse(proxySeasonsFile).map((s) => ({ + start: new anchor.BN(Math.floor(Date.parse(s.start) / 1000)), + end: new anchor.BN(Math.floor(Date.parse(s.end) / 1000)), + })); const { pubkeys: { proxyConfig }, @@ -77,7 +75,7 @@ export async function run(args: any = process.argv) { // Set max time to 2 years, though seasons should take precedent maxProxyTime: new anchor.BN(24 * 60 * 60 * 365 * 2), seasons, - name: "Helium", + name: "Helium V1", }) .accounts({ authority, diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index c07dd7018..a33accfc4 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -50,6 +50,17 @@ server.get("/v1/sync", async () => { await readProxiesAndUpsert(); }); +const registrarsByMint = { + [HNT_MINT.toBase58()]: new PublicKey( + "BMnWRWZrWqb6JMKznaDqNxWaWAHoaTzVabM6Qwyh3WKz" + ), + [IOT_MINT.toBase58()]: new PublicKey( + "7ZZopN1mx6ECcb3YCG8dbxeLpA44xq4gzA1ETEiaLoeL" + ), + [MOBILE_MINT.toBase58()]: new PublicKey( + "C4DWaps9bLiqy4e81wJ7VTQ6QR7C4MWvwsei3ZjsaDuW" + ), +}; server.get<{ Params: { position: string }; Querystring: { @@ -61,7 +72,7 @@ server.get<{ position: string; votingMint: string; }; -}>("/v1/proxy-assignments", async (request, reply) => { +}>("/v1/proxy-assignments", async (request) => { const { position, voter: voter, @@ -73,15 +84,7 @@ server.get<{ } = request.query; const where: any = {}; if (voter) { - const registrar = ( - ( - await sequelize.query( - `SELECT address FROM registrars WHERE voting_mints[1]->>'mint' = ${sequelize.escape( - votingMint - )}` - ) - )[0][0] as any - ).address; + const registrar = registrarsByMint[votingMint]; const collection = registrarCollectionKey(new PublicKey(registrar))[0]; const { assets } = await getPositionKeysForOwner({ connection: new Connection(SOLANA_URL), @@ -303,38 +306,9 @@ server.get<{ wallet, }, }); - return registrars.map(r => r.registrar); + return registrars.map((r) => r.registrar); }); -server.get<{ Params: { registrar: string }; Querystring: { query: string } }>( - "/v1/registrars/:registrar/proxies/search", - async (request, reply) => { - const query = request.query.query; - const registrar = request.params.registrar; - const proxies = await Proxy.findAll({ - attributes: ["name", "description", "image", "wallet", "detail"], - where: { - [Op.or]: [ - { name: { [Op.iLike]: `%${query}%` } }, - { wallet: { [Op.like]: `${query}%` } }, - ], - }, - include: [ - { - model: ProxyRegistrar, - where: { - registrar, - }, - required: true, - attributes: [], - }, - ], - limit: 10, - }); - return proxies; - } -); - const ORG_IDS = { [HNT_MINT.toBase58()]: organizationKey("Helium")[0].toBase58(), [MOBILE_MINT.toBase58()]: organizationKey("Helium MOBILE")[0].toBase58(), diff --git a/packages/voter-stake-registry-hooks/package.json b/packages/voter-stake-registry-hooks/package.json index 0a2ec67f5..bd0611fc9 100644 --- a/packages/voter-stake-registry-hooks/package.json +++ b/packages/voter-stake-registry-hooks/package.json @@ -44,6 +44,7 @@ "@solana/wallet-adapter-base": "^0.9.22", "@solana/wallet-adapter-react": "^0.15.32", "@solana/web3.js": "^1.78.8", + "@tanstack/react-query": "^5.45.0", "axios": "^1.3.6", "bs58": "^4.0.1", "react-async-hook": "^4.0.0" diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index a0b6bac53..397ca220a 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -5,33 +5,28 @@ import { delegatedPositionKey, } from "@helium/helium-sub-daos-sdk"; import { VoterStakeRegistry } from "@helium/idls/lib/types/voter_stake_registry"; +import { init as initNftProxy } from "@helium/nft-proxy-sdk"; import { truthy } from "@helium/spl-utils"; +import { + VoteService, + getRegistrarKey, + init, +} from "@helium/voter-stake-registry-sdk"; import { Connection, PublicKey } from "@solana/web3.js"; import React, { createContext, useCallback, useContext, - useEffect, useMemo, - useState, + useState } from "react"; import { useAsync } from "react-async-hook"; import { useDelegatedPositions } from "../hooks/useDelegatedPositions"; -import { useProxyAssignments } from "../hooks/useProxies"; +import { usePositionKeysAndProxies } from "../hooks/usePositionKeysAndProxies"; import { usePositions } from "../hooks/usePositions"; import { useRegistrar } from "../hooks/useRegistrar"; -import { init as initNftProxy } from "@helium/nft-proxy-sdk"; -import { ProxyAssignmentV0, PositionWithMeta } from "../sdk/types"; +import { PositionWithMeta, ProxyAssignmentV0 } from "../sdk/types"; import { calcPositionVotingPower } from "../utils/calcPositionVotingPower"; -import { - GetPositionsArgs as GetPosArgs, - getPositionKeys, -} from "../utils/getPositionKeys"; -import { - VoteService, - getRegistrarKey, - init, -} from "@helium/voter-stake-registry-sdk"; type Registrar = IdlAccounts["registrar"]; @@ -123,51 +118,39 @@ export const HeliumVsrStateProvider: React.FC<{ } } }, [provider, registrarKey, urlVoteService]); - const args = useMemo( - () => - wallet && - mint && - connection && - voteService && - ({ - wallet: provider?.publicKey, - mint, - provider, - callIndex, - voteService, - } as GetPosArgs), - [mint, provider, callIndex, voteService] - ); const { info: registrar } = useRegistrar(registrarKey); - const { result, loading, error } = useAsync( - async (args: GetPosArgs | undefined) => { - if (args) { - return await getPositionKeys(args); - } - }, - [args] - ); + const { + positionKeys, + proxiedPositionKeys, + proxies: proxyAccounts, + isLoading, + error, + } = usePositionKeysAndProxies({ + wallet: me, + provider, + voteService, + mint, + }); + const delegatedPositionKeys = useMemo(() => { - return result?.positionKeys.map((pk) => delegatedPositionKey(pk)[0]); - }, [result?.positionKeys]); + return positionKeys?.map((pk) => delegatedPositionKey(pk)[0]); + }, [positionKeys]); const { accounts: delegatedAccounts, loading: loadingDel } = useDelegatedPositions(delegatedPositionKeys); - const proxyAccounts = result?.proxies; const proxyAccountsByAsset = useMemo(() => { return proxyAccounts?.reduce((acc, prox) => { acc[prox.asset.toBase58()] = prox; return acc; }, {} as Record); }, [proxyAccounts]); - const myOwnedPositionsEndIdx = result?.positionKeys?.length; + const myOwnedPositionsEndIdx = positionKeys?.length; // Assume that my positions are a small amount, so we don't need to say they're static - const { accounts: myPositions, loading: loadingMyPositions } = usePositions( - result?.positionKeys - ); + const { accounts: myPositions, loading: loadingMyPositions } = + usePositions(positionKeys); // Proxied positions may be a lot, set to static const { accounts: proxiedPositions, loading: loadingDelPositions } = - usePositions(result?.proxiedPositionKeys, true); + usePositions(proxiedPositionKeys, true); const positions = useMemo(() => { const uniquePositions = new Map(); [...(myPositions || []), ...(proxiedPositions || [])].forEach( @@ -272,7 +255,7 @@ export const HeliumVsrStateProvider: React.FC<{ const loadingPositions = loadingMyPositions || loadingDelPositions; const ret = useMemo( () => ({ - loading: loading || loadingPositions || loadingDel, + loading: isLoading || loadingPositions || loadingDel, error, amountLocked, amountProxyLocked, @@ -292,7 +275,7 @@ export const HeliumVsrStateProvider: React.FC<{ [ loadingPositions, loadingDel, - loading, + isLoading, error, amountLocked, amountProxyLocked, diff --git a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts index 7f6828b5e..8aef2b0c5 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts @@ -3,18 +3,22 @@ import { PROGRAM_ID, init, proxyAssignmentKey } from "@helium/nft-proxy-sdk"; import { Status, batchParallelInstructionsWithPriorityFee, - truthy + truthy, } from "@helium/spl-utils"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import BN from "bn.js"; import { useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; -import { PositionWithMeta } from "../sdk/types"; +import { PositionWithMeta, ProxyAssignmentV0 } from "../sdk/types"; +import { useMutation, useQueryClient } from "@tanstack/react-query"; +import { ProxyAssignment } from "@helium/voter-stake-registry-sdk"; export const useAssignProxies = () => { - const { provider, registrar, refetch, voteService } = useHeliumVsrState(); - const { error, loading, execute } = useAsyncCallback( - async ({ + const { provider, registrar, mint, voteService } = + useHeliumVsrState(); + const queryClient = useQueryClient(); + return useMutation({ + mutationFn: async ({ positions, recipient, programId = PROGRAM_ID, @@ -23,7 +27,6 @@ export const useAssignProxies = () => { onProgress, maxSignatureBatch, }: { - positions: PositionWithMeta[]; recipient: PublicKey; programId?: PublicKey; @@ -39,7 +42,7 @@ export const useAssignProxies = () => { const idl = await Program.fetchIdl(programId, provider); const nftProxyProgram = await init(provider as any, programId, idl); - if (loading) return; + let resultingAssignments: ProxyAssignment[] = []; if (isInvalid || !nftProxyProgram || !registrar || !voteService) { throw new Error("Unable to voting delegate, Invalid params"); @@ -51,18 +54,25 @@ export const useAssignProxies = () => { position.mint, provider.wallet.publicKey )[0]; - let proxyAssignment = await nftProxyProgram.account.proxyAssignmentV0.fetchNullable( - currentProxyAssignment - ); + let proxyAssignment = + await nftProxyProgram.account.proxyAssignmentV0.fetchNullable( + currentProxyAssignment + ); if (!proxyAssignment) { currentProxyAssignment = proxyAssignmentKey( registrar.proxyConfig, position.mint, PublicKey.default )[0]; - proxyAssignment = await nftProxyProgram.account.proxyAssignmentV0.fetchNullable(currentProxyAssignment); + proxyAssignment = + await nftProxyProgram.account.proxyAssignmentV0.fetchNullable( + currentProxyAssignment + ); } - if (proxyAssignment && !proxyAssignment.nextVoter?.equals(PublicKey.default)) { + if ( + proxyAssignment && + !proxyAssignment.nextVoter?.equals(PublicKey.default) + ) { const toUndelegate = await voteService.getProxyAssignmentsForPosition( position.pubkey, @@ -94,6 +104,20 @@ export const useAssignProxies = () => { instructions.push(...ixs); } + + resultingAssignments.push({ + address: currentProxyAssignment.toBase58(), + asset: position.mint.toBase58(), + nextVoter: recipient.toBase58(), + voter: position.isProxiedToMe + ? provider.wallet.publicKey.toBase58() + : PublicKey.default.toBase58(), + proxyConfig: registrar.proxyConfig.toBase58(), + index: 0, + expirationTime: expirationTime.toString(), + rentRefund: recipient.toBase58(), + bumpSeed: 0, + }); const { instruction, pubkeys: { nextProxyAssignment }, @@ -132,15 +156,24 @@ export const useAssignProxies = () => { ); } - // Wait a couple seconds for changes to hit pg-sink - setTimeout(refetch, 2 * 1000); + queryClient.setQueryData( + [ + "proxyAssignmentsForWallet", + { + registrar: voteService.registrar.toBase58(), + wallet: provider.wallet.publicKey.toBase58(), + mint: mint?.toBase58(), + }, + ], + (old) => { + const changed = new Set(resultingAssignments.map((r) => r.address)); + return [ + ...(old || []).filter((todo) => !changed.has(todo.address)), + ...resultingAssignments, + ]; + } + ); } - } - ); - - return { - error, - loading, - assignProxies: execute, - }; + }, + }); }; diff --git a/packages/voter-stake-registry-hooks/src/hooks/usePositionKeysAndProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/usePositionKeysAndProxies.ts new file mode 100644 index 000000000..65ee49e0e --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/hooks/usePositionKeysAndProxies.ts @@ -0,0 +1,91 @@ +import { AnchorProvider, BN } from "@coral-xyz/anchor"; +import { + VoteService, + getPositionKeysForOwner, + getRegistrarKey, + positionKey, +} from "@helium/voter-stake-registry-sdk"; +import { PublicKey } from "@solana/web3.js"; +import { useQuery } from "@tanstack/react-query"; +import { useMemo } from "react"; +import { useRegistrar } from "./useRegistrar"; + +export interface GetPositionKeysAndProxiesArgs { + wallet?: PublicKey; + mint?: PublicKey; + provider?: AnchorProvider; + voteService?: VoteService; +} + +export function usePositionKeysAndProxies({ + wallet, + mint, + provider, + voteService, +}: GetPositionKeysAndProxiesArgs) { + const registrarKey = useMemo( + () => mint && getRegistrarKey(mint), + [mint?.toBase58()] + ); + const { info: registrar } = useRegistrar(registrarKey); + const { + data: myProxies, + error: myProxyError, + isLoading: myProxyLoading, + } = useQuery({ + queryKey: [ + "proxyAssignmentsForWallet", + { + registrar: voteService?.registrar.toBase58(), + wallet: wallet?.toBase58(), + mint: mint?.toBase58(), + }, + ], + queryFn: () => voteService!.getProxyAssignmentsForWallet(wallet!, mint!), + enabled: !!wallet && !!mint && !!voteService, + }); + const proxyPositions = useMemo( + () => myProxies?.map((del) => positionKey(new PublicKey(del.asset))[0]), + [myProxies] + ); + const { + data: positionKeys, + error, + isLoading, + } = useQuery({ + queryKey: [ + "positionKeys", + { + wallet, + collection: registrar?.collection, + rpcEndpoint: provider?.connection.rpcEndpoint, + }, + ], + queryFn: () => + getPositionKeysForOwner({ + connection: provider!.connection, + owner: wallet!, + collection: registrar?.collection!, + }), + enabled: !!wallet && !!registrar?.collection && !!provider, + }); + + return { + error: error || myProxyError, + isLoading: isLoading || myProxyLoading, + positionKeys: positionKeys?.positions, + assetIds: positionKeys?.assets, + proxiedPositionKeys: proxyPositions, + proxies: myProxies?.map((d) => ({ + voter: new PublicKey(d.voter), + nextVoter: new PublicKey(d.nextVoter), + address: new PublicKey(d.address), + asset: new PublicKey(d.asset), + rentRefund: new PublicKey(d.rentRefund), + proxyConfig: new PublicKey(d.proxyConfig), + index: d.index, + bumpSeed: d.bumpSeed, + expirationTime: new BN(d.expirationTime), + })), + }; +} diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVoters.ts b/packages/voter-stake-registry-hooks/src/hooks/useVoters.ts new file mode 100644 index 000000000..fb1e1e620 --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/hooks/useVoters.ts @@ -0,0 +1,38 @@ +import { useInfiniteQuery } from "@tanstack/react-query"; +import { useHeliumVsrState } from "../contexts/heliumVsrContext"; + +export function useVoters({ + search, + amountPerPage = 20, +}: { + search: string; + amountPerPage: number; +}) { + const { voteService } = useHeliumVsrState(); + return useInfiniteQuery({ + enabled: !!voteService, + queryKey: [ + "voters", + { + registrar: voteService?.registrar.toBase58(), + amountPerPage, + search, + }, + ], + queryFn: async ({ pageParam = 1 }) => { + const voters = await voteService!.getProxies({ + page: pageParam, + limit: amountPerPage, + query: search, + }); + return voters; + }, + initialPageParam: 1, + getNextPageParam: (lastPage, _, lastPageParam) => { + if (lastPage.length < amountPerPage) { + return undefined; + } + return lastPageParam + 1; + }, + }); +} diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotesForWallet.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotesForWallet.ts new file mode 100644 index 000000000..64db838d2 --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/hooks/useVotesForWallet.ts @@ -0,0 +1,38 @@ +import { useInfiniteQuery } from "@tanstack/react-query"; +import { useHeliumVsrState } from "../contexts/heliumVsrContext"; +import { PublicKey } from "@solana/web3.js"; + +export function useVotesForWallet({ + wallet, + amountPerPage = 20, +}: { + wallet: PublicKey; + amountPerPage: number; +}) { + const { voteService } = useHeliumVsrState(); + return useInfiniteQuery({ + enabled: !!voteService, + queryKey: [ + "votes", + { + registrar: voteService?.registrar.toBase58(), + wallet: wallet.toBase58(), + }, + ], + queryFn: async ({ pageParam = 1 }) => { + const voters = await voteService!.getVotesForWallet({ + page: pageParam, + limit: amountPerPage, + wallet, + }); + return voters; + }, + initialPageParam: 1, + getNextPageParam: (lastPage, _, lastPageParam) => { + if (lastPage.length < amountPerPage) { + return undefined; + } + return lastPageParam + 1; + }, + }); +} diff --git a/packages/voter-stake-registry-hooks/src/index.ts b/packages/voter-stake-registry-hooks/src/index.ts index a40fa8b00..a6312c8c9 100644 --- a/packages/voter-stake-registry-hooks/src/index.ts +++ b/packages/voter-stake-registry-hooks/src/index.ts @@ -20,12 +20,14 @@ export { usePositions } from "./hooks/usePositions"; export { useRegistrar } from "./hooks/useRegistrar"; export { calcLockupMultiplier } from "./utils/calcLockupMultiplier"; export { calcPositionVotingPower } from "./utils/calcPositionVotingPower"; +export { usePositionKeysAndProxies as usePositionKeys } from "./hooks/usePositionKeysAndProxies"; export * from "./sdk/types"; export { useAssignProxies } from "./hooks/useAssignProxies"; export { useUnassignProxies } from "./hooks/useUnassignProxies"; export { useProxyAssignments } from "./hooks/useProxies" export { useProxiedTo } from "./hooks/useProxiedTo"; -export { getPositionKeys } from "./utils/getPositionKeys"; +export { useVoters } from "./hooks/useVoters"; +export { useVotesForWallet } from "./hooks/useVotesForWallet"; export { getSubDaos } from "./utils/getSubDaos"; export { useVoteMarkers } from "./hooks/useVoteMarkers"; export { useVote } from "./hooks/useVote"; diff --git a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts b/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts deleted file mode 100644 index d4be61c0d..000000000 --- a/packages/voter-stake-registry-hooks/src/utils/getPositionKeys.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { AnchorProvider } from "@coral-xyz/anchor"; -import { } from '@helium/nft-proxy-sdk'; -import { - VoteService, - getPositionKeysForOwner, - getRegistrarKey, - init as initVsr, - positionKey, -} from "@helium/voter-stake-registry-sdk"; -import { PublicKey } from "@solana/web3.js"; -import { BN } from "bn.js"; -import { Proxy, Registrar } from "../sdk/types"; - -export interface GetPositionsArgs { - wallet: PublicKey; - mint: PublicKey; - provider: AnchorProvider; - voteService: VoteService; -} - -export const getPositionKeys = async ( - args: GetPositionsArgs -): Promise<{ - proxiedPositionKeys: PublicKey[]; - positionKeys: PublicKey[]; - proxies: Proxy[]; -}> => { - const { mint, wallet, provider, voteService } = args; - const me = wallet; - - const registrarPk = getRegistrarKey(mint); - const program = await initVsr(provider as any); - const registrar = (await program.account.registrar.fetch( - registrarPk - )) as Registrar; - - const myProxies = await voteService.getProxyAssignmentsForWallet(me, mint); - const proxyPositions = myProxies.map( - (del) => positionKey(new PublicKey(del.asset))[0] - ); - - let { positions: positionKeys } = await getPositionKeysForOwner({ - connection: provider.connection, - owner: wallet, - collection: registrar.collection, - }) - - return { - positionKeys, - proxiedPositionKeys: proxyPositions, - proxies: myProxies.map((d) => ({ - voter: new PublicKey(d.voter), - nextVoter: new PublicKey(d.nextVoter), - address: new PublicKey(d.address), - asset: new PublicKey(d.asset), - rentRefund: new PublicKey(d.rentRefund), - proxyConfig: new PublicKey(d.proxyConfig), - index: d.index, - bumpSeed: d.bumpSeed, - expirationTime: new BN(d.expirationTime), - })), - }; -}; - diff --git a/packages/voter-stake-registry-hooks/yarn.deploy.lock b/packages/voter-stake-registry-hooks/yarn.deploy.lock index 23eb7c2ca..0dde2f4f5 100644 --- a/packages/voter-stake-registry-hooks/yarn.deploy.lock +++ b/packages/voter-stake-registry-hooks/yarn.deploy.lock @@ -386,6 +386,7 @@ __metadata: "@solana/wallet-adapter-base": ^0.9.22 "@solana/wallet-adapter-react": ^0.15.32 "@solana/web3.js": ^1.78.8 + "@tanstack/react-query": ^5.45.0 axios: ^1.3.6 bs58: ^4.0.1 git-format-staged: ^2.1.3 @@ -783,6 +784,24 @@ __metadata: languageName: node linkType: hard +"@tanstack/query-core@npm:5.45.0": + version: 5.45.0 + resolution: "@tanstack/query-core@npm:5.45.0" + checksum: a3c13d90cfa12955d22fa754ebfddbea70081fc0128111083269bdd78ed0d25678f050007b753164a929a00fdef9ee5ebba945deb8e360120ae3cbae06e655a5 + languageName: node + linkType: hard + +"@tanstack/react-query@npm:^5.45.0": + version: 5.45.0 + resolution: "@tanstack/react-query@npm:5.45.0" + dependencies: + "@tanstack/query-core": 5.45.0 + peerDependencies: + react: ^18.0.0 + checksum: 3f2896e132e2fc4f5a2b77e015719cd8f74a3b5ce958d3d2ffc83cc9bd8a1a265ed54835a8751daf00b85af7bf15f8ad1a9fe123dafdfdfe3e81f17e585d0e95 + languageName: node + linkType: hard + "@tootallnate/once@npm:2": version: 2.0.0 resolution: "@tootallnate/once@npm:2.0.0" diff --git a/packages/voter-stake-registry-sdk/src/index.ts b/packages/voter-stake-registry-sdk/src/index.ts index 4ea8403f6..985903c0e 100644 --- a/packages/voter-stake-registry-sdk/src/index.ts +++ b/packages/voter-stake-registry-sdk/src/index.ts @@ -10,8 +10,7 @@ export * from "./resolvers"; export { VoteService } from "./voteService"; export type { ProposalWithVotes, - ProxyAssignment as Delegation, - ProxyAssignment as Proxy, + ProxyAssignment as ProxyAssignment, EnhancedProxy as EnhancedProxy, WithRank, EnhancedProxyData, diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index 00d0ebdf9..d3482cd0b 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -325,20 +325,6 @@ export class VoteService { return this.mapRoutes(response.data); } - async searchProxies({ query }: { query: string }): Promise { - if (!this.client) { - throw new Error("This operation is not supported without an API"); - } - - const response = await this.client.get( - `/v1/registrars/${this.registrar.toBase58()}/proxies/search`, - { - params: { query }, - } - ); - return response.data.map(this.mapRoutes); - } - mapRoutes(data: T): T { return { ...data, diff --git a/yarn.lock b/yarn.lock index 3207984bc..468227940 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1691,6 +1691,7 @@ __metadata: "@solana/wallet-adapter-base": ^0.9.22 "@solana/wallet-adapter-react": ^0.15.32 "@solana/web3.js": ^1.78.8 + "@tanstack/react-query": ^5.45.0 axios: ^1.3.6 bs58: ^4.0.1 git-format-staged: ^2.1.3 @@ -5140,6 +5141,24 @@ __metadata: languageName: node linkType: hard +"@tanstack/query-core@npm:5.45.0": + version: 5.45.0 + resolution: "@tanstack/query-core@npm:5.45.0" + checksum: a3c13d90cfa12955d22fa754ebfddbea70081fc0128111083269bdd78ed0d25678f050007b753164a929a00fdef9ee5ebba945deb8e360120ae3cbae06e655a5 + languageName: node + linkType: hard + +"@tanstack/react-query@npm:^5.45.0": + version: 5.45.0 + resolution: "@tanstack/react-query@npm:5.45.0" + dependencies: + "@tanstack/query-core": 5.45.0 + peerDependencies: + react: ^18.0.0 + checksum: 3f2896e132e2fc4f5a2b77e015719cd8f74a3b5ce958d3d2ffc83cc9bd8a1a265ed54835a8751daf00b85af7bf15f8ad1a9fe123dafdfdfe3e81f17e585d0e95 + languageName: node + linkType: hard + "@tanstack/react-virtual@npm:^3.0.0-beta.60": version: 3.2.0 resolution: "@tanstack/react-virtual@npm:3.2.0" From 38d1ed2e7fca2b27b7cea01f532c3bd0925b1163 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Mon, 17 Jun 2024 10:42:18 -0700 Subject: [PATCH 032/130] Use queries --- packages/helium-vote-service/src/index.ts | 123 +++++++++--------- packages/spl-utils/src/constants.ts | 13 ++ .../src/constants.ts | 2 + .../src/contexts/heliumVsrContext.tsx | 13 +- .../src/hooks/useAssignProxies.ts | 50 ++++--- .../src/hooks/usePositionKeysAndProxies.ts | 64 +++------ .../{useProxies.ts => useProxyAssignments.ts} | 0 .../src/hooks/useUnassignProxies.ts | 76 +++++++---- .../voter-stake-registry-hooks/src/index.ts | 8 +- .../src/queries/positionKeysForWalletQuery.ts | 31 +++++ .../useVoters.ts => queries/proxiesQuery.ts} | 15 ++- .../queries/proxyAssignmentsForWalletQuery.ts | 23 ++++ .../src/queries/proxyQuery.ts | 48 +++++++ .../voter-stake-registry-sdk/src/helpers.ts | 7 +- .../voter-stake-registry-sdk/src/index.ts | 8 +- .../src/voteService.ts | 59 +++++---- 16 files changed, 349 insertions(+), 191 deletions(-) rename packages/voter-stake-registry-hooks/src/hooks/{useProxies.ts => useProxyAssignments.ts} (100%) create mode 100644 packages/voter-stake-registry-hooks/src/queries/positionKeysForWalletQuery.ts rename packages/voter-stake-registry-hooks/src/{hooks/useVoters.ts => queries/proxiesQuery.ts} (67%) create mode 100644 packages/voter-stake-registry-hooks/src/queries/proxyAssignmentsForWalletQuery.ts create mode 100644 packages/voter-stake-registry-hooks/src/queries/proxyQuery.ts diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index a33accfc4..7720eeca6 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -62,7 +62,7 @@ const registrarsByMint = { ), }; server.get<{ - Params: { position: string }; + Params: { registrar: string }; Querystring: { page: number; limit: number; @@ -70,77 +70,76 @@ server.get<{ nextVoter: string; minIndex: number; position: string; - votingMint: string; }; -}>("/v1/proxy-assignments", async (request) => { - const { - position, - voter: voter, - nextVoter, - page = 1, - limit = 1000, - minIndex, - votingMint, - } = request.query; - const where: any = {}; - if (voter) { - const registrar = registrarsByMint[votingMint]; - const collection = registrarCollectionKey(new PublicKey(registrar))[0]; - const { assets } = await getPositionKeysForOwner({ - connection: new Connection(SOLANA_URL), - owner: new PublicKey(voter), - collection, - }); +}>( + "/v1/registrars/:registrar/proxy-assignments", + async (request) => { + const { + position, + voter: voter, + nextVoter, + page = 1, + limit = 1000, + minIndex, + } = request.query; + const where: any = {}; + if (voter) { + const registrar = request.params.registrar + const { assets } = await getPositionKeysForOwner({ + connection: new Connection(SOLANA_URL), + owner: new PublicKey(voter), + registrar: new PublicKey(registrar), + }); - where[Op.or] = [ - { - voter, - }, - { - [Op.and]: [ - { - asset: { - [Op.in]: assets.map((a) => a.toBase58()), + where[Op.or] = [ + { + voter, + }, + { + [Op.and]: [ + { + asset: { + [Op.in]: assets.map((a) => a.toBase58()), + }, + voter: PublicKey.default.toBase58(), }, - voter: PublicKey.default.toBase58(), - }, - ], - }, - ]; - } - if (nextVoter) where.nextVoter = nextVoter; - if (typeof minIndex !== "undefined") { - where.index = { - [Op.gte]: minIndex, - }; - } + ], + }, + ]; + } + if (nextVoter) where.nextVoter = nextVoter; + if (typeof minIndex !== "undefined") { + where.index = { + [Op.gte]: minIndex, + }; + } - const offset = (page - 1) * limit; + const offset = (page - 1) * limit; - return ProxyAssignment.findAll({ - where, - offset, - limit, - include: position - ? [ - { - model: Position, - where: { - address: position, + return ProxyAssignment.findAll({ + where, + offset, + limit, + include: position + ? [ + { + model: Position, + where: { + address: position, + }, + attributes: [], + required: true, }, - attributes: [], - required: true, - }, - ] - : undefined, - order: [["index", "DESC"]], - }); -}); + ] + : undefined, + order: [["index", "DESC"]], + }); + } +); server.get<{ Params: { registrar: string }; Querystring: { - registrar: string; page: number; limit: number; query: string; diff --git a/packages/spl-utils/src/constants.ts b/packages/spl-utils/src/constants.ts index c2baab6b4..445a1bb57 100644 --- a/packages/spl-utils/src/constants.ts +++ b/packages/spl-utils/src/constants.ts @@ -24,3 +24,16 @@ export const HELIUM_COMMON_LUT_DEVNET = new PublicKey( export const HELIUM_COMMON_LUT = new PublicKey( "43eY9L2spbM2b1MPDFFBStUiFGt29ziZ1nc1xbpzsfVt" ); + +export type Network = "hnt" | "mobile" | "iot"; +export const networksToMint: { [Network: string]: PublicKey } = { + hnt: HNT_MINT, + mobile: MOBILE_MINT, + iot: IOT_MINT, +}; + +export const realmNames: Record = { + [HNT_MINT.toBase58()]: "Helium", + [MOBILE_MINT.toBase58()]: "Helium MOBILE", + [IOT_MINT.toBase58()]: "Helium IOT", +}; \ No newline at end of file diff --git a/packages/voter-stake-registry-hooks/src/constants.ts b/packages/voter-stake-registry-hooks/src/constants.ts index b1d831308..90837d629 100644 --- a/packages/voter-stake-registry-hooks/src/constants.ts +++ b/packages/voter-stake-registry-hooks/src/constants.ts @@ -1,2 +1,4 @@ // Make a smaller batch for the sake of ledger. export const MAX_TRANSACTIONS_PER_SIGNATURE_BATCH = 5; + +export const INDEXER_WAIT = 4000 \ No newline at end of file diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index 397ca220a..0cfb87a3a 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -103,14 +103,12 @@ export const HeliumVsrStateProvider: React.FC<{ : undefined; }, [heliumVoteUri, registrarKey]); // Allow vote service either from native rpc or from api - const { result: voteService } = useAsync(async () => { + const { result: programVoteService } = useAsync(async () => { if (registrarKey) { - if (urlVoteService) { - return urlVoteService; - } else { + if (!urlVoteService) { const program = await init(provider as any); const nftProxyProgram = await initNftProxy(provider as any); - new VoteService({ + return new VoteService({ registrar: registrarKey, program, nftProxyProgram, @@ -118,6 +116,10 @@ export const HeliumVsrStateProvider: React.FC<{ } } }, [provider, registrarKey, urlVoteService]); + const voteService = useMemo( + () => urlVoteService ?? programVoteService, + [urlVoteService, programVoteService] + ); const { info: registrar } = useRegistrar(registrarKey); const { positionKeys, @@ -129,7 +131,6 @@ export const HeliumVsrStateProvider: React.FC<{ wallet: me, provider, voteService, - mint, }); const delegatedPositionKeys = useMemo(() => { diff --git a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts index 8aef2b0c5..4da200f37 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts @@ -12,10 +12,10 @@ import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { PositionWithMeta, ProxyAssignmentV0 } from "../sdk/types"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { ProxyAssignment } from "@helium/voter-stake-registry-sdk"; +import { INDEXER_WAIT } from "../constants"; export const useAssignProxies = () => { - const { provider, registrar, mint, voteService } = - useHeliumVsrState(); + const { provider, registrar, mint, voteService } = useHeliumVsrState(); const queryClient = useQueryClient(); return useMutation({ mutationFn: async ({ @@ -43,6 +43,7 @@ export const useAssignProxies = () => { const nftProxyProgram = await init(provider as any, programId, idl); let resultingAssignments: ProxyAssignment[] = []; + let undelegated: ProxyAssignment[] = []; if (isInvalid || !nftProxyProgram || !registrar || !voteService) { throw new Error("Unable to voting delegate, Invalid params"); @@ -89,6 +90,7 @@ export const useAssignProxies = () => { const prevProxyAssignment = new PublicKey( toUndelegate[index + 1].address ); + undelegated.push(...toUndelegate); return nftProxyProgram.methods .unassignProxyV0() .accounts({ @@ -105,19 +107,6 @@ export const useAssignProxies = () => { instructions.push(...ixs); } - resultingAssignments.push({ - address: currentProxyAssignment.toBase58(), - asset: position.mint.toBase58(), - nextVoter: recipient.toBase58(), - voter: position.isProxiedToMe - ? provider.wallet.publicKey.toBase58() - : PublicKey.default.toBase58(), - proxyConfig: registrar.proxyConfig.toBase58(), - index: 0, - expirationTime: expirationTime.toString(), - rentRefund: recipient.toBase58(), - bumpSeed: 0, - }); const { instruction, pubkeys: { nextProxyAssignment }, @@ -131,6 +120,19 @@ export const useAssignProxies = () => { proxyConfig: registrar.proxyConfig, }) .prepare(); + resultingAssignments.push({ + address: nextProxyAssignment!.toBase58(), + asset: position.mint.toBase58(), + nextVoter: recipient.toBase58(), + voter: position.isProxiedToMe + ? provider.wallet.publicKey.toBase58() + : PublicKey.default.toBase58(), + proxyConfig: registrar.proxyConfig.toBase58(), + index: 0, + expirationTime: expirationTime.toString(), + rentRefund: recipient.toBase58(), + bumpSeed: 0, + }); // Don't delegate where there's already a proxy. if (await provider.connection.getAccountInfo(nextProxyAssignment!)) { throw new Error( @@ -166,13 +168,29 @@ export const useAssignProxies = () => { }, ], (old) => { - const changed = new Set(resultingAssignments.map((r) => r.address)); + const changed = new Set( + [...resultingAssignments, ...undelegated].map((r) => r.address) + ); return [ ...(old || []).filter((todo) => !changed.has(todo.address)), ...resultingAssignments, ]; } ); + + // Give some time for indexers + setTimeout(async () => { + try { + await queryClient.invalidateQueries({ + queryKey: ["proxies"], + }); + await queryClient.invalidateQueries({ + queryKey: ["proxy"], + }); + } catch (e: any) { + console.error("Exception invalidating queries", e); + } + }, INDEXER_WAIT); } }, }); diff --git a/packages/voter-stake-registry-hooks/src/hooks/usePositionKeysAndProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/usePositionKeysAndProxies.ts index 65ee49e0e..162292ed8 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/usePositionKeysAndProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/usePositionKeysAndProxies.ts @@ -1,74 +1,52 @@ import { AnchorProvider, BN } from "@coral-xyz/anchor"; -import { - VoteService, - getPositionKeysForOwner, - getRegistrarKey, - positionKey, -} from "@helium/voter-stake-registry-sdk"; +import { VoteService, positionKey } from "@helium/voter-stake-registry-sdk"; import { PublicKey } from "@solana/web3.js"; import { useQuery } from "@tanstack/react-query"; import { useMemo } from "react"; -import { useRegistrar } from "./useRegistrar"; +import { positionKeysForWalletQuery } from "../queries/positionKeysForWalletQuery"; +import { proxyAssignmentsForWalletQuery } from "../queries/proxyAssignmentsForWalletQuery"; export interface GetPositionKeysAndProxiesArgs { wallet?: PublicKey; - mint?: PublicKey; provider?: AnchorProvider; voteService?: VoteService; } export function usePositionKeysAndProxies({ wallet, - mint, provider, voteService, }: GetPositionKeysAndProxiesArgs) { - const registrarKey = useMemo( - () => mint && getRegistrarKey(mint), - [mint?.toBase58()] - ); - const { info: registrar } = useRegistrar(registrarKey); const { data: myProxies, error: myProxyError, isLoading: myProxyLoading, - } = useQuery({ - queryKey: [ - "proxyAssignmentsForWallet", - { - registrar: voteService?.registrar.toBase58(), - wallet: wallet?.toBase58(), - mint: mint?.toBase58(), - }, - ], - queryFn: () => voteService!.getProxyAssignmentsForWallet(wallet!, mint!), - enabled: !!wallet && !!mint && !!voteService, - }); + } = useQuery( + proxyAssignmentsForWalletQuery({ + wallet, + voteService, + }) + ); const proxyPositions = useMemo( () => myProxies?.map((del) => positionKey(new PublicKey(del.asset))[0]), [myProxies] ); + const registrar = useMemo( + () => + voteService ? new PublicKey(voteService?.config.registrar) : undefined, + [voteService] + ); const { data: positionKeys, error, isLoading, - } = useQuery({ - queryKey: [ - "positionKeys", - { - wallet, - collection: registrar?.collection, - rpcEndpoint: provider?.connection.rpcEndpoint, - }, - ], - queryFn: () => - getPositionKeysForOwner({ - connection: provider!.connection, - owner: wallet!, - collection: registrar?.collection!, - }), - enabled: !!wallet && !!registrar?.collection && !!provider, - }); + } = useQuery( + positionKeysForWalletQuery({ + wallet, + registrar: registrar!, + connection: provider?.connection, + }) + ); return { error: error || myProxyError, diff --git a/packages/voter-stake-registry-hooks/src/hooks/useProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useProxyAssignments.ts similarity index 100% rename from packages/voter-stake-registry-hooks/src/hooks/useProxies.ts rename to packages/voter-stake-registry-hooks/src/hooks/useProxyAssignments.ts diff --git a/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts index fb5b6f4b8..51679c2f3 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts @@ -1,21 +1,27 @@ import { Program } from "@coral-xyz/anchor"; -import { PROGRAM_ID, proxyAssignmentKey, init } from "@helium/nft-proxy-sdk"; +import { PROGRAM_ID, init, proxyAssignmentKey } from "@helium/nft-proxy-sdk"; import { - truthy, - batchParallelInstructions, Status, batchParallelInstructionsWithPriorityFee, + truthy } from "@helium/spl-utils"; +import { + ProxyAssignment +} from "@helium/voter-stake-registry-sdk"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; -import { useAsyncCallback } from "react-async-hook"; +import { useMutation, useQueryClient } from "@tanstack/react-query"; +import { + INDEXER_WAIT, + MAX_TRANSACTIONS_PER_SIGNATURE_BATCH, +} from "../constants"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { PositionWithMeta } from "../sdk/types"; -import { MAX_TRANSACTIONS_PER_SIGNATURE_BATCH } from "../constants"; export const useUnassignProxies = () => { - const { provider, registrar, voteService, refetch } = useHeliumVsrState(); - const { error, loading, execute } = useAsyncCallback( - async ({ + const { provider, registrar, voteService, mint } = useHeliumVsrState(); + const queryClient = useQueryClient(); + return useMutation({ + mutationFn: async ({ positions, programId = PROGRAM_ID, onProgress, @@ -35,21 +41,21 @@ export const useUnassignProxies = () => { const idl = await Program.fetchIdl(programId, provider); const nftProxyProgram = await init(provider as any, programId, idl); - if (loading) return; - if (isInvalid || !nftProxyProgram || !registrar || !voteService) { throw new Error("Unable to unassign proxy, Invalid params"); } else { const instructions: TransactionInstruction[] = []; + let undelegated: ProxyAssignment[] = []; for (const position of positions) { let currentProxyAssignment = proxyAssignmentKey( registrar.proxyConfig, position.mint, provider.wallet.publicKey )[0]; - let proxy = await nftProxyProgram.account.proxyAssignmentV0.fetchNullable( - currentProxyAssignment - ); + let proxy = + await nftProxyProgram.account.proxyAssignmentV0.fetchNullable( + currentProxyAssignment + ); if (!proxy) { currentProxyAssignment = proxyAssignmentKey( registrar.proxyConfig, @@ -64,6 +70,7 @@ export const useUnassignProxies = () => { position.pubkey, proxy.index ); + undelegated.push(...toUndelegate); instructions.push( ...( @@ -106,15 +113,38 @@ export const useUnassignProxies = () => { } ); } - // Wait a couple seconds for changes to hit pg-sink - setTimeout(refetch, 2 * 1000); - } - } - ); - return { - error, - loading, - unassignProxies: execute, - }; + queryClient.setQueryData( + [ + "proxyAssignmentsForWallet", + { + registrar: voteService.registrar.toBase58(), + wallet: provider.wallet.publicKey.toBase58(), + mint: mint?.toBase58(), + }, + ], + (old) => { + const changed = new Set(undelegated.map((r) => r.address)); + return [ + ...(old || []).filter((todo) => !changed.has(todo.address)), + ]; + } + ); + + // Give some time for indexers + setTimeout(async () => { + try { + await queryClient.invalidateQueries({ + queryKey: ["proxies"], + }); + await queryClient.invalidateQueries({ + queryKey: ["proxy"], + }); + } catch (e: any) { + console.error("Exception invalidating queries", e); + } + }, INDEXER_WAIT); + } + }, + }); }; diff --git a/packages/voter-stake-registry-hooks/src/index.ts b/packages/voter-stake-registry-hooks/src/index.ts index a6312c8c9..24f50e5cb 100644 --- a/packages/voter-stake-registry-hooks/src/index.ts +++ b/packages/voter-stake-registry-hooks/src/index.ts @@ -24,12 +24,16 @@ export { usePositionKeysAndProxies as usePositionKeys } from "./hooks/usePositio export * from "./sdk/types"; export { useAssignProxies } from "./hooks/useAssignProxies"; export { useUnassignProxies } from "./hooks/useUnassignProxies"; -export { useProxyAssignments } from "./hooks/useProxies" +export { useProxyAssignments } from "./hooks/useProxyAssignments" export { useProxiedTo } from "./hooks/useProxiedTo"; -export { useVoters } from "./hooks/useVoters"; export { useVotesForWallet } from "./hooks/useVotesForWallet"; export { getSubDaos } from "./utils/getSubDaos"; export { useVoteMarkers } from "./hooks/useVoteMarkers"; export { useVote } from "./hooks/useVote"; export { useRelinquishVote } from "./hooks/useRelinquishVote"; export { useRelinquishPositionVotes } from "./hooks/useRelinquishPositionVotes"; + +export { proxyAssignmentsForWalletQuery } from "./queries/proxyAssignmentsForWalletQuery"; +export { positionKeysForWalletQuery } from "./queries/positionKeysForWalletQuery"; +export { proxiesQuery } from "./queries/proxiesQuery"; +export { proxyQuery } from "./queries/proxyQuery"; diff --git a/packages/voter-stake-registry-hooks/src/queries/positionKeysForWalletQuery.ts b/packages/voter-stake-registry-hooks/src/queries/positionKeysForWalletQuery.ts new file mode 100644 index 000000000..88ba978ba --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/queries/positionKeysForWalletQuery.ts @@ -0,0 +1,31 @@ +import { getPositionKeysForOwner } from "@helium/voter-stake-registry-sdk"; +import { Connection, PublicKey } from "@solana/web3.js"; +import { queryOptions } from "@tanstack/react-query"; + +export function positionKeysForWalletQuery({ + wallet, + registrar, + connection, +}: { + wallet?: PublicKey; + registrar?: PublicKey; + connection?: Connection +}) { + return queryOptions({ + queryKey: [ + "positionKeys", + { + wallet, + registrar: registrar?.toBase58(), + rpcEndpoint: connection?.rpcEndpoint, + }, + ], + queryFn: () => + getPositionKeysForOwner({ + connection: connection!, + owner: wallet!, + registrar: registrar!, + }), + enabled: !!connection && !!wallet && !!registrar, + }); +} diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVoters.ts b/packages/voter-stake-registry-hooks/src/queries/proxiesQuery.ts similarity index 67% rename from packages/voter-stake-registry-hooks/src/hooks/useVoters.ts rename to packages/voter-stake-registry-hooks/src/queries/proxiesQuery.ts index fb1e1e620..7cb94761d 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVoters.ts +++ b/packages/voter-stake-registry-hooks/src/queries/proxiesQuery.ts @@ -1,20 +1,21 @@ -import { useInfiniteQuery } from "@tanstack/react-query"; -import { useHeliumVsrState } from "../contexts/heliumVsrContext"; +import { VoteService } from "@helium/voter-stake-registry-sdk"; +import { infiniteQueryOptions } from "@tanstack/react-query"; -export function useVoters({ +export function proxiesQuery({ search, amountPerPage = 20, + voteService, }: { search: string; amountPerPage: number; + voteService?: VoteService; }) { - const { voteService } = useHeliumVsrState(); - return useInfiniteQuery({ + return infiniteQueryOptions({ enabled: !!voteService, queryKey: [ - "voters", + "proxies", { - registrar: voteService?.registrar.toBase58(), + ...voteService?.config, amountPerPage, search, }, diff --git a/packages/voter-stake-registry-hooks/src/queries/proxyAssignmentsForWalletQuery.ts b/packages/voter-stake-registry-hooks/src/queries/proxyAssignmentsForWalletQuery.ts new file mode 100644 index 000000000..e6ffdf536 --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/queries/proxyAssignmentsForWalletQuery.ts @@ -0,0 +1,23 @@ +import { VoteService } from "@helium/voter-stake-registry-sdk"; +import { PublicKey } from "@solana/web3.js"; +import { queryOptions } from "@tanstack/react-query"; + +export function proxyAssignmentsForWalletQuery({ + wallet, + voteService, +}: { + wallet?: PublicKey; + voteService?: VoteService; +}) { + return queryOptions({ + queryKey: [ + "proxyAssignmentsForWallet", + { + ...voteService?.config, + wallet: wallet?.toBase58(), + }, + ], + queryFn: () => voteService!.getProxyAssignmentsForWallet(wallet!), + enabled: !!wallet && !!voteService, + }); +} diff --git a/packages/voter-stake-registry-hooks/src/queries/proxyQuery.ts b/packages/voter-stake-registry-hooks/src/queries/proxyQuery.ts new file mode 100644 index 000000000..08d8e76d6 --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/queries/proxyQuery.ts @@ -0,0 +1,48 @@ +import { networksToMint } from "@helium/spl-utils"; +import { VoteService, getRegistrarKey } from "@helium/voter-stake-registry-sdk"; +import { PublicKey } from "@solana/web3.js"; +import { queryOptions } from "@tanstack/react-query"; + +export function proxyQuery({ + wallet, + voteService, +}: { + wallet: PublicKey; + voteService?: VoteService; +}) { + return queryOptions({ + enabled: !!voteService, + queryKey: [ + "proxy", + { + wallet: wallet.toBase58(), + ...voteService?.config, + }, + ], + queryFn: async () => { + const registrars = await voteService!.getRegistrarsForProxy(wallet); + let networks; + if (registrars) { + networks = new Set( + Object.entries(networksToMint) + .filter(([_, mint]) => { + return registrars.includes(getRegistrarKey(mint).toBase58()); + }) + .map(([network]) => network) + ); + } + + const proxy = await voteService!.getProxy(wallet); + let detail: string | null = null; + if (proxy.detail) { + const res = await fetch(proxy.detail); + detail = await res.text(); + } + return { + ...proxy, + detail: detail ?? proxy.detail, + networks, + }; + }, + }); +} diff --git a/packages/voter-stake-registry-sdk/src/helpers.ts b/packages/voter-stake-registry-sdk/src/helpers.ts index 25d39b07e..20d8c8a41 100644 --- a/packages/voter-stake-registry-sdk/src/helpers.ts +++ b/packages/voter-stake-registry-sdk/src/helpers.ts @@ -1,6 +1,6 @@ import { Asset, searchAssets, truthy } from "@helium/spl-utils"; import { AccountInfo, PublicKey, Connection } from "@solana/web3.js"; -import { positionKey } from "./pdas"; +import { positionKey, registrarCollectionKey } from "./pdas"; import { TOKEN_PROGRAM_ID, unpackAccount } from "@solana/spl-token"; import { PROGRAM_ID as MPL_PID, @@ -10,14 +10,15 @@ import { export async function getPositionKeysForOwner({ connection, owner, - collection, + registrar, }: { connection: Connection; owner: PublicKey; - collection: PublicKey; + registrar: PublicKey; }): Promise<{ positions: PublicKey[]; assets: PublicKey[] }> { let positions: PublicKey[] = []; let assets: PublicKey[] = []; + const collection = registrarCollectionKey(registrar)[0]; try { let page = 1; diff --git a/packages/voter-stake-registry-sdk/src/index.ts b/packages/voter-stake-registry-sdk/src/index.ts index 985903c0e..0d6bbb54d 100644 --- a/packages/voter-stake-registry-sdk/src/index.ts +++ b/packages/voter-stake-registry-sdk/src/index.ts @@ -3,7 +3,7 @@ import { AnchorProvider, BN, Idl, Program } from "@coral-xyz/anchor"; import { PublicKey } from "@solana/web3.js"; import { registrarKey, vsrResolvers } from "./resolvers"; import { PROGRAM_ID } from "./constants"; -import { HNT_MINT, IOT_MINT, MOBILE_MINT } from "@helium/spl-utils"; +import { HNT_MINT, IOT_MINT, MOBILE_MINT, realmNames } from "@helium/spl-utils"; export * from "./constants"; export * from "./pdas"; export * from "./resolvers"; @@ -30,12 +30,6 @@ export function getRegistrarKey(mint: PublicKey) { )[0]; } -const realmNames: Record = { - [HNT_MINT.toBase58()]: "Helium", - [MOBILE_MINT.toBase58()]: "Helium MOBILE", - [IOT_MINT.toBase58()]: "Helium IOT", -}; - export const init = async ( provider: AnchorProvider, programId: PublicKey = PROGRAM_ID, diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index d3482cd0b..b38274758 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -25,7 +25,6 @@ export type Proxy = { }; export type EnhancedProxyData = { - numDelegations: string; delegatedVeTokens: string; percent: string; numProposalsVoted: string; @@ -36,7 +35,7 @@ export type EnhancedProxyData = { export type WithRank = { numProxies: string; rank: string; -} +}; export type EnhancedProxy = Proxy & EnhancedProxyData; @@ -73,6 +72,18 @@ export class VoteService { private nftProxyProgram: Program | undefined; registrar: PublicKey; + get config() { + return { + registrar: this.registrar.toBase58(), + baseUrl: this.client?.getUri(), + rpcEndpoint: this.provider?.connection.rpcEndpoint, + }; + } + + get provider() { + return this.nftProxyProgram?.provider; + } + // Wrapper arÍound vsr bulk operations that either uses // an API or gPA calls constructor({ @@ -139,13 +150,16 @@ export class VoteService { ): Promise { if (this.client) { return ( - await this.client.get(`/v1/proxy-assignments`, { - params: { - limit: 10000, - position: position.toBase58(), - minIndex: minProxyIndex, - }, - }) + await this.client.get( + `/v1/registrars/${this.registrar.toBase58()}/proxy-assignments`, + { + params: { + limit: 10000, + position: position.toBase58(), + minIndex: minProxyIndex, + }, + } + ) ).data; } @@ -153,7 +167,7 @@ export class VoteService { const registrar = await this.program.account.registrar.fetch( this.registrar ); - const positionAcc = await this.program.account.positionV0.fetch(position) + const positionAcc = await this.program.account.positionV0.fetch(position); return ( await this.nftProxyProgram.account.proxyAssignmentV0.all([ @@ -190,19 +204,20 @@ export class VoteService { async getProxyAssignmentsForWallet( wallet: PublicKey, - votingMint: PublicKey, minProxyIndex: number = 0 ): Promise { if (this.client) { return ( - await this.client.get(`/v1/proxy-assignments`, { - params: { - limit: 10000, - voter: wallet.toBase58(), - minIndex: minProxyIndex, - votingMint, - }, - }) + await this.client.get( + `/v1/registrars/${this.registrar.toBase58()}/proxy-assignments`, + { + params: { + limit: 10000, + voter: wallet.toBase58(), + minIndex: minProxyIndex, + }, + } + ) ).data; } @@ -297,7 +312,7 @@ export class VoteService { async getProxies({ page, limit, - query + query, }: { page: number; limit: number; @@ -315,12 +330,12 @@ export class VoteService { return response.data.map(this.mapRoutes); } - async getProxy(wallet: string): Promise { + async getProxy(wallet: PublicKey): Promise { if (!this.client) { throw new Error("This operation is not supported without an API"); } const response = await this.client.get( - `/v1/registrars/${this.registrar.toBase58()}/proxies/${wallet}` + `/v1/registrars/${this.registrar.toBase58()}/proxies/${wallet.toBase58()}` ); return this.mapRoutes(response.data); } From 7ead1c5ed0ace315b4c7d06d63f1b170659fa709 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Mon, 17 Jun 2024 15:57:22 -0700 Subject: [PATCH 033/130] WIP --- packages/helium-vote-service/src/index.ts | 77 ++++++++++++++++++- .../src/hooks/useAssignProxies.ts | 13 +--- .../src/hooks/useUnassignProxies.ts | 3 +- .../src/hooks/useVotesForWallet.ts | 38 --------- .../voter-stake-registry-hooks/src/index.ts | 3 +- 5 files changed, 79 insertions(+), 55 deletions(-) delete mode 100644 packages/voter-stake-registry-hooks/src/hooks/useVotesForWallet.ts diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index 7720eeca6..25177fa41 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -251,10 +251,10 @@ WITH floor(sum(p.ve_tokens)) as "delegatedVeTokens", 100 * sum(p.ve_tokens) / (select total_vetokens from total_vetokens) as "percent" FROM - proxies - JOIN proxy_registrars pr ON pr.wallet = proxies.wallet - LEFT OUTER JOIN positions_with_proxy_assignments p ON p.voter = proxies.wallet - WHERE pr.registrar = ${escapedRegistrar} AND proxies.wallet = ${escapedWallet} + positions_with_proxy_assignments p + LEFT OUTER JOIN proxy_registrars pr ON p.voter = pr.wallet AND p.registrar = pr.registrar + LEFT OUTER JOIN proxies ON pr.wallet = proxies.wallet + WHERE p.registrar = ${escapedRegistrar} AND p.voter = ${escapedWallet} GROUP BY name, image, @@ -293,6 +293,75 @@ SELECT FROM proxies_with_votes LIMIT 1 `); + + ` + WITH + positions_with_proxy_assignments AS ( + SELECT + * + FROM + positions_with_vetokens p + JOIN proxy_assignments d on d.asset = p.asset + AND d.next_voter = '11111111111111111111111111111111' + WHERE registrar = 'BMnWRWZrWqb6JMKznaDqNxWaWAHoaTzVabM6Qwyh3WKz' + ), + total_vetokens as ( + SELECT + SUM(ve_tokens) total_vetokens + FROM + positions_with_vetokens + WHERE + registrar = 'BMnWRWZrWqb6JMKznaDqNxWaWAHoaTzVabM6Qwyh3WKz' + ), + proxies_with_assignments AS ( + SELECT + name, + image, + proxies.wallet as wallet, + description, + detail, + count(p.voter) as "numAssignments", + floor(sum(p.ve_tokens)) as "delegatedVeTokens", + 100 * sum(p.ve_tokens) / (select total_vetokens from total_vetokens) as "percent" + FROM + positions_with_proxy_assignments p + LEFT OUTER JOIN proxy_registrars pr ON p.voter = pr.wallet AND p.registrar = pr.registrar + LEFT OUTER JOIN proxies ON pr.wallet = proxies.wallet + WHERE p.registrar = 'BMnWRWZrWqb6JMKznaDqNxWaWAHoaTzVabM6Qwyh3WKz' + GROUP BY + name, + image, + proxies.wallet, + description, + detail + ), + proxies_with_rank AS( + SELECT + pa.*, + COUNT(*) OVER () as "numProxies", + RANK() OVER (ORDER BY "delegatedVeTokens" DESC) as rank + FROM proxies_with_assignments pa + ), + proxies_with_votes AS ( + SELECT + name, + image, + wallet, + description, + detail, + "numAssignments", + "delegatedVeTokens", + "percent", + "numProxies", + rank, + count(distinct vm.proposal) as "numProposalsVoted", + MAX(vm.created_at) as "lastVotedAt" + FROM + proxies_with_rank proxies + LEFT OUTER JOIN vote_markers vm ON vm.voter = proxies.wallet AND vm.registrar = 'BMnWRWZrWqb6JMKznaDqNxWaWAHoaTzVabM6Qwyh3WKz' + GROUP BY "numProxies", rank, name, image, wallet, description, detail, "numAssignments", "delegatedVeTokens", "percent" + ) + `; return proxies[0][0]; }); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts index 4da200f37..cfc8e55f5 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useAssignProxies.ts @@ -133,14 +133,8 @@ export const useAssignProxies = () => { rentRefund: recipient.toBase58(), bumpSeed: 0, }); - // Don't delegate where there's already a proxy. - if (await provider.connection.getAccountInfo(nextProxyAssignment!)) { - throw new Error( - "Recipient wallet is already a proxy to this position" - ); - } else { - instructions.push(instruction); - } + + instructions.push(instruction); } if (onInstructions) { @@ -162,9 +156,8 @@ export const useAssignProxies = () => { [ "proxyAssignmentsForWallet", { - registrar: voteService.registrar.toBase58(), + ...voteService.config, wallet: provider.wallet.publicKey.toBase58(), - mint: mint?.toBase58(), }, ], (old) => { diff --git a/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts index 51679c2f3..5216543a5 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useUnassignProxies.ts @@ -118,9 +118,8 @@ export const useUnassignProxies = () => { [ "proxyAssignmentsForWallet", { - registrar: voteService.registrar.toBase58(), + ...voteService.config, wallet: provider.wallet.publicKey.toBase58(), - mint: mint?.toBase58(), }, ], (old) => { diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVotesForWallet.ts b/packages/voter-stake-registry-hooks/src/hooks/useVotesForWallet.ts deleted file mode 100644 index 64db838d2..000000000 --- a/packages/voter-stake-registry-hooks/src/hooks/useVotesForWallet.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { useInfiniteQuery } from "@tanstack/react-query"; -import { useHeliumVsrState } from "../contexts/heliumVsrContext"; -import { PublicKey } from "@solana/web3.js"; - -export function useVotesForWallet({ - wallet, - amountPerPage = 20, -}: { - wallet: PublicKey; - amountPerPage: number; -}) { - const { voteService } = useHeliumVsrState(); - return useInfiniteQuery({ - enabled: !!voteService, - queryKey: [ - "votes", - { - registrar: voteService?.registrar.toBase58(), - wallet: wallet.toBase58(), - }, - ], - queryFn: async ({ pageParam = 1 }) => { - const voters = await voteService!.getVotesForWallet({ - page: pageParam, - limit: amountPerPage, - wallet, - }); - return voters; - }, - initialPageParam: 1, - getNextPageParam: (lastPage, _, lastPageParam) => { - if (lastPage.length < amountPerPage) { - return undefined; - } - return lastPageParam + 1; - }, - }); -} diff --git a/packages/voter-stake-registry-hooks/src/index.ts b/packages/voter-stake-registry-hooks/src/index.ts index 24f50e5cb..dfb46a77e 100644 --- a/packages/voter-stake-registry-hooks/src/index.ts +++ b/packages/voter-stake-registry-hooks/src/index.ts @@ -26,12 +26,13 @@ export { useAssignProxies } from "./hooks/useAssignProxies"; export { useUnassignProxies } from "./hooks/useUnassignProxies"; export { useProxyAssignments } from "./hooks/useProxyAssignments" export { useProxiedTo } from "./hooks/useProxiedTo"; -export { useVotesForWallet } from "./hooks/useVotesForWallet"; +export { votesForWalletQuery } from "./queries/votesForWalletQuery"; export { getSubDaos } from "./utils/getSubDaos"; export { useVoteMarkers } from "./hooks/useVoteMarkers"; export { useVote } from "./hooks/useVote"; export { useRelinquishVote } from "./hooks/useRelinquishVote"; export { useRelinquishPositionVotes } from "./hooks/useRelinquishPositionVotes"; +export { useKnownProxy } from "./hooks/useKnownProxy"; export { proxyAssignmentsForWalletQuery } from "./queries/proxyAssignmentsForWalletQuery"; export { positionKeysForWalletQuery } from "./queries/positionKeysForWalletQuery"; From 1945bf28f9530a6673811f7d6d0a77585d44e199 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Tue, 18 Jun 2024 08:00:13 -0700 Subject: [PATCH 034/130] WIP --- packages/helium-vote-service/src/index.ts | 4 +- .../src/hooks/useKnownProxy.ts | 16 ++++++++ .../src/queries/proxyQuery.ts | 5 ++- .../src/queries/votesForWalletQuery.ts | 39 +++++++++++++++++++ .../voter-stake-registry-sdk/src/index.ts | 5 ++- .../src/voteService.ts | 12 ++++-- 6 files changed, 72 insertions(+), 9 deletions(-) create mode 100644 packages/voter-stake-registry-hooks/src/hooks/useKnownProxy.ts create mode 100644 packages/voter-stake-registry-hooks/src/queries/votesForWalletQuery.ts diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index 25177fa41..f8ebafec1 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -244,7 +244,7 @@ WITH SELECT name, image, - proxies.wallet as wallet, + p.voter as wallet, description, detail, count(p.voter) as "numAssignments", @@ -258,7 +258,7 @@ WITH GROUP BY name, image, - proxies.wallet, + p.voter, description, detail ), diff --git a/packages/voter-stake-registry-hooks/src/hooks/useKnownProxy.ts b/packages/voter-stake-registry-hooks/src/hooks/useKnownProxy.ts new file mode 100644 index 000000000..a420b834d --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/hooks/useKnownProxy.ts @@ -0,0 +1,16 @@ +import { PublicKey } from "@solana/web3.js"; +import { useInfiniteQuery } from "@tanstack/react-query"; +import { useHeliumVsrState } from "../contexts/heliumVsrContext"; +import { proxiesQuery } from "../queries/proxiesQuery"; + +export function useKnownProxy(nextVoter: PublicKey | undefined) { + const { voteService } = useHeliumVsrState(); + const { data, isLoading, error } = useInfiniteQuery( + proxiesQuery({ + search: nextVoter?.toBase58() || "", + amountPerPage: 1, + voteService, + }) + ); + return { knownProxy: data?.pages[0][0], loading: isLoading, error }; +} diff --git a/packages/voter-stake-registry-hooks/src/queries/proxyQuery.ts b/packages/voter-stake-registry-hooks/src/queries/proxyQuery.ts index 08d8e76d6..cfa411dca 100644 --- a/packages/voter-stake-registry-hooks/src/queries/proxyQuery.ts +++ b/packages/voter-stake-registry-hooks/src/queries/proxyQuery.ts @@ -1,5 +1,5 @@ import { networksToMint } from "@helium/spl-utils"; -import { VoteService, getRegistrarKey } from "@helium/voter-stake-registry-sdk"; +import { PartialEnhancedProxy, VoteService, getRegistrarKey } from "@helium/voter-stake-registry-sdk"; import { PublicKey } from "@solana/web3.js"; import { queryOptions } from "@tanstack/react-query"; @@ -38,11 +38,12 @@ export function proxyQuery({ const res = await fetch(proxy.detail); detail = await res.text(); } + return { ...proxy, detail: detail ?? proxy.detail, networks, - }; + } as PartialEnhancedProxy; }, }); } diff --git a/packages/voter-stake-registry-hooks/src/queries/votesForWalletQuery.ts b/packages/voter-stake-registry-hooks/src/queries/votesForWalletQuery.ts new file mode 100644 index 000000000..b76ee2622 --- /dev/null +++ b/packages/voter-stake-registry-hooks/src/queries/votesForWalletQuery.ts @@ -0,0 +1,39 @@ +import { VoteService } from "@helium/voter-stake-registry-sdk"; +import { PublicKey } from "@solana/web3.js"; +import { infiniteQueryOptions } from "@tanstack/react-query"; + +export const votesForWalletQuery = ({ + wallet, + amountPerPage = 20, + voteService, +}: { + wallet: PublicKey; + amountPerPage?: number; + voteService?: VoteService; +}) => { + return infiniteQueryOptions({ + enabled: !!voteService, + queryKey: [ + "votes", + { + registrar: voteService?.registrar.toBase58(), + wallet: wallet.toBase58(), + }, + ], + queryFn: async ({ pageParam = 1 }) => { + const voters = await voteService!.getVotesForWallet({ + page: pageParam, + limit: amountPerPage, + wallet, + }); + return voters; + }, + initialPageParam: 1, + getNextPageParam: (lastPage, _, lastPageParam) => { + if (lastPage.length < amountPerPage) { + return undefined; + } + return lastPageParam + 1; + }, + }); +}; diff --git a/packages/voter-stake-registry-sdk/src/index.ts b/packages/voter-stake-registry-sdk/src/index.ts index 0d6bbb54d..4e10a5e8c 100644 --- a/packages/voter-stake-registry-sdk/src/index.ts +++ b/packages/voter-stake-registry-sdk/src/index.ts @@ -10,8 +10,9 @@ export * from "./resolvers"; export { VoteService } from "./voteService"; export type { ProposalWithVotes, - ProxyAssignment as ProxyAssignment, - EnhancedProxy as EnhancedProxy, + ProxyAssignment, + EnhancedProxy, + PartialEnhancedProxy, WithRank, EnhancedProxyData, } from "./voteService"; diff --git a/packages/voter-stake-registry-sdk/src/voteService.ts b/packages/voter-stake-registry-sdk/src/voteService.ts index b38274758..7b016decf 100644 --- a/packages/voter-stake-registry-sdk/src/voteService.ts +++ b/packages/voter-stake-registry-sdk/src/voteService.ts @@ -38,6 +38,10 @@ export type WithRank = { }; export type EnhancedProxy = Proxy & EnhancedProxyData; +export type PartialEnhancedProxy = Partial & { + wallet: string; +} & EnhancedProxyData & + WithRank; export type Proposal = { address: string; @@ -330,7 +334,9 @@ export class VoteService { return response.data.map(this.mapRoutes); } - async getProxy(wallet: PublicKey): Promise { + async getProxy( + wallet: PublicKey + ): Promise { if (!this.client) { throw new Error("This operation is not supported without an API"); } @@ -343,8 +349,8 @@ export class VoteService { mapRoutes(data: T): T { return { ...data, - image: this.assetUrl(data.image), - detail: this.assetUrl(data.detail), + image: data.image && this.assetUrl(data.image), + detail: data.detail && this.assetUrl(data.detail), }; } } From 31e58cc1216da40821720a552a865ddab53d4f20 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 21 Jun 2024 09:02:34 -0500 Subject: [PATCH 035/130] More fixes --- .../src/utils/defineIdlModels.ts | 1 + .../src/utils/upsertProgramAccounts.ts | 34 ++--- packages/helium-vote-service/package.json | 6 +- packages/helium-vote-service/src/index.ts | 1 + packages/helium-vote-service/yarn.deploy.lock | 120 +++++++++++------- .../src/contexts/heliumVsrContext.tsx | 2 +- .../src/hooks/useClosePosition.ts | 14 ++ .../src/hooks/useCreatePosition.ts | 14 ++ yarn.lock | 73 +---------- 9 files changed, 130 insertions(+), 135 deletions(-) diff --git a/packages/account-postgres-sink-service/src/utils/defineIdlModels.ts b/packages/account-postgres-sink-service/src/utils/defineIdlModels.ts index 3dd8e7570..0d5408568 100644 --- a/packages/account-postgres-sink-service/src/utils/defineIdlModels.ts +++ b/packages/account-postgres-sink-service/src/utils/defineIdlModels.ts @@ -92,6 +92,7 @@ export const defineIdlModels = async ({ updatedAt: false, schema: underscore(accConfig.schema || "public"), tableName: underscore(accConfig.table || acc.name), + createdAt: !schema.createdAt && !schema.created_at, } ); diff --git a/packages/account-postgres-sink-service/src/utils/upsertProgramAccounts.ts b/packages/account-postgres-sink-service/src/utils/upsertProgramAccounts.ts index b8e4890be..956b0ffeb 100644 --- a/packages/account-postgres-sink-service/src/utils/upsertProgramAccounts.ts +++ b/packages/account-postgres-sink-service/src/utils/upsertProgramAccounts.ts @@ -1,16 +1,16 @@ -import * as anchor from '@coral-xyz/anchor'; -import { GetProgramAccountsFilter, PublicKey } from '@solana/web3.js'; -import { Op, Sequelize } from 'sequelize'; -import { SOLANA_URL } from '../env'; -import { IAccountConfig } from '../types'; -import cachedIdlFetch from './cachedIdlFetch'; -import { chunks } from './chunks'; -import database from './database'; -import { defineIdlModels } from './defineIdlModels'; -import { sanitizeAccount } from './sanitizeAccount'; -import { initPlugins } from '../plugins'; - -export type Truthy = T extends false | '' | 0 | null | undefined ? never : T; // from lodash +import * as anchor from "@coral-xyz/anchor"; +import { GetProgramAccountsFilter, PublicKey } from "@solana/web3.js"; +import { Op, Sequelize } from "sequelize"; +import { SOLANA_URL } from "../env"; +import { IAccountConfig } from "../types"; +import cachedIdlFetch from "./cachedIdlFetch"; +import { chunks } from "./chunks"; +import database from "./database"; +import { defineIdlModels } from "./defineIdlModels"; +import { sanitizeAccount } from "./sanitizeAccount"; +import { initPlugins } from "../plugins"; + +export type Truthy = T extends false | "" | 0 | null | undefined ? never : T; // from lodash export const truthy = (value: T): value is Truthy => !!value; interface UpsertProgramAccountsArgs { @@ -43,7 +43,7 @@ export const upsertProgramAccounts = async ({ idl.accounts!.some(({ name }) => name === type) ) ) { - throw new Error('idl does not have every account type'); + throw new Error("idl does not have every account type"); } const program = new anchor.Program(idl, programId, provider); @@ -144,8 +144,8 @@ export const upsertProgramAccounts = async ({ await model.bulkCreate(values, { transaction: t, updateOnDuplicate: [ - 'address', - 'refreshed_at', + "address", + "refreshed_at", ...updateOnDuplicateFields, ], }); @@ -154,7 +154,7 @@ export const upsertProgramAccounts = async ({ await t.commit(); } catch (err) { await t.rollback(); - console.error('While inserting, err', err); + console.error("While inserting, err", err); throw err; } diff --git a/packages/helium-vote-service/package.json b/packages/helium-vote-service/package.json index fab750006..b4f82c0fe 100644 --- a/packages/helium-vote-service/package.json +++ b/packages/helium-vote-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.7.12", + "version": "0.8.0", "description": "API for helium vote", "repository": { "type": "git", @@ -35,8 +35,8 @@ "@fastify/cors": "^8.1.1", "@fastify/static": "^6", "@helium/organization-sdk": "^0.0.5", - "@helium/spl-utils": "^0.7.6", - "@helium/voter-stake-registry-sdk": "^0.7.6", + "@helium/spl-utils": "^0.8.0", + "@helium/voter-stake-registry-sdk": "^0.8.0", "@solana/web3.js": "^1.78.8", "dotenv": "^16.0.3", "fastify": "^4.13.0", diff --git a/packages/helium-vote-service/src/index.ts b/packages/helium-vote-service/src/index.ts index f8ebafec1..ac6c1bb67 100644 --- a/packages/helium-vote-service/src/index.ts +++ b/packages/helium-vote-service/src/index.ts @@ -418,6 +418,7 @@ FROM proposals p LEFT OUTER JOIN exploded_choice_vote_markers vms ON vms.proposal = p.address AND vms.registrar = ${registrar} AND vms.voter = ${wallet} WHERE p.namespace = ${sequelize.escape(ORG_IDS[mint])} GROUP BY p.address +ORDER BY created_at DESC OFFSET ${offset} LIMIT ${limit}; `); diff --git a/packages/helium-vote-service/yarn.deploy.lock b/packages/helium-vote-service/yarn.deploy.lock index a5a5d24df..d2ed723b6 100644 --- a/packages/helium-vote-service/yarn.deploy.lock +++ b/packages/helium-vote-service/yarn.deploy.lock @@ -145,14 +145,16 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@npm:^0.7.17": - version: 0.7.17 - resolution: "@helium/account-fetch-cache@npm:0.7.17" +"@helium/account-fetch-cache@^0.8.0": + version: 0.0.0-use.local + resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: "@solana/web3.js": ^1.78.8 - checksum: cd04e5672ccab09a5559f69000ba99bfc2c7d7ef2de981f6f58ba9a4f841e3435f25dc0c53ef8c6f8729c0f06277261a16dbb14b6eb7ef9e392b59257765624d - languageName: node - linkType: hard + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft "@helium/address@npm:^4.10.2": version: 4.10.2 @@ -165,6 +167,20 @@ __metadata: languageName: node linkType: hard +"@helium/anchor-resolvers@^0.8.0": + version: 0.0.0-use.local + resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" + dependencies: + "@solana/spl-token": ^0.3.8 + "@solana/web3.js": ^1.78.8 + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + peerDependencies: + "@coral-xyz/anchor": ^0.28.0 + languageName: unknown + linkType: soft + "@helium/anchor-resolvers@npm:^0.2.17": version: 0.2.21 resolution: "@helium/anchor-resolvers@npm:0.2.21" @@ -177,18 +193,6 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@npm:^0.7.17": - version: 0.7.17 - resolution: "@helium/anchor-resolvers@npm:0.7.17" - dependencies: - "@solana/spl-token": ^0.3.8 - "@solana/web3.js": ^1.78.8 - peerDependencies: - "@coral-xyz/anchor": ^0.28.0 - checksum: 725259d8e0379931642aa771c37e1cdb17bf34fb8c5533294cc2e8e337fe5053ddbcdad2a95a21ed4470169d734e2e790b807d95111b50b4d80d7946d3572e55 - languageName: node - linkType: hard - "@helium/helium-vote-service@workspace:.": version: 0.0.0-use.local resolution: "@helium/helium-vote-service@workspace:." @@ -196,8 +200,8 @@ __metadata: "@fastify/cors": ^8.1.1 "@fastify/static": ^6 "@helium/organization-sdk": ^0.0.5 - "@helium/spl-utils": ^0.7.6 - "@helium/voter-stake-registry-sdk": ^0.7.6 + "@helium/spl-utils": ^0.8.0 + "@helium/voter-stake-registry-sdk": ^0.8.0 "@solana/web3.js": ^1.78.8 "@types/bn.js": ^5.1.1 dotenv: ^16.0.3 @@ -212,18 +216,19 @@ __metadata: languageName: unknown linkType: soft -"@helium/idls@npm:^0.7.17": - version: 0.7.17 - resolution: "@helium/idls@npm:0.7.17" +"@helium/idls@^0.8.0": + version: 0.0.0-use.local + resolution: "@helium/idls@workspace:packages/idls" dependencies: "@coral-xyz/anchor": ^0.28.0 "@solana/web3.js": ^1.78.8 bn.js: ^5.2.0 borsh: ^0.7.0 bs58: ^4.0.1 - checksum: 172b4c59fa20d47e5ab528840b2b130be9beac12f2b631783743717b022cfc503d7df2116da2b30796cbb3d74b95cc447cbda936c1bdabb070d882706c1bb16e - languageName: node - linkType: hard + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft "@helium/modular-governance-idls@npm:^0.0.5": version: 0.0.5 @@ -235,6 +240,28 @@ __metadata: languageName: node linkType: hard +"@helium/modular-governance-idls@npm:^0.0.8-next.19+4fa4c6b": + version: 0.0.8 + resolution: "@helium/modular-governance-idls@npm:0.0.8" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@solana/web3.js": ^1.78.4 + checksum: 3bd1bbbdc88cc154f27717e8830b117004608a7ab91a0d43c90ad6cd9cec607071b48c25626e2e15195f4c7f45585d7d0df426ad50eb63acb2bd018897cc8919 + languageName: node + linkType: hard + +"@helium/nft-proxy-sdk@npm:0.0.8-next.19+4fa4c6b": + version: 0.0.8-next.19 + resolution: "@helium/nft-proxy-sdk@npm:0.0.8-next.19" + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@helium/anchor-resolvers": ^0.2.17 + "@helium/modular-governance-idls": ^0.0.8-next.19+4fa4c6b + "@solana/spl-token": ^0.3.8 + checksum: f5c6d9348cfebb8dd2d8fd997c365b5656afa7a6683592e1ed6b0bf04f73f231265a770c96022c930d32c686f57dbf56a0b7790c9d025413c80de30f07f1e587 + languageName: node + linkType: hard + "@helium/organization-sdk@npm:^0.0.5": version: 0.0.5 resolution: "@helium/organization-sdk@npm:0.0.5" @@ -258,14 +285,14 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@npm:^0.7.6": - version: 0.7.17 - resolution: "@helium/spl-utils@npm:0.7.17" +"@helium/spl-utils@^0.8.0": + version: 0.0.0-use.local + resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.7.17 + "@helium/account-fetch-cache": ^0.8.0 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.7.17 + "@helium/anchor-resolvers": ^0.8.0 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 @@ -274,24 +301,31 @@ __metadata: bn.js: ^5.2.0 borsh: ^0.7.0 bs58: ^4.0.1 - checksum: 852674a8b96215510bb13a9dc3746dcc69919da686bb0b708fe884156fec786a168a1bf22c902542044608b03ab7e2bdb7a8451f0074b19308fb1d6480d3847e - languageName: node - linkType: hard + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + typescript: ^5.2.2 + languageName: unknown + linkType: soft -"@helium/voter-stake-registry-sdk@npm:^0.7.6": - version: 0.7.17 - resolution: "@helium/voter-stake-registry-sdk@npm:0.7.17" +"@helium/voter-stake-registry-sdk@^0.8.0": + version: 0.0.0-use.local + resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.17 - "@helium/idls": ^0.7.17 + "@helium/anchor-resolvers": ^0.8.0 + "@helium/idls": ^0.8.0 + "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b + "@helium/spl-utils": ^0.8.0 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 bs58: ^4.0.1 - checksum: addf1e24ab9179eee3618f125114ee39ac151fd6a3c2b7f5e0956028d07c075d2707cb99607724c49a9aabfed6d0f7442bdc2b8e6387a7dc11f5f76da2a6c7b5 - languageName: node - linkType: hard + git-format-staged: ^2.1.3 + ts-loader: ^9.2.3 + ts-node: ^10.9.1 + typescript: ^5.2.2 + languageName: unknown + linkType: soft "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 @@ -497,7 +531,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0": +"@solana/web3.js@npm:^1.32.0, @solana/web3.js@npm:^1.43.4, @solana/web3.js@npm:^1.56.2, @solana/web3.js@npm:^1.66.2, @solana/web3.js@npm:^1.68.0, @solana/web3.js@npm:^1.78.4": version: 1.78.4 resolution: "@solana/web3.js@npm:1.78.4" dependencies: diff --git a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx index 0cfb87a3a..a62765acd 100644 --- a/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx +++ b/packages/voter-stake-registry-hooks/src/contexts/heliumVsrContext.tsx @@ -59,7 +59,7 @@ const defaultState: HeliumVsrState = { const HeliumVsrStateContext = createContext(defaultState); -export const useHeliumVsrState = () => { +export const useHeliumVsrState: () => HeliumVsrState = () => { const context = useContext(HeliumVsrStateContext); if (context === undefined) { throw new Error( diff --git a/packages/voter-stake-registry-hooks/src/hooks/useClosePosition.ts b/packages/voter-stake-registry-hooks/src/hooks/useClosePosition.ts index 7ca15475c..6c4230240 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useClosePosition.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useClosePosition.ts @@ -6,6 +6,8 @@ import { useAsync, useAsyncCallback } from "react-async-hook"; import { useHeliumVsrState } from "../contexts/heliumVsrContext"; import { HeliumVsrClient } from "../sdk/client"; import { PositionWithMeta } from "../sdk/types"; +import { useQueryClient } from "@tanstack/react-query"; +import { INDEXER_WAIT } from "../constants"; export const useClosePosition = () => { const { provider, unixNow } = useHeliumVsrState(); @@ -13,6 +15,7 @@ export const useClosePosition = () => { (provider) => HeliumVsrClient.connect(provider), [provider] ); + const queryClient = useQueryClient(); const { error, loading, execute } = useAsyncCallback( async ({ position, @@ -87,6 +90,17 @@ export const useClosePosition = () => { } else { await sendInstructions(provider, instructions); } + + // Give some time for indexers + setTimeout(async () => { + try { + await queryClient.invalidateQueries({ + queryKey: ["positionKeys"], + }); + } catch (e: any) { + console.error("Exception invalidating queries", e); + } + }, INDEXER_WAIT); } } ); diff --git a/packages/voter-stake-registry-hooks/src/hooks/useCreatePosition.ts b/packages/voter-stake-registry-hooks/src/hooks/useCreatePosition.ts index f284a69c8..973a7af8c 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useCreatePosition.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useCreatePosition.ts @@ -21,6 +21,8 @@ import { init as initHsd, subDaoEpochInfoKey, } from "@helium/helium-sub-daos-sdk"; +import { useQueryClient } from "@tanstack/react-query"; +import { INDEXER_WAIT } from "../constants"; const SECS_PER_DAY = 86400; export const useCreatePosition = () => { @@ -29,6 +31,7 @@ export const useCreatePosition = () => { (provider) => HeliumVsrClient.connect(provider), [provider] ); + const queryClient = useQueryClient(); const { error, loading, execute } = useAsyncCallback( async ({ amount, @@ -156,6 +159,17 @@ export const useCreatePosition = () => { await sendInstructions(provider, delegateInstructions); } } + + // Give some time for indexers + setTimeout(async () => { + try { + await queryClient.invalidateQueries({ + queryKey: ["positionKeys"], + }); + } catch (e: any) { + console.error("Exception invalidating queries", e); + } + }, INDEXER_WAIT); } } ); diff --git a/yarn.lock b/yarn.lock index 5043a1fa5..75fafa6b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -529,15 +529,6 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@npm:^0.7.17": - version: 0.7.17 - resolution: "@helium/account-fetch-cache@npm:0.7.17" - dependencies: - "@solana/web3.js": ^1.78.8 - checksum: cd04e5672ccab09a5559f69000ba99bfc2c7d7ef2de981f6f58ba9a4f841e3435f25dc0c53ef8c6f8729c0f06277261a16dbb14b6eb7ef9e392b59257765624d - languageName: node - linkType: hard - "@helium/account-postgres-sink-service@workspace:packages/account-postgres-sink-service": version: 0.0.0-use.local resolution: "@helium/account-postgres-sink-service@workspace:packages/account-postgres-sink-service" @@ -653,18 +644,6 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@npm:^0.7.17": - version: 0.7.17 - resolution: "@helium/anchor-resolvers@npm:0.7.17" - dependencies: - "@solana/spl-token": ^0.3.8 - "@solana/web3.js": ^1.78.8 - peerDependencies: - "@coral-xyz/anchor": ^0.28.0 - checksum: 725259d8e0379931642aa771c37e1cdb17bf34fb8c5533294cc2e8e337fe5053ddbcdad2a95a21ed4470169d734e2e790b807d95111b50b4d80d7946d3572e55 - languageName: node - linkType: hard - "@helium/circuit-breaker-sdk@^0.8.0, @helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk": version: 0.0.0-use.local resolution: "@helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk" @@ -1043,8 +1022,8 @@ __metadata: "@fastify/cors": ^8.1.1 "@fastify/static": ^6 "@helium/organization-sdk": ^0.0.5 - "@helium/spl-utils": ^0.7.6 - "@helium/voter-stake-registry-sdk": ^0.7.6 + "@helium/spl-utils": ^0.8.0 + "@helium/voter-stake-registry-sdk": ^0.8.0 "@solana/web3.js": ^1.78.8 "@types/bn.js": ^5.1.1 dotenv: ^16.0.3 @@ -1117,19 +1096,6 @@ __metadata: languageName: node linkType: hard -"@helium/idls@npm:^0.7.17": - version: 0.7.17 - resolution: "@helium/idls@npm:0.7.17" - dependencies: - "@coral-xyz/anchor": ^0.28.0 - "@solana/web3.js": ^1.78.8 - bn.js: ^5.2.0 - borsh: ^0.7.0 - bs58: ^4.0.1 - checksum: 172b4c59fa20d47e5ab528840b2b130be9beac12f2b631783743717b022cfc503d7df2116da2b30796cbb3d74b95cc447cbda936c1bdabb070d882706c1bb16e - languageName: node - linkType: hard - "@helium/lazy-distributor-sdk@^0.8.0, @helium/lazy-distributor-sdk@workspace:packages/lazy-distributor-sdk": version: 0.0.0-use.local resolution: "@helium/lazy-distributor-sdk@workspace:packages/lazy-distributor-sdk" @@ -1526,26 +1492,6 @@ __metadata: languageName: unknown linkType: soft -"@helium/spl-utils@npm:^0.7.6": - version: 0.7.17 - resolution: "@helium/spl-utils@npm:0.7.17" - dependencies: - "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.7.17 - "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.7.17 - "@metaplex-foundation/mpl-token-metadata": ^2.10.0 - "@solana/spl-account-compression": ^0.1.7 - "@solana/spl-token": ^0.3.8 - "@solana/web3.js": ^1.78.8 - axios: ^1.5.0 - bn.js: ^5.2.0 - borsh: ^0.7.0 - bs58: ^4.0.1 - checksum: 852674a8b96215510bb13a9dc3746dcc69919da686bb0b708fe884156fec786a168a1bf22c902542044608b03ab7e2bdb7a8451f0074b19308fb1d6480d3847e - languageName: node - linkType: hard - "@helium/state-controller-sdk@npm:0.0.8-next.19+4fa4c6b": version: 0.0.8-next.19 resolution: "@helium/state-controller-sdk@npm:0.0.8-next.19" @@ -1679,21 +1625,6 @@ __metadata: languageName: unknown linkType: soft -"@helium/voter-stake-registry-sdk@npm:^0.7.6": - version: 0.7.17 - resolution: "@helium/voter-stake-registry-sdk@npm:0.7.17" - dependencies: - "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.7.17 - "@helium/idls": ^0.7.17 - "@metaplex-foundation/mpl-token-metadata": ^2.10.0 - "@solana/spl-token": ^0.3.8 - bn.js: ^5.2.0 - bs58: ^4.0.1 - checksum: addf1e24ab9179eee3618f125114ee39ac151fd6a3c2b7f5e0956028d07c075d2707cb99607724c49a9aabfed6d0f7442bdc2b8e6387a7dc11f5f76da2a6c7b5 - languageName: node - linkType: hard - "@helium/vsr-metadata-service@workspace:packages/vsr-metadata-service": version: 0.0.0-use.local resolution: "@helium/vsr-metadata-service@workspace:packages/vsr-metadata-service" From a674b852d3108ce6e5cff49ce15f631e7d011421 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 21 Jun 2024 11:03:03 -0500 Subject: [PATCH 036/130] Fix locks --- packages/crons/yarn.deploy.lock | 16 +++---- packages/data-credits-sdk/yarn.deploy.lock | 20 ++++----- packages/distributor-oracle/yarn.deploy.lock | 8 ++-- packages/entity-invalidator/yarn.deploy.lock | 8 ++-- packages/helium-admin-cli/package.json | 2 +- packages/helium-admin-cli/yarn.deploy.lock | 28 ++++++------ .../yarn.deploy.lock | 8 ++-- packages/helium-sub-daos-sdk/yarn.deploy.lock | 20 ++++----- packages/helium-vote-service/package.json | 6 +-- packages/helium-vote-service/yarn.deploy.lock | 24 +++++----- packages/hexboosting-sdk/yarn.deploy.lock | 20 ++++----- packages/hotspot-utils/yarn.deploy.lock | 8 ++-- packages/metadata-service/yarn.deploy.lock | 8 ++-- packages/migration-service/yarn.deploy.lock | 8 ++-- .../yarn.deploy.lock | 8 ++-- packages/monitor-service/yarn.deploy.lock | 8 ++-- .../src/hooks/useVote.ts | 25 ++++++----- .../yarn.deploy.lock | 10 ++--- .../voter-stake-registry-sdk/yarn.deploy.lock | 18 ++++---- .../vsr-metadata-service/yarn.deploy.lock | 10 ++--- yarn.lock | 44 +++++++++---------- 21 files changed, 154 insertions(+), 153 deletions(-) diff --git a/packages/crons/yarn.deploy.lock b/packages/crons/yarn.deploy.lock index 2fd0d092c..29ca97c85 100644 --- a/packages/crons/yarn.deploy.lock +++ b/packages/crons/yarn.deploy.lock @@ -204,11 +204,11 @@ __metadata: "@helium/organization-sdk": ^0.0.8 "@helium/price-oracle-sdk": ^0.8.2 "@helium/proposal-sdk": ^0.0.8 - "@helium/rewards-oracle-sdk": ^0.8.0 - "@helium/spl-utils": ^0.8.0 + "@helium/rewards-oracle-sdk": ^0.8.2 + "@helium/spl-utils": ^0.8.2 "@helium/state-controller-sdk": 0.0.8-next.19+4fa4c6b - "@helium/treasury-management-sdk": ^0.8.0 - "@helium/voter-stake-registry-sdk": ^0.8.0 + "@helium/treasury-management-sdk": ^0.8.2 + "@helium/voter-stake-registry-sdk": ^0.8.2 "@solana/spl-token": ^0.3.8 "@solana/web3.js": ^1.78.8 "@types/bn.js": ^5.1.0 @@ -407,7 +407,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.8.0": +"@helium/no-emit-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -532,10 +532,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/data-credits-sdk/yarn.deploy.lock b/packages/data-credits-sdk/yarn.deploy.lock index b69410cfa..dcaf549af 100644 --- a/packages/data-credits-sdk/yarn.deploy.lock +++ b/packages/data-credits-sdk/yarn.deploy.lock @@ -67,7 +67,7 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@^0.8.0": +"@helium/account-fetch-cache@^0.8.2": version: 0.0.0-use.local resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: @@ -89,7 +89,7 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@^0.8.0": +"@helium/anchor-resolvers@^0.8.2": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" dependencies: @@ -115,7 +115,7 @@ __metadata: languageName: node linkType: hard -"@helium/circuit-breaker-sdk@^0.8.0": +"@helium/circuit-breaker-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk" dependencies: @@ -205,14 +205,14 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.8.0": +"@helium/spl-utils@^0.8.2": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.8.0 + "@helium/account-fetch-cache": ^0.8.2 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 @@ -227,7 +227,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/treasury-management-sdk@^0.8.0": +"@helium/treasury-management-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/treasury-management-sdk@workspace:packages/treasury-management-sdk" dependencies: @@ -249,10 +249,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/distributor-oracle/yarn.deploy.lock b/packages/distributor-oracle/yarn.deploy.lock index 4d57713a4..853707f93 100644 --- a/packages/distributor-oracle/yarn.deploy.lock +++ b/packages/distributor-oracle/yarn.deploy.lock @@ -334,7 +334,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.8.0": +"@helium/no-emit-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -410,10 +410,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/entity-invalidator/yarn.deploy.lock b/packages/entity-invalidator/yarn.deploy.lock index 459b0b2e1..62ffadad3 100644 --- a/packages/entity-invalidator/yarn.deploy.lock +++ b/packages/entity-invalidator/yarn.deploy.lock @@ -264,7 +264,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.8.0": +"@helium/no-emit-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -324,10 +324,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index 41d3c3c11..2ba4000d7 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -49,10 +49,10 @@ "@helium/helium-sub-daos-sdk": "^0.8.2", "@helium/lazy-distributor-sdk": "^0.8.2", "@helium/mobile-entity-manager-sdk": "^0.8.2", + "@helium/nft-proxy-sdk": "0.0.8-next.19+4fa4c6b", "@helium/price-oracle-sdk": "^0.8.2", "@helium/spl-utils": "^0.8.2", "@helium/treasury-management-sdk": "^0.8.2", - "@helium/nft-proxy-sdk": "0.0.8-next.19+4fa4c6b", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-governance": "^0.3.18", "@solana/spl-token": "^0.3.8", diff --git a/packages/helium-admin-cli/yarn.deploy.lock b/packages/helium-admin-cli/yarn.deploy.lock index a9d6cca2b..fd6ac49b0 100644 --- a/packages/helium-admin-cli/yarn.deploy.lock +++ b/packages/helium-admin-cli/yarn.deploy.lock @@ -318,17 +318,17 @@ __metadata: "@helium/address": ^4.10.2 "@helium/circuit-breaker-sdk": ^0.8.2 "@helium/crypto": ^4.10.2 - "@helium/data-credits-sdk": ^0.8.0 - "@helium/distributor-oracle": ^0.8.0 - "@helium/fanout-sdk": ^0.8.0 - "@helium/helium-entity-manager-sdk": ^0.8.0 - "@helium/helium-sub-daos-sdk": ^0.8.0 - "@helium/lazy-distributor-sdk": ^0.8.0 - "@helium/mobile-entity-manager-sdk": ^0.8.0 + "@helium/data-credits-sdk": ^0.8.2 + "@helium/distributor-oracle": ^0.8.2 + "@helium/fanout-sdk": ^0.8.2 + "@helium/helium-entity-manager-sdk": ^0.8.2 + "@helium/helium-sub-daos-sdk": ^0.8.2 + "@helium/lazy-distributor-sdk": ^0.8.2 + "@helium/mobile-entity-manager-sdk": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/price-oracle-sdk": ^0.8.0 - "@helium/spl-utils": ^0.8.0 - "@helium/treasury-management-sdk": ^0.8.0 + "@helium/price-oracle-sdk": ^0.8.2 + "@helium/spl-utils": ^0.8.2 + "@helium/treasury-management-sdk": ^0.8.2 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-governance": ^0.3.18 "@solana/spl-token": ^0.3.8 @@ -472,7 +472,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.8.0": +"@helium/no-emit-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -563,10 +563,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-entity-manager-sdk/yarn.deploy.lock b/packages/helium-entity-manager-sdk/yarn.deploy.lock index 2a596c9c1..97c7eb5c2 100644 --- a/packages/helium-entity-manager-sdk/yarn.deploy.lock +++ b/packages/helium-entity-manager-sdk/yarn.deploy.lock @@ -233,7 +233,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.8.0": +"@helium/no-emit-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -293,10 +293,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-sub-daos-sdk/yarn.deploy.lock b/packages/helium-sub-daos-sdk/yarn.deploy.lock index 8bcb6e9be..fd6c68466 100644 --- a/packages/helium-sub-daos-sdk/yarn.deploy.lock +++ b/packages/helium-sub-daos-sdk/yarn.deploy.lock @@ -67,7 +67,7 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@^0.8.0": +"@helium/account-fetch-cache@^0.8.2": version: 0.0.0-use.local resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: @@ -89,7 +89,7 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@^0.8.0": +"@helium/anchor-resolvers@^0.8.2": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" dependencies: @@ -115,7 +115,7 @@ __metadata: languageName: node linkType: hard -"@helium/circuit-breaker-sdk@^0.8.0": +"@helium/circuit-breaker-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk" dependencies: @@ -185,14 +185,14 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.8.0": +"@helium/spl-utils@^0.8.2": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.8.0 + "@helium/account-fetch-cache": ^0.8.2 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 @@ -207,7 +207,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/treasury-management-sdk@^0.8.0": +"@helium/treasury-management-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/treasury-management-sdk@workspace:packages/treasury-management-sdk" dependencies: @@ -229,10 +229,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/helium-vote-service/package.json b/packages/helium-vote-service/package.json index b4f82c0fe..0d095fb92 100644 --- a/packages/helium-vote-service/package.json +++ b/packages/helium-vote-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.8.0", + "version": "0.8.2", "description": "API for helium vote", "repository": { "type": "git", @@ -35,8 +35,8 @@ "@fastify/cors": "^8.1.1", "@fastify/static": "^6", "@helium/organization-sdk": "^0.0.5", - "@helium/spl-utils": "^0.8.0", - "@helium/voter-stake-registry-sdk": "^0.8.0", + "@helium/spl-utils": "^0.8.2", + "@helium/voter-stake-registry-sdk": "^0.8.2", "@solana/web3.js": "^1.78.8", "dotenv": "^16.0.3", "fastify": "^4.13.0", diff --git a/packages/helium-vote-service/yarn.deploy.lock b/packages/helium-vote-service/yarn.deploy.lock index d2ed723b6..843d35828 100644 --- a/packages/helium-vote-service/yarn.deploy.lock +++ b/packages/helium-vote-service/yarn.deploy.lock @@ -145,7 +145,7 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@^0.8.0": +"@helium/account-fetch-cache@^0.8.2": version: 0.0.0-use.local resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: @@ -167,7 +167,7 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@^0.8.0": +"@helium/anchor-resolvers@^0.8.2": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" dependencies: @@ -200,8 +200,8 @@ __metadata: "@fastify/cors": ^8.1.1 "@fastify/static": ^6 "@helium/organization-sdk": ^0.0.5 - "@helium/spl-utils": ^0.8.0 - "@helium/voter-stake-registry-sdk": ^0.8.0 + "@helium/spl-utils": ^0.8.2 + "@helium/voter-stake-registry-sdk": ^0.8.2 "@solana/web3.js": ^1.78.8 "@types/bn.js": ^5.1.1 dotenv: ^16.0.3 @@ -216,7 +216,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/idls@^0.8.0": +"@helium/idls@^0.8.2": version: 0.0.0-use.local resolution: "@helium/idls@workspace:packages/idls" dependencies: @@ -285,14 +285,14 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.8.0": +"@helium/spl-utils@^0.8.2": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.8.0 + "@helium/account-fetch-cache": ^0.8.2 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 @@ -307,15 +307,15 @@ __metadata: languageName: unknown linkType: soft -"@helium/voter-stake-registry-sdk@^0.8.0": +"@helium/voter-stake-registry-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/hexboosting-sdk/yarn.deploy.lock b/packages/hexboosting-sdk/yarn.deploy.lock index 41e917936..82046ea73 100644 --- a/packages/hexboosting-sdk/yarn.deploy.lock +++ b/packages/hexboosting-sdk/yarn.deploy.lock @@ -67,7 +67,7 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@^0.8.0": +"@helium/account-fetch-cache@^0.8.2": version: 0.0.0-use.local resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: @@ -89,7 +89,7 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@^0.8.0": +"@helium/anchor-resolvers@^0.8.2": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" dependencies: @@ -115,7 +115,7 @@ __metadata: languageName: node linkType: hard -"@helium/circuit-breaker-sdk@^0.8.0": +"@helium/circuit-breaker-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/circuit-breaker-sdk@workspace:packages/circuit-breaker-sdk" dependencies: @@ -202,14 +202,14 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.8.0": +"@helium/spl-utils@^0.8.2": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.8.0 + "@helium/account-fetch-cache": ^0.8.2 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 @@ -224,7 +224,7 @@ __metadata: languageName: unknown linkType: soft -"@helium/treasury-management-sdk@^0.8.0": +"@helium/treasury-management-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/treasury-management-sdk@workspace:packages/treasury-management-sdk" dependencies: @@ -246,10 +246,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/hotspot-utils/yarn.deploy.lock b/packages/hotspot-utils/yarn.deploy.lock index d91e3c787..e74e842fe 100644 --- a/packages/hotspot-utils/yarn.deploy.lock +++ b/packages/hotspot-utils/yarn.deploy.lock @@ -247,7 +247,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.8.0": +"@helium/no-emit-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -307,10 +307,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/metadata-service/yarn.deploy.lock b/packages/metadata-service/yarn.deploy.lock index 40d7511b3..f96b16659 100644 --- a/packages/metadata-service/yarn.deploy.lock +++ b/packages/metadata-service/yarn.deploy.lock @@ -361,7 +361,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.8.0": +"@helium/no-emit-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -421,10 +421,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/migration-service/yarn.deploy.lock b/packages/migration-service/yarn.deploy.lock index 37383d277..1ceb5ba21 100644 --- a/packages/migration-service/yarn.deploy.lock +++ b/packages/migration-service/yarn.deploy.lock @@ -476,7 +476,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.8.0": +"@helium/no-emit-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -552,10 +552,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/mobile-entity-manager-sdk/yarn.deploy.lock b/packages/mobile-entity-manager-sdk/yarn.deploy.lock index f8d7d6ef0..424ef45e6 100644 --- a/packages/mobile-entity-manager-sdk/yarn.deploy.lock +++ b/packages/mobile-entity-manager-sdk/yarn.deploy.lock @@ -251,7 +251,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.8.0": +"@helium/no-emit-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -311,10 +311,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/monitor-service/yarn.deploy.lock b/packages/monitor-service/yarn.deploy.lock index 794e5dd7f..4c98efc3d 100644 --- a/packages/monitor-service/yarn.deploy.lock +++ b/packages/monitor-service/yarn.deploy.lock @@ -362,7 +362,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.8.0": +"@helium/no-emit-sdk@^0.8.2": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -437,10 +437,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts index 1e58c9796..bffd182c0 100644 --- a/packages/voter-stake-registry-hooks/src/hooks/useVote.ts +++ b/packages/voter-stake-registry-hooks/src/hooks/useVote.ts @@ -1,9 +1,5 @@ import { useProposal } from "@helium/modular-governance-hooks"; -import { - Status, - batchParallelInstructions, - truthy -} from "@helium/spl-utils"; +import { Status, batchParallelInstructions, truthy } from "@helium/spl-utils"; import { init, voteMarkerKey } from "@helium/voter-stake-registry-sdk"; import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import BN from "bn.js"; @@ -27,7 +23,9 @@ export const useVote = (proposalKey: PublicKey) => { const position = positions?.[idx]; marker.info?.choices.forEach((choice) => { // Only count my own and down the line vote weights - if ((marker?.info?.proxyIndex || 0) >= (position?.proxy?.index || 0)) { + if ( + (marker?.info?.proxyIndex || 0) >= (position?.proxy?.index || 0) + ) { acc[choice] = (acc[choice] || new BN(0)).add( marker.info?.weight || new BN(0) ); @@ -37,10 +35,10 @@ export const useVote = (proposalKey: PublicKey) => { }, new Array(proposal?.choices.length)); } }, [proposal, markers, positions]); - const voters: (PublicKey)[][] | undefined = useMemo(() => { + const voters: PublicKey[][] | undefined = useMemo(() => { if (proposal && markers) { const nonUniqueResult = markers.reduce((acc, marker, idx) => { - const position = positions?.[idx] + const position = positions?.[idx]; marker.info?.choices.forEach((choice) => { acc[choice] ||= []; if ( @@ -54,7 +52,11 @@ export const useVote = (proposalKey: PublicKey) => { }); return acc; }, new Array(proposal?.choices.length)); - return nonUniqueResult.map((voters) => Array.from(new Set(voters))); + return nonUniqueResult.map((voters) => + Array.from(new Set(voters.map((v) => v.toBase58()))).map( + (v: any) => new PublicKey(v) + ) + ); } }, [markers, positions]); const canVote = useCallback( @@ -87,7 +89,7 @@ export const useVote = (proposalKey: PublicKey) => { choice, onInstructions, onProgress, - maxSignatureBatch + maxSignatureBatch, }: { choice: number; // Instead of sending the transaction, let the caller decide onInstructions?: ( @@ -116,8 +118,7 @@ export const useVote = (proposalKey: PublicKey) => { if (position.isProxiedToMe) { if ( marker && - (marker.proxyIndex < - (position.proxy?.index || 0) || + (marker.proxyIndex < (position.proxy?.index || 0) || marker.choices.includes(choice)) ) { // Do not vote with a position that has been delegated to us, but voting overidden diff --git a/packages/voter-stake-registry-hooks/yarn.deploy.lock b/packages/voter-stake-registry-hooks/yarn.deploy.lock index 36e7eadeb..20ae419de 100644 --- a/packages/voter-stake-registry-hooks/yarn.deploy.lock +++ b/packages/voter-stake-registry-hooks/yarn.deploy.lock @@ -381,8 +381,8 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.8.2 "@helium/modular-governance-hooks": ^0.0.8 "@helium/modular-governance-idls": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 - "@helium/voter-stake-registry-sdk": ^0.8.0 + "@helium/spl-utils": ^0.8.2 + "@helium/voter-stake-registry-sdk": ^0.8.2 "@solana/wallet-adapter-base": ^0.9.22 "@solana/wallet-adapter-react": ^0.15.32 "@solana/web3.js": ^1.78.8 @@ -404,10 +404,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/voter-stake-registry-sdk/yarn.deploy.lock b/packages/voter-stake-registry-sdk/yarn.deploy.lock index 26014a295..1049a8ad7 100644 --- a/packages/voter-stake-registry-sdk/yarn.deploy.lock +++ b/packages/voter-stake-registry-sdk/yarn.deploy.lock @@ -67,7 +67,7 @@ __metadata: languageName: node linkType: hard -"@helium/account-fetch-cache@^0.8.0": +"@helium/account-fetch-cache@^0.8.2": version: 0.0.0-use.local resolution: "@helium/account-fetch-cache@workspace:packages/account-fetch-cache" dependencies: @@ -89,7 +89,7 @@ __metadata: languageName: node linkType: hard -"@helium/anchor-resolvers@^0.8.0": +"@helium/anchor-resolvers@^0.8.2": version: 0.0.0-use.local resolution: "@helium/anchor-resolvers@workspace:packages/anchor-resolvers" dependencies: @@ -115,7 +115,7 @@ __metadata: languageName: node linkType: hard -"@helium/idls@^0.8.0": +"@helium/idls@^0.8.2": version: 0.0.0-use.local resolution: "@helium/idls@workspace:packages/idls" dependencies: @@ -151,14 +151,14 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.8.0": +"@helium/spl-utils@^0.8.2": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/account-fetch-cache": ^0.8.0 + "@helium/account-fetch-cache": ^0.8.2 "@helium/address": ^4.10.2 - "@helium/anchor-resolvers": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-token": ^0.3.8 @@ -178,10 +178,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:." dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/packages/vsr-metadata-service/yarn.deploy.lock b/packages/vsr-metadata-service/yarn.deploy.lock index 3f3da53a9..638255101 100644 --- a/packages/vsr-metadata-service/yarn.deploy.lock +++ b/packages/vsr-metadata-service/yarn.deploy.lock @@ -159,7 +159,7 @@ __metadata: languageName: node linkType: hard -"@helium/idls@^0.8.0": +"@helium/idls@^0.8.2": version: 0.0.0-use.local resolution: "@helium/idls@workspace:packages/idls" dependencies: @@ -195,7 +195,7 @@ __metadata: languageName: node linkType: hard -"@helium/spl-utils@^0.8.0": +"@helium/spl-utils@^0.8.2": version: 0.0.0-use.local resolution: "@helium/spl-utils@workspace:packages/spl-utils" dependencies: @@ -222,10 +222,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 diff --git a/yarn.lock b/yarn.lock index eb00b8478..744b1d41f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -677,11 +677,11 @@ __metadata: "@helium/organization-sdk": ^0.0.8 "@helium/price-oracle-sdk": ^0.8.2 "@helium/proposal-sdk": ^0.0.8 - "@helium/rewards-oracle-sdk": ^0.8.0 - "@helium/spl-utils": ^0.8.0 + "@helium/rewards-oracle-sdk": ^0.8.2 + "@helium/spl-utils": ^0.8.2 "@helium/state-controller-sdk": 0.0.8-next.19+4fa4c6b - "@helium/treasury-management-sdk": ^0.8.0 - "@helium/voter-stake-registry-sdk": ^0.8.0 + "@helium/treasury-management-sdk": ^0.8.2 + "@helium/voter-stake-registry-sdk": ^0.8.2 "@solana/spl-token": ^0.3.8 "@solana/web3.js": ^1.78.8 "@types/bn.js": ^5.1.0 @@ -901,17 +901,17 @@ __metadata: "@helium/address": ^4.10.2 "@helium/circuit-breaker-sdk": ^0.8.2 "@helium/crypto": ^4.10.2 - "@helium/data-credits-sdk": ^0.8.0 - "@helium/distributor-oracle": ^0.8.0 - "@helium/fanout-sdk": ^0.8.0 - "@helium/helium-entity-manager-sdk": ^0.8.0 - "@helium/helium-sub-daos-sdk": ^0.8.0 - "@helium/lazy-distributor-sdk": ^0.8.0 - "@helium/mobile-entity-manager-sdk": ^0.8.0 + "@helium/data-credits-sdk": ^0.8.2 + "@helium/distributor-oracle": ^0.8.2 + "@helium/fanout-sdk": ^0.8.2 + "@helium/helium-entity-manager-sdk": ^0.8.2 + "@helium/helium-sub-daos-sdk": ^0.8.2 + "@helium/lazy-distributor-sdk": ^0.8.2 + "@helium/mobile-entity-manager-sdk": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/price-oracle-sdk": ^0.8.0 - "@helium/spl-utils": ^0.8.0 - "@helium/treasury-management-sdk": ^0.8.0 + "@helium/price-oracle-sdk": ^0.8.2 + "@helium/spl-utils": ^0.8.2 + "@helium/treasury-management-sdk": ^0.8.2 "@solana/spl-account-compression": ^0.1.7 "@solana/spl-governance": ^0.3.18 "@solana/spl-token": ^0.3.8 @@ -1022,8 +1022,8 @@ __metadata: "@fastify/cors": ^8.1.1 "@fastify/static": ^6 "@helium/organization-sdk": ^0.0.5 - "@helium/spl-utils": ^0.8.0 - "@helium/voter-stake-registry-sdk": ^0.8.0 + "@helium/spl-utils": ^0.8.2 + "@helium/voter-stake-registry-sdk": ^0.8.2 "@solana/web3.js": ^1.78.8 "@types/bn.js": ^5.1.1 dotenv: ^16.0.3 @@ -1337,7 +1337,7 @@ __metadata: languageName: node linkType: hard -"@helium/no-emit-sdk@^0.8.0, @helium/no-emit-sdk@workspace:packages/no-emit-sdk": +"@helium/no-emit-sdk@^0.8.2, @helium/no-emit-sdk@workspace:packages/no-emit-sdk": version: 0.0.0-use.local resolution: "@helium/no-emit-sdk@workspace:packages/no-emit-sdk" dependencies: @@ -1587,8 +1587,8 @@ __metadata: "@helium/helium-sub-daos-sdk": ^0.8.2 "@helium/modular-governance-hooks": ^0.0.8 "@helium/modular-governance-idls": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 - "@helium/voter-stake-registry-sdk": ^0.8.0 + "@helium/spl-utils": ^0.8.2 + "@helium/voter-stake-registry-sdk": ^0.8.2 "@solana/wallet-adapter-base": ^0.9.22 "@solana/wallet-adapter-react": ^0.15.32 "@solana/web3.js": ^1.78.8 @@ -1610,10 +1610,10 @@ __metadata: resolution: "@helium/voter-stake-registry-sdk@workspace:packages/voter-stake-registry-sdk" dependencies: "@coral-xyz/anchor": ^0.28.0 - "@helium/anchor-resolvers": ^0.8.0 - "@helium/idls": ^0.8.0 + "@helium/anchor-resolvers": ^0.8.2 + "@helium/idls": ^0.8.2 "@helium/nft-proxy-sdk": 0.0.8-next.19+4fa4c6b - "@helium/spl-utils": ^0.8.0 + "@helium/spl-utils": ^0.8.2 "@metaplex-foundation/mpl-token-metadata": ^2.10.0 "@solana/spl-token": ^0.3.8 bn.js: ^5.2.0 From 6c7538f3f37f32c881154a1f76e6a0d0d1d99b60 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 21 Jun 2024 12:28:32 -0500 Subject: [PATCH 037/130] Fix tests --- scripts/bootstrap.sh | 5 ----- tests/voter-stake-registry.ts | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 016511d67..4aad4f1ba 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -37,13 +37,8 @@ echo "Using $RND for dao names" # init the dao and subdaos ./packages/helium-admin-cli/bin/helium-admin.js create-dao \ -<<<<<<< HEAD - --hntPriceOracle 7moA1i5vQUpfDwSpK6Pw9s56ahB7WFGidtbL2ujWrVvm \ - --numHnt 200136852 --numHst 200000000 --numDc 2000000000000 --realmName "Helium" -u $CLUSTER_URL -======= --hntPriceOracle 4DdmDswskDxXGpwHrXUfn2CNUm9rt21ac79GHNTN3J33 \ --numHnt 200136852 --numHst 200000000 --numDc 2000000000000 --realmName "Helium DAO" -u $CLUSTER_URL ->>>>>>> origin/develop ./packages/helium-admin-cli/bin/helium-admin.js create-subdao \ --hntPubkey $(solana address -k packages/helium-admin-cli/keypairs/hnt.json) \ diff --git a/tests/voter-stake-registry.ts b/tests/voter-stake-registry.ts index 4475b752b..bf2c92bb3 100644 --- a/tests/voter-stake-registry.ts +++ b/tests/voter-stake-registry.ts @@ -570,7 +570,7 @@ describe("voter-stake-registry", () => { markerA = await program.account.voteMarkerV0.fetchNullable( marker! as PublicKey ); - expect(markerA?.choices).to.be.empty; + expect(markerA?.choices || []).to.be.empty; await program.methods .voteV0({ From 590e28629a56f6f3f2deda204ee0cecc48e3bf6e Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 21 Jun 2024 12:41:52 -0500 Subject: [PATCH 038/130] Only close markers after vote is finished. --- onboHxQSGJH2PCkFG3WPp5K3zWHFC57nBNW4dYFyxLo.json | 1 - .../src/instructions/proxied_relinquish_vote_v0.rs | 4 ---- .../src/instructions/relinquish_expired_vote_v0.rs | 4 ++++ .../src/instructions/relinquish_vote_v1.rs | 4 ---- 4 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 onboHxQSGJH2PCkFG3WPp5K3zWHFC57nBNW4dYFyxLo.json diff --git a/onboHxQSGJH2PCkFG3WPp5K3zWHFC57nBNW4dYFyxLo.json b/onboHxQSGJH2PCkFG3WPp5K3zWHFC57nBNW4dYFyxLo.json deleted file mode 100644 index d41dc79d8..000000000 --- a/onboHxQSGJH2PCkFG3WPp5K3zWHFC57nBNW4dYFyxLo.json +++ /dev/null @@ -1 +0,0 @@ -[149,17,54,45,196,122,115,3,238,69,201,17,37,250,90,63,100,141,154,51,151,46,66,115,184,21,39,95,185,211,204,63,11,252,70,250,225,130,251,60,68,143,127,184,83,253,41,39,246,70,177,67,212,208,180,28,104,236,168,147,107,81,52,184] \ No newline at end of file diff --git a/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs b/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs index 6b66e8337..e5a4dd675 100644 --- a/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs +++ b/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs @@ -101,9 +101,5 @@ pub fn handler(ctx: Context, args: RelinquishVoteArgsV1 }, )?; - if marker.choices.is_empty() { - marker.close(ctx.accounts.rent_refund.to_account_info())?; - } - Ok(()) } diff --git a/programs/voter-stake-registry/src/instructions/relinquish_expired_vote_v0.rs b/programs/voter-stake-registry/src/instructions/relinquish_expired_vote_v0.rs index 1cd673ad2..9d4e41b5e 100644 --- a/programs/voter-stake-registry/src/instructions/relinquish_expired_vote_v0.rs +++ b/programs/voter-stake-registry/src/instructions/relinquish_expired_vote_v0.rs @@ -6,11 +6,15 @@ use crate::state::*; // Allow anyone to permissionlessly close expired votes and refund to user #[derive(Accounts)] pub struct RelinquishExpiredVoteV0<'info> { + /// CHECK: Destination for refunded rent + #[account(mut)] + pub rent_refund: AccountInfo<'info>, #[account( mut, seeds = [b"marker", marker.mint.as_ref(), proposal.key().as_ref()], bump = marker.bump_seed, has_one = proposal, + has_one = rent_refund )] pub marker: Box>, #[account( diff --git a/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs b/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs index 0985dbefe..3153254a8 100644 --- a/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs +++ b/programs/voter-stake-registry/src/instructions/relinquish_vote_v1.rs @@ -102,9 +102,5 @@ pub fn handler(ctx: Context, args: RelinquishVoteArgsV1) -> Re }, )?; - if marker.choices.is_empty() { - marker.close(ctx.accounts.rent_refund.to_account_info())?; - } - Ok(()) } From 322a0b8839355eeb940b0b3a92141758251ba833 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 21 Jun 2024 13:17:41 -0500 Subject: [PATCH 039/130] fix script --- packages/crons/src/close-governance.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/crons/src/close-governance.ts b/packages/crons/src/close-governance.ts index 00d6d62a8..5d94a3192 100644 --- a/packages/crons/src/close-governance.ts +++ b/packages/crons/src/close-governance.ts @@ -103,6 +103,7 @@ import pLimit from "p-limit"; position: positionKey(marker.account.mint)[0], proposal: marker.account.proposal, systemProgram: SystemProgram.programId, + rentRefund: marker.account.rentRefund, }) .instruction(); }) From 82a0a3cbc3071f5da6055a3b09ea438cb5945396 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 21 Jun 2024 13:21:55 -0500 Subject: [PATCH 040/130] Add missing check --- .../src/instructions/proxied_relinquish_vote_v0.rs | 4 +++- .../voter-stake-registry/src/instructions/proxied_vote_v0.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs b/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs index e5a4dd675..1973ef5b2 100644 --- a/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs +++ b/programs/voter-stake-registry/src/instructions/proxied_relinquish_vote_v0.rs @@ -27,7 +27,9 @@ pub struct ProxiedRelinquishVoteV0<'info> { constraint = proxy_assignment.proxy_config == registrar.proxy_config, constraint = proxy_assignment.expiration_time > Clock::get().unwrap().unix_timestamp, // only the current or earlier delegates can change vote. - constraint = proxy_assignment.index <= marker.proxy_index + constraint = proxy_assignment.index <= marker.proxy_index, + // Ensure this is actually for the position + constraint = proxy_assignment.asset == position.mint, )] pub proxy_assignment: Box>, #[account( diff --git a/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs b/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs index 2b9dbc217..b03bd3394 100644 --- a/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs +++ b/programs/voter-stake-registry/src/instructions/proxied_vote_v0.rs @@ -32,7 +32,9 @@ pub struct ProxiedVoteV0<'info> { constraint = proxy_assignment.proxy_config == registrar.proxy_config, constraint = proxy_assignment.expiration_time > Clock::get().unwrap().unix_timestamp, // only the current or earlier proxies can change vote. Or if proposal not set, this was an `init` for the marker - constraint = proxy_assignment.index <= marker.proxy_index || marker.proposal == Pubkey::default() + constraint = proxy_assignment.index <= marker.proxy_index || marker.proposal == Pubkey::default(), + // Ensure this is actually for the position + constraint = proxy_assignment.asset == position.mint, )] pub proxy_assignment: Box>, #[account( From 569c9f3e30244602b50dd3761157661aa55d15b1 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 21 Jun 2024 16:46:40 -0500 Subject: [PATCH 041/130] Fix docker for helium-vote --- docker-info.json | 3 ++- packages/helium-admin-cli/src/create-subdao.ts | 2 +- tests/voter-stake-registry.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-info.json b/docker-info.json index 13b422227..94a34b816 100644 --- a/docker-info.json +++ b/docker-info.json @@ -1,5 +1,6 @@ { "web": { + "helium-vote-service": "./packages/helium-vote-service", "solana-monitor": "./packages/monitor-service", "ecc-verifier": "./utils/ecc-sig-verifier", "entity-metadata-service": "./packages/metadata-service", @@ -20,4 +21,4 @@ "data": { "active-hotspot-oracle": "./utils/active-hotspot-oracle" } -} \ No newline at end of file +} diff --git a/packages/helium-admin-cli/src/create-subdao.ts b/packages/helium-admin-cli/src/create-subdao.ts index 5f5e97979..ccf312f6d 100644 --- a/packages/helium-admin-cli/src/create-subdao.ts +++ b/packages/helium-admin-cli/src/create-subdao.ts @@ -191,7 +191,7 @@ export async function run(args: any = process.argv) { }, delegationSeasonsFile: { type: "string", - default: `${__dirname}/../../delegation-seasons.json`, + default: `${__dirname}/../../proxy-seasons.json`, }, }); const argv = await yarg.argv; diff --git a/tests/voter-stake-registry.ts b/tests/voter-stake-registry.ts index bf2c92bb3..db5b20a64 100644 --- a/tests/voter-stake-registry.ts +++ b/tests/voter-stake-registry.ts @@ -527,7 +527,7 @@ describe("voter-stake-registry", () => { markerA = await program.account.voteMarkerV0.fetchNullable( marker! as PublicKey ); - expect(markerA).to.be.null; + expect(markerA?.choices).to.be.empty; }); it("allows earlier proxies to change the vote", async () => { From 68c6d3b8e619d58579b06dad8178382715ead01a Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Thu, 27 Jun 2024 10:50:07 -0700 Subject: [PATCH 042/130] Add missing yarns --- .../.yarn/releases/yarn-3.6.4.cjs | 874 ++++++++++++++++++ packages/helium-vote-service/.yarnrc.yml | 6 + 2 files changed, 880 insertions(+) create mode 100755 packages/helium-vote-service/.yarn/releases/yarn-3.6.4.cjs create mode 100644 packages/helium-vote-service/.yarnrc.yml diff --git a/packages/helium-vote-service/.yarn/releases/yarn-3.6.4.cjs b/packages/helium-vote-service/.yarn/releases/yarn-3.6.4.cjs new file mode 100755 index 000000000..ebd9272da --- /dev/null +++ b/packages/helium-vote-service/.yarn/releases/yarn-3.6.4.cjs @@ -0,0 +1,874 @@ +#!/usr/bin/env node +/* eslint-disable */ +//prettier-ignore +(()=>{var Dge=Object.create;var lS=Object.defineProperty;var kge=Object.getOwnPropertyDescriptor;var Rge=Object.getOwnPropertyNames;var Fge=Object.getPrototypeOf,Nge=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Tge=(r,e)=>()=>(r&&(e=r(r=0)),e);var w=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ut=(r,e)=>{for(var t in e)lS(r,t,{get:e[t],enumerable:!0})},Lge=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Rge(e))!Nge.call(r,n)&&n!==t&&lS(r,n,{get:()=>e[n],enumerable:!(i=kge(e,n))||i.enumerable});return r};var Pe=(r,e,t)=>(t=r!=null?Dge(Fge(r)):{},Lge(e||!r||!r.__esModule?lS(t,"default",{value:r,enumerable:!0}):t,r));var PK=w((zXe,xK)=>{xK.exports=vK;vK.sync=ife;var QK=J("fs");function rfe(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{FK.exports=kK;kK.sync=nfe;var DK=J("fs");function kK(r,e,t){DK.stat(r,function(i,n){t(i,i?!1:RK(n,e))})}function nfe(r,e){return RK(DK.statSync(r),e)}function RK(r,e){return r.isFile()&&sfe(r,e)}function sfe(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var LK=w((ZXe,TK)=>{var XXe=J("fs"),lI;process.platform==="win32"||global.TESTING_WINDOWS?lI=PK():lI=NK();TK.exports=SS;SS.sync=ofe;function SS(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){SS(r,e||{},function(s,o){s?n(s):i(o)})})}lI(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function ofe(r,e){try{return lI.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var YK=w((_Xe,GK)=>{var Dg=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",OK=J("path"),afe=Dg?";":":",MK=LK(),KK=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),UK=(r,e)=>{let t=e.colon||afe,i=r.match(/\//)||Dg&&r.match(/\\/)?[""]:[...Dg?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Dg?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Dg?n.split(t):[""];return Dg&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},HK=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=UK(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(KK(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=OK.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];MK(c+p,{pathExt:s},(C,y)=>{if(!C&&y)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},Afe=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=UK(r,e),s=[];for(let o=0;o{"use strict";var jK=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};vS.exports=jK;vS.exports.default=jK});var VK=w((eZe,zK)=>{"use strict";var JK=J("path"),lfe=YK(),cfe=qK();function WK(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=lfe.sync(r.command,{path:t[cfe({env:t})],pathExt:e?JK.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=JK.resolve(n?r.options.cwd:"",o)),o}function ufe(r){return WK(r)||WK(r,!0)}zK.exports=ufe});var XK=w((tZe,PS)=>{"use strict";var xS=/([()\][%!^"`<>&|;, *?])/g;function gfe(r){return r=r.replace(xS,"^$1"),r}function ffe(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(xS,"^$1"),e&&(r=r.replace(xS,"^$1")),r}PS.exports.command=gfe;PS.exports.argument=ffe});var _K=w((rZe,ZK)=>{"use strict";ZK.exports=/^#!(.*)/});var eU=w((iZe,$K)=>{"use strict";var hfe=_K();$K.exports=(r="")=>{let e=r.match(hfe);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var rU=w((nZe,tU)=>{"use strict";var DS=J("fs"),pfe=eU();function dfe(r){let t=Buffer.alloc(150),i;try{i=DS.openSync(r,"r"),DS.readSync(i,t,0,150,0),DS.closeSync(i)}catch{}return pfe(t.toString())}tU.exports=dfe});var oU=w((sZe,sU)=>{"use strict";var Cfe=J("path"),iU=VK(),nU=XK(),mfe=rU(),Efe=process.platform==="win32",Ife=/\.(?:com|exe)$/i,yfe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function wfe(r){r.file=iU(r);let e=r.file&&mfe(r.file);return e?(r.args.unshift(r.file),r.command=e,iU(r)):r.file}function Bfe(r){if(!Efe)return r;let e=wfe(r),t=!Ife.test(e);if(r.options.forceShell||t){let i=yfe.test(e);r.command=Cfe.normalize(r.command),r.command=nU.command(r.command),r.args=r.args.map(s=>nU.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function bfe(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:Bfe(i)}sU.exports=bfe});var lU=w((oZe,AU)=>{"use strict";var kS=process.platform==="win32";function RS(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function Qfe(r,e){if(!kS)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=aU(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function aU(r,e){return kS&&r===1&&!e.file?RS(e.original,"spawn"):null}function Sfe(r,e){return kS&&r===1&&!e.file?RS(e.original,"spawnSync"):null}AU.exports={hookChildProcess:Qfe,verifyENOENT:aU,verifyENOENTSync:Sfe,notFoundError:RS}});var TS=w((aZe,kg)=>{"use strict";var cU=J("child_process"),FS=oU(),NS=lU();function uU(r,e,t){let i=FS(r,e,t),n=cU.spawn(i.command,i.args,i.options);return NS.hookChildProcess(n,i),n}function vfe(r,e,t){let i=FS(r,e,t),n=cU.spawnSync(i.command,i.args,i.options);return n.error=n.error||NS.verifyENOENTSync(n.status,i),n}kg.exports=uU;kg.exports.spawn=uU;kg.exports.sync=vfe;kg.exports._parse=FS;kg.exports._enoent=NS});var fU=w((AZe,gU)=>{"use strict";function xfe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Zl(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Zl)}xfe(Zl,Error);Zl.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",ie=me(">>",!1),de=">&",_e=me(">&",!1),Pt=">",It=me(">",!1),Or="<<<",ii=me("<<<",!1),gi="<&",hr=me("<&",!1),fi="<",ni=me("<",!1),Ks=function(m){return{type:"argument",segments:[].concat(...m)}},pr=function(m){return m},Ii="$'",rs=me("$'",!1),fa="'",dA=me("'",!1),cg=function(m){return[{type:"text",text:m}]},is='""',CA=me('""',!1),ha=function(){return{type:"text",text:""}},wp='"',mA=me('"',!1),EA=function(m){return m},wr=function(m){return{type:"arithmetic",arithmetic:m,quoted:!0}},Tl=function(m){return{type:"shell",shell:m,quoted:!0}},ug=function(m){return{type:"variable",...m,quoted:!0}},yo=function(m){return{type:"text",text:m}},gg=function(m){return{type:"arithmetic",arithmetic:m,quoted:!1}},Bp=function(m){return{type:"shell",shell:m,quoted:!1}},bp=function(m){return{type:"variable",...m,quoted:!1}},vr=function(m){return{type:"glob",pattern:m}},se=/^[^']/,wo=Je(["'"],!0,!1),Fn=function(m){return m.join("")},fg=/^[^$"]/,bt=Je(["$",'"'],!0,!1),Ll=`\\ +`,Nn=me(`\\ +`,!1),ns=function(){return""},ss="\\",gt=me("\\",!1),Bo=/^[\\$"`]/,At=Je(["\\","$",'"',"`"],!1,!1),ln=function(m){return m},S="\\a",Lt=me("\\a",!1),hg=function(){return"a"},Ol="\\b",Qp=me("\\b",!1),Sp=function(){return"\b"},vp=/^[Ee]/,xp=Je(["E","e"],!1,!1),Pp=function(){return"\x1B"},G="\\f",yt=me("\\f",!1),IA=function(){return"\f"},zi="\\n",Ml=me("\\n",!1),Xe=function(){return` +`},pa="\\r",pg=me("\\r",!1),OE=function(){return"\r"},Dp="\\t",ME=me("\\t",!1),ar=function(){return" "},Tn="\\v",Kl=me("\\v",!1),kp=function(){return"\v"},Us=/^[\\'"?]/,da=Je(["\\","'",'"',"?"],!1,!1),cn=function(m){return String.fromCharCode(parseInt(m,16))},Le="\\x",dg=me("\\x",!1),Ul="\\u",Hs=me("\\u",!1),Hl="\\U",yA=me("\\U",!1),Cg=function(m){return String.fromCodePoint(parseInt(m,16))},mg=/^[0-7]/,Ca=Je([["0","7"]],!1,!1),ma=/^[0-9a-fA-f]/,rt=Je([["0","9"],["a","f"],["A","f"]],!1,!1),bo=nt(),wA="-",Gl=me("-",!1),Gs="+",Yl=me("+",!1),KE=".",Rp=me(".",!1),Eg=function(m,Q,N){return{type:"number",value:(m==="-"?-1:1)*parseFloat(Q.join("")+"."+N.join(""))}},Fp=function(m,Q){return{type:"number",value:(m==="-"?-1:1)*parseInt(Q.join(""))}},UE=function(m){return{type:"variable",...m}},jl=function(m){return{type:"variable",name:m}},HE=function(m){return m},Ig="*",BA=me("*",!1),Rr="/",GE=me("/",!1),Ys=function(m,Q,N){return{type:Q==="*"?"multiplication":"division",right:N}},js=function(m,Q){return Q.reduce((N,U)=>({left:N,...U}),m)},yg=function(m,Q,N){return{type:Q==="+"?"addition":"subtraction",right:N}},bA="$((",R=me("$((",!1),q="))",Ce=me("))",!1),Ke=function(m){return m},Re="$(",ze=me("$(",!1),dt=function(m){return m},Ft="${",Ln=me("${",!1),JQ=":-",k1=me(":-",!1),R1=function(m,Q){return{name:m,defaultValue:Q}},WQ=":-}",F1=me(":-}",!1),N1=function(m){return{name:m,defaultValue:[]}},zQ=":+",T1=me(":+",!1),L1=function(m,Q){return{name:m,alternativeValue:Q}},VQ=":+}",O1=me(":+}",!1),M1=function(m){return{name:m,alternativeValue:[]}},XQ=function(m){return{name:m}},K1="$",U1=me("$",!1),H1=function(m){return e.isGlobPattern(m)},G1=function(m){return m},ZQ=/^[a-zA-Z0-9_]/,_Q=Je([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),$Q=function(){return L()},eS=/^[$@*?#a-zA-Z0-9_\-]/,tS=Je(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),Y1=/^[(){}<>$|&; \t"']/,wg=Je(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),rS=/^[<>&; \t"']/,iS=Je(["<",">","&",";"," "," ",'"',"'"],!1,!1),YE=/^[ \t]/,jE=Je([" "," "],!1,!1),b=0,Me=0,QA=[{line:1,column:1}],d=0,E=[],I=0,k;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function L(){return r.substring(Me,b)}function Z(){return Et(Me,b)}function te(m,Q){throw Q=Q!==void 0?Q:Et(Me,b),Ri([lt(m)],r.substring(Me,b),Q)}function we(m,Q){throw Q=Q!==void 0?Q:Et(Me,b),On(m,Q)}function me(m,Q){return{type:"literal",text:m,ignoreCase:Q}}function Je(m,Q,N){return{type:"class",parts:m,inverted:Q,ignoreCase:N}}function nt(){return{type:"any"}}function wt(){return{type:"end"}}function lt(m){return{type:"other",description:m}}function it(m){var Q=QA[m],N;if(Q)return Q;for(N=m-1;!QA[N];)N--;for(Q=QA[N],Q={line:Q.line,column:Q.column};Nd&&(d=b,E=[]),E.push(m))}function On(m,Q){return new Zl(m,null,null,Q)}function Ri(m,Q,N){return new Zl(Zl.buildMessage(m,Q),m,Q,N)}function SA(){var m,Q;return m=b,Q=Mr(),Q===t&&(Q=null),Q!==t&&(Me=m,Q=s(Q)),m=Q,m}function Mr(){var m,Q,N,U,ce;if(m=b,Q=Kr(),Q!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();N!==t?(U=Ea(),U!==t?(ce=os(),ce===t&&(ce=null),ce!==t?(Me=m,Q=o(Q,U,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;if(m===t)if(m=b,Q=Kr(),Q!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();N!==t?(U=Ea(),U===t&&(U=null),U!==t?(Me=m,Q=a(Q,U),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;return m}function os(){var m,Q,N,U,ce;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t)if(N=Mr(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,Q=l(N),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;return m}function Ea(){var m;return r.charCodeAt(b)===59?(m=c,b++):(m=t,I===0&&be(u)),m===t&&(r.charCodeAt(b)===38?(m=g,b++):(m=t,I===0&&be(f))),m}function Kr(){var m,Q,N;return m=b,Q=j1(),Q!==t?(N=fge(),N===t&&(N=null),N!==t?(Me=m,Q=h(Q,N),m=Q):(b=m,m=t)):(b=m,m=t),m}function fge(){var m,Q,N,U,ce,Se,ht;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t)if(N=hge(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Kr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,Q=p(N,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;return m}function hge(){var m;return r.substr(b,2)===C?(m=C,b+=2):(m=t,I===0&&be(y)),m===t&&(r.substr(b,2)===B?(m=B,b+=2):(m=t,I===0&&be(v))),m}function j1(){var m,Q,N;return m=b,Q=Cge(),Q!==t?(N=pge(),N===t&&(N=null),N!==t?(Me=m,Q=D(Q,N),m=Q):(b=m,m=t)):(b=m,m=t),m}function pge(){var m,Q,N,U,ce,Se,ht;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t)if(N=dge(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=j1(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,Q=T(N,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;return m}function dge(){var m;return r.substr(b,2)===H?(m=H,b+=2):(m=t,I===0&&be(j)),m===t&&(r.charCodeAt(b)===124?(m=$,b++):(m=t,I===0&&be(V))),m}function qE(){var m,Q,N,U,ce,Se;if(m=b,Q=rK(),Q!==t)if(r.charCodeAt(b)===61?(N=W,b++):(N=t,I===0&&be(_)),N!==t)if(U=W1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(Me=m,Q=A(Q,U),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;else b=m,m=t;if(m===t)if(m=b,Q=rK(),Q!==t)if(r.charCodeAt(b)===61?(N=W,b++):(N=t,I===0&&be(_)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,Q=Ae(Q),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;return m}function Cge(){var m,Q,N,U,ce,Se,ht,Bt,qr,hi,as;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t)if(r.charCodeAt(b)===40?(N=ge,b++):(N=t,I===0&&be(re)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Mr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();if(Se!==t)if(r.charCodeAt(b)===41?(ht=O,b++):(ht=t,I===0&&be(F)),ht!==t){for(Bt=[],qr=He();qr!==t;)Bt.push(qr),qr=He();if(Bt!==t){for(qr=[],hi=Np();hi!==t;)qr.push(hi),hi=Np();if(qr!==t){for(hi=[],as=He();as!==t;)hi.push(as),as=He();hi!==t?(Me=m,Q=ue(ce,qr),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;if(m===t){for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t)if(r.charCodeAt(b)===123?(N=pe,b++):(N=t,I===0&&be(ke)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Mr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();if(Se!==t)if(r.charCodeAt(b)===125?(ht=Fe,b++):(ht=t,I===0&&be(Ne)),ht!==t){for(Bt=[],qr=He();qr!==t;)Bt.push(qr),qr=He();if(Bt!==t){for(qr=[],hi=Np();hi!==t;)qr.push(hi),hi=Np();if(qr!==t){for(hi=[],as=He();as!==t;)hi.push(as),as=He();hi!==t?(Me=m,Q=oe(ce,qr),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;if(m===t){for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t){for(N=[],U=qE();U!==t;)N.push(U),U=qE();if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t){if(ce=[],Se=J1(),Se!==t)for(;Se!==t;)ce.push(Se),Se=J1();else ce=t;if(ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,Q=le(N,ce),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t}else b=m,m=t;if(m===t){for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t){if(N=[],U=qE(),U!==t)for(;U!==t;)N.push(U),U=qE();else N=t;if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,Q=Be(N),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}}}return m}function q1(){var m,Q,N,U,ce;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t){if(N=[],U=JE(),U!==t)for(;U!==t;)N.push(U),U=JE();else N=t;if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,Q=fe(N),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t;return m}function J1(){var m,Q,N;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t?(N=Np(),N!==t?(Me=m,Q=ae(N),m=Q):(b=m,m=t)):(b=m,m=t),m===t){for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();Q!==t?(N=JE(),N!==t?(Me=m,Q=ae(N),m=Q):(b=m,m=t)):(b=m,m=t)}return m}function Np(){var m,Q,N,U,ce;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();return Q!==t?(qe.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(ne)),N===t&&(N=null),N!==t?(U=mge(),U!==t?(ce=JE(),ce!==t?(Me=m,Q=Y(N,U,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function mge(){var m;return r.substr(b,2)===he?(m=he,b+=2):(m=t,I===0&&be(ie)),m===t&&(r.substr(b,2)===de?(m=de,b+=2):(m=t,I===0&&be(_e)),m===t&&(r.charCodeAt(b)===62?(m=Pt,b++):(m=t,I===0&&be(It)),m===t&&(r.substr(b,3)===Or?(m=Or,b+=3):(m=t,I===0&&be(ii)),m===t&&(r.substr(b,2)===gi?(m=gi,b+=2):(m=t,I===0&&be(hr)),m===t&&(r.charCodeAt(b)===60?(m=fi,b++):(m=t,I===0&&be(ni))))))),m}function JE(){var m,Q,N;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();return Q!==t?(N=W1(),N!==t?(Me=m,Q=ae(N),m=Q):(b=m,m=t)):(b=m,m=t),m}function W1(){var m,Q,N;if(m=b,Q=[],N=z1(),N!==t)for(;N!==t;)Q.push(N),N=z1();else Q=t;return Q!==t&&(Me=m,Q=Ks(Q)),m=Q,m}function z1(){var m,Q;return m=b,Q=Ege(),Q!==t&&(Me=m,Q=pr(Q)),m=Q,m===t&&(m=b,Q=Ige(),Q!==t&&(Me=m,Q=pr(Q)),m=Q,m===t&&(m=b,Q=yge(),Q!==t&&(Me=m,Q=pr(Q)),m=Q,m===t&&(m=b,Q=wge(),Q!==t&&(Me=m,Q=pr(Q)),m=Q))),m}function Ege(){var m,Q,N,U;return m=b,r.substr(b,2)===Ii?(Q=Ii,b+=2):(Q=t,I===0&&be(rs)),Q!==t?(N=Qge(),N!==t?(r.charCodeAt(b)===39?(U=fa,b++):(U=t,I===0&&be(dA)),U!==t?(Me=m,Q=cg(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function Ige(){var m,Q,N,U;return m=b,r.charCodeAt(b)===39?(Q=fa,b++):(Q=t,I===0&&be(dA)),Q!==t?(N=Bge(),N!==t?(r.charCodeAt(b)===39?(U=fa,b++):(U=t,I===0&&be(dA)),U!==t?(Me=m,Q=cg(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function yge(){var m,Q,N,U;if(m=b,r.substr(b,2)===is?(Q=is,b+=2):(Q=t,I===0&&be(CA)),Q!==t&&(Me=m,Q=ha()),m=Q,m===t)if(m=b,r.charCodeAt(b)===34?(Q=wp,b++):(Q=t,I===0&&be(mA)),Q!==t){for(N=[],U=V1();U!==t;)N.push(U),U=V1();N!==t?(r.charCodeAt(b)===34?(U=wp,b++):(U=t,I===0&&be(mA)),U!==t?(Me=m,Q=EA(N),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;return m}function wge(){var m,Q,N;if(m=b,Q=[],N=X1(),N!==t)for(;N!==t;)Q.push(N),N=X1();else Q=t;return Q!==t&&(Me=m,Q=EA(Q)),m=Q,m}function V1(){var m,Q;return m=b,Q=eK(),Q!==t&&(Me=m,Q=wr(Q)),m=Q,m===t&&(m=b,Q=tK(),Q!==t&&(Me=m,Q=Tl(Q)),m=Q,m===t&&(m=b,Q=aS(),Q!==t&&(Me=m,Q=ug(Q)),m=Q,m===t&&(m=b,Q=bge(),Q!==t&&(Me=m,Q=yo(Q)),m=Q))),m}function X1(){var m,Q;return m=b,Q=eK(),Q!==t&&(Me=m,Q=gg(Q)),m=Q,m===t&&(m=b,Q=tK(),Q!==t&&(Me=m,Q=Bp(Q)),m=Q,m===t&&(m=b,Q=aS(),Q!==t&&(Me=m,Q=bp(Q)),m=Q,m===t&&(m=b,Q=xge(),Q!==t&&(Me=m,Q=vr(Q)),m=Q,m===t&&(m=b,Q=vge(),Q!==t&&(Me=m,Q=yo(Q)),m=Q)))),m}function Bge(){var m,Q,N;for(m=b,Q=[],se.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(wo));N!==t;)Q.push(N),se.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(wo));return Q!==t&&(Me=m,Q=Fn(Q)),m=Q,m}function bge(){var m,Q,N;if(m=b,Q=[],N=Z1(),N===t&&(fg.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(bt))),N!==t)for(;N!==t;)Q.push(N),N=Z1(),N===t&&(fg.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(bt)));else Q=t;return Q!==t&&(Me=m,Q=Fn(Q)),m=Q,m}function Z1(){var m,Q,N;return m=b,r.substr(b,2)===Ll?(Q=Ll,b+=2):(Q=t,I===0&&be(Nn)),Q!==t&&(Me=m,Q=ns()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=ss,b++):(Q=t,I===0&&be(gt)),Q!==t?(Bo.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(At)),N!==t?(Me=m,Q=ln(N),m=Q):(b=m,m=t)):(b=m,m=t)),m}function Qge(){var m,Q,N;for(m=b,Q=[],N=_1(),N===t&&(se.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(wo)));N!==t;)Q.push(N),N=_1(),N===t&&(se.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(wo)));return Q!==t&&(Me=m,Q=Fn(Q)),m=Q,m}function _1(){var m,Q,N;return m=b,r.substr(b,2)===S?(Q=S,b+=2):(Q=t,I===0&&be(Lt)),Q!==t&&(Me=m,Q=hg()),m=Q,m===t&&(m=b,r.substr(b,2)===Ol?(Q=Ol,b+=2):(Q=t,I===0&&be(Qp)),Q!==t&&(Me=m,Q=Sp()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=ss,b++):(Q=t,I===0&&be(gt)),Q!==t?(vp.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(xp)),N!==t?(Me=m,Q=Pp(),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===G?(Q=G,b+=2):(Q=t,I===0&&be(yt)),Q!==t&&(Me=m,Q=IA()),m=Q,m===t&&(m=b,r.substr(b,2)===zi?(Q=zi,b+=2):(Q=t,I===0&&be(Ml)),Q!==t&&(Me=m,Q=Xe()),m=Q,m===t&&(m=b,r.substr(b,2)===pa?(Q=pa,b+=2):(Q=t,I===0&&be(pg)),Q!==t&&(Me=m,Q=OE()),m=Q,m===t&&(m=b,r.substr(b,2)===Dp?(Q=Dp,b+=2):(Q=t,I===0&&be(ME)),Q!==t&&(Me=m,Q=ar()),m=Q,m===t&&(m=b,r.substr(b,2)===Tn?(Q=Tn,b+=2):(Q=t,I===0&&be(Kl)),Q!==t&&(Me=m,Q=kp()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=ss,b++):(Q=t,I===0&&be(gt)),Q!==t?(Us.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(da)),N!==t?(Me=m,Q=ln(N),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=Sge()))))))))),m}function Sge(){var m,Q,N,U,ce,Se,ht,Bt,qr,hi,as,AS;return m=b,r.charCodeAt(b)===92?(Q=ss,b++):(Q=t,I===0&&be(gt)),Q!==t?(N=nS(),N!==t?(Me=m,Q=cn(N),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Le?(Q=Le,b+=2):(Q=t,I===0&&be(dg)),Q!==t?(N=b,U=b,ce=nS(),ce!==t?(Se=Mn(),Se!==t?(ce=[ce,Se],U=ce):(b=U,U=t)):(b=U,U=t),U===t&&(U=nS()),U!==t?N=r.substring(N,b):N=U,N!==t?(Me=m,Q=cn(N),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ul?(Q=Ul,b+=2):(Q=t,I===0&&be(Hs)),Q!==t?(N=b,U=b,ce=Mn(),ce!==t?(Se=Mn(),Se!==t?(ht=Mn(),ht!==t?(Bt=Mn(),Bt!==t?(ce=[ce,Se,ht,Bt],U=ce):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t),U!==t?N=r.substring(N,b):N=U,N!==t?(Me=m,Q=cn(N),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Hl?(Q=Hl,b+=2):(Q=t,I===0&&be(yA)),Q!==t?(N=b,U=b,ce=Mn(),ce!==t?(Se=Mn(),Se!==t?(ht=Mn(),ht!==t?(Bt=Mn(),Bt!==t?(qr=Mn(),qr!==t?(hi=Mn(),hi!==t?(as=Mn(),as!==t?(AS=Mn(),AS!==t?(ce=[ce,Se,ht,Bt,qr,hi,as,AS],U=ce):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t),U!==t?N=r.substring(N,b):N=U,N!==t?(Me=m,Q=Cg(N),m=Q):(b=m,m=t)):(b=m,m=t)))),m}function nS(){var m;return mg.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&be(Ca)),m}function Mn(){var m;return ma.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&be(rt)),m}function vge(){var m,Q,N,U,ce;if(m=b,Q=[],N=b,r.charCodeAt(b)===92?(U=ss,b++):(U=t,I===0&&be(gt)),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(bo)),ce!==t?(Me=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t),N===t&&(N=b,U=b,I++,ce=iK(),I--,ce===t?U=void 0:(b=U,U=t),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(bo)),ce!==t?(Me=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t)),N!==t)for(;N!==t;)Q.push(N),N=b,r.charCodeAt(b)===92?(U=ss,b++):(U=t,I===0&&be(gt)),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(bo)),ce!==t?(Me=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t),N===t&&(N=b,U=b,I++,ce=iK(),I--,ce===t?U=void 0:(b=U,U=t),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(bo)),ce!==t?(Me=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t));else Q=t;return Q!==t&&(Me=m,Q=Fn(Q)),m=Q,m}function sS(){var m,Q,N,U,ce,Se;if(m=b,r.charCodeAt(b)===45?(Q=wA,b++):(Q=t,I===0&&be(Gl)),Q===t&&(r.charCodeAt(b)===43?(Q=Gs,b++):(Q=t,I===0&&be(Yl))),Q===t&&(Q=null),Q!==t){if(N=[],qe.test(r.charAt(b))?(U=r.charAt(b),b++):(U=t,I===0&&be(ne)),U!==t)for(;U!==t;)N.push(U),qe.test(r.charAt(b))?(U=r.charAt(b),b++):(U=t,I===0&&be(ne));else N=t;if(N!==t)if(r.charCodeAt(b)===46?(U=KE,b++):(U=t,I===0&&be(Rp)),U!==t){if(ce=[],qe.test(r.charAt(b))?(Se=r.charAt(b),b++):(Se=t,I===0&&be(ne)),Se!==t)for(;Se!==t;)ce.push(Se),qe.test(r.charAt(b))?(Se=r.charAt(b),b++):(Se=t,I===0&&be(ne));else ce=t;ce!==t?(Me=m,Q=Eg(Q,N,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;if(m===t){if(m=b,r.charCodeAt(b)===45?(Q=wA,b++):(Q=t,I===0&&be(Gl)),Q===t&&(r.charCodeAt(b)===43?(Q=Gs,b++):(Q=t,I===0&&be(Yl))),Q===t&&(Q=null),Q!==t){if(N=[],qe.test(r.charAt(b))?(U=r.charAt(b),b++):(U=t,I===0&&be(ne)),U!==t)for(;U!==t;)N.push(U),qe.test(r.charAt(b))?(U=r.charAt(b),b++):(U=t,I===0&&be(ne));else N=t;N!==t?(Me=m,Q=Fp(Q,N),m=Q):(b=m,m=t)}else b=m,m=t;if(m===t&&(m=b,Q=aS(),Q!==t&&(Me=m,Q=UE(Q)),m=Q,m===t&&(m=b,Q=ql(),Q!==t&&(Me=m,Q=jl(Q)),m=Q,m===t)))if(m=b,r.charCodeAt(b)===40?(Q=ge,b++):(Q=t,I===0&&be(re)),Q!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();if(N!==t)if(U=$1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(r.charCodeAt(b)===41?(Se=O,b++):(Se=t,I===0&&be(F)),Se!==t?(Me=m,Q=HE(U),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t}return m}function oS(){var m,Q,N,U,ce,Se,ht,Bt;if(m=b,Q=sS(),Q!==t){for(N=[],U=b,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(b)===42?(Se=Ig,b++):(Se=t,I===0&&be(BA)),Se===t&&(r.charCodeAt(b)===47?(Se=Rr,b++):(Se=t,I===0&&be(GE))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=sS(),Bt!==t?(Me=U,ce=Ys(Q,Se,Bt),U=ce):(b=U,U=t)):(b=U,U=t)}else b=U,U=t;else b=U,U=t;for(;U!==t;){for(N.push(U),U=b,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(b)===42?(Se=Ig,b++):(Se=t,I===0&&be(BA)),Se===t&&(r.charCodeAt(b)===47?(Se=Rr,b++):(Se=t,I===0&&be(GE))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=sS(),Bt!==t?(Me=U,ce=Ys(Q,Se,Bt),U=ce):(b=U,U=t)):(b=U,U=t)}else b=U,U=t;else b=U,U=t}N!==t?(Me=m,Q=js(Q,N),m=Q):(b=m,m=t)}else b=m,m=t;return m}function $1(){var m,Q,N,U,ce,Se,ht,Bt;if(m=b,Q=oS(),Q!==t){for(N=[],U=b,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(b)===43?(Se=Gs,b++):(Se=t,I===0&&be(Yl)),Se===t&&(r.charCodeAt(b)===45?(Se=wA,b++):(Se=t,I===0&&be(Gl))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=oS(),Bt!==t?(Me=U,ce=yg(Q,Se,Bt),U=ce):(b=U,U=t)):(b=U,U=t)}else b=U,U=t;else b=U,U=t;for(;U!==t;){for(N.push(U),U=b,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(b)===43?(Se=Gs,b++):(Se=t,I===0&&be(Yl)),Se===t&&(r.charCodeAt(b)===45?(Se=wA,b++):(Se=t,I===0&&be(Gl))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=oS(),Bt!==t?(Me=U,ce=yg(Q,Se,Bt),U=ce):(b=U,U=t)):(b=U,U=t)}else b=U,U=t;else b=U,U=t}N!==t?(Me=m,Q=js(Q,N),m=Q):(b=m,m=t)}else b=m,m=t;return m}function eK(){var m,Q,N,U,ce,Se;if(m=b,r.substr(b,3)===bA?(Q=bA,b+=3):(Q=t,I===0&&be(R)),Q!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();if(N!==t)if(U=$1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(r.substr(b,2)===q?(Se=q,b+=2):(Se=t,I===0&&be(Ce)),Se!==t?(Me=m,Q=Ke(U),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;return m}function tK(){var m,Q,N,U;return m=b,r.substr(b,2)===Re?(Q=Re,b+=2):(Q=t,I===0&&be(ze)),Q!==t?(N=Mr(),N!==t?(r.charCodeAt(b)===41?(U=O,b++):(U=t,I===0&&be(F)),U!==t?(Me=m,Q=dt(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function aS(){var m,Q,N,U,ce,Se;return m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&be(Ln)),Q!==t?(N=ql(),N!==t?(r.substr(b,2)===JQ?(U=JQ,b+=2):(U=t,I===0&&be(k1)),U!==t?(ce=q1(),ce!==t?(r.charCodeAt(b)===125?(Se=Fe,b++):(Se=t,I===0&&be(Ne)),Se!==t?(Me=m,Q=R1(N,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&be(Ln)),Q!==t?(N=ql(),N!==t?(r.substr(b,3)===WQ?(U=WQ,b+=3):(U=t,I===0&&be(F1)),U!==t?(Me=m,Q=N1(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&be(Ln)),Q!==t?(N=ql(),N!==t?(r.substr(b,2)===zQ?(U=zQ,b+=2):(U=t,I===0&&be(T1)),U!==t?(ce=q1(),ce!==t?(r.charCodeAt(b)===125?(Se=Fe,b++):(Se=t,I===0&&be(Ne)),Se!==t?(Me=m,Q=L1(N,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&be(Ln)),Q!==t?(N=ql(),N!==t?(r.substr(b,3)===VQ?(U=VQ,b+=3):(U=t,I===0&&be(O1)),U!==t?(Me=m,Q=M1(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&be(Ln)),Q!==t?(N=ql(),N!==t?(r.charCodeAt(b)===125?(U=Fe,b++):(U=t,I===0&&be(Ne)),U!==t?(Me=m,Q=XQ(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.charCodeAt(b)===36?(Q=K1,b++):(Q=t,I===0&&be(U1)),Q!==t?(N=ql(),N!==t?(Me=m,Q=XQ(N),m=Q):(b=m,m=t)):(b=m,m=t)))))),m}function xge(){var m,Q,N;return m=b,Q=Pge(),Q!==t?(Me=b,N=H1(Q),N?N=void 0:N=t,N!==t?(Me=m,Q=G1(Q),m=Q):(b=m,m=t)):(b=m,m=t),m}function Pge(){var m,Q,N,U,ce;if(m=b,Q=[],N=b,U=b,I++,ce=nK(),I--,ce===t?U=void 0:(b=U,U=t),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(bo)),ce!==t?(Me=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t),N!==t)for(;N!==t;)Q.push(N),N=b,U=b,I++,ce=nK(),I--,ce===t?U=void 0:(b=U,U=t),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(bo)),ce!==t?(Me=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t);else Q=t;return Q!==t&&(Me=m,Q=Fn(Q)),m=Q,m}function rK(){var m,Q,N;if(m=b,Q=[],ZQ.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(_Q)),N!==t)for(;N!==t;)Q.push(N),ZQ.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(_Q));else Q=t;return Q!==t&&(Me=m,Q=$Q()),m=Q,m}function ql(){var m,Q,N;if(m=b,Q=[],eS.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(tS)),N!==t)for(;N!==t;)Q.push(N),eS.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(tS));else Q=t;return Q!==t&&(Me=m,Q=$Q()),m=Q,m}function iK(){var m;return Y1.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&be(wg)),m}function nK(){var m;return rS.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&be(iS)),m}function He(){var m,Q;if(m=[],YE.test(r.charAt(b))?(Q=r.charAt(b),b++):(Q=t,I===0&&be(jE)),Q!==t)for(;Q!==t;)m.push(Q),YE.test(r.charAt(b))?(Q=r.charAt(b),b++):(Q=t,I===0&&be(jE));else m=t;return m}if(k=n(),k!==t&&b===r.length)return k;throw k!==t&&b{"use strict";function Dfe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function $l(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,$l)}Dfe($l,Error);$l.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=v,j=[]),j.push(ne))}function Ne(ne,Y){return new $l(ne,null,null,Y)}function oe(ne,Y,he){return new $l($l.buildMessage(ne,Y),ne,Y,he)}function le(){var ne,Y,he,ie;return ne=v,Y=Be(),Y!==t?(r.charCodeAt(v)===47?(he=s,v++):(he=t,$===0&&Fe(o)),he!==t?(ie=Be(),ie!==t?(D=ne,Y=a(Y,ie),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=Be(),Y!==t&&(D=ne,Y=l(Y)),ne=Y),ne}function Be(){var ne,Y,he,ie;return ne=v,Y=fe(),Y!==t?(r.charCodeAt(v)===64?(he=c,v++):(he=t,$===0&&Fe(u)),he!==t?(ie=qe(),ie!==t?(D=ne,Y=g(Y,ie),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=fe(),Y!==t&&(D=ne,Y=f(Y)),ne=Y),ne}function fe(){var ne,Y,he,ie,de;return ne=v,r.charCodeAt(v)===64?(Y=c,v++):(Y=t,$===0&&Fe(u)),Y!==t?(he=ae(),he!==t?(r.charCodeAt(v)===47?(ie=s,v++):(ie=t,$===0&&Fe(o)),ie!==t?(de=ae(),de!==t?(D=ne,Y=h(),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=ae(),Y!==t&&(D=ne,Y=h()),ne=Y),ne}function ae(){var ne,Y,he;if(ne=v,Y=[],p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Fe(C)),he!==t)for(;he!==t;)Y.push(he),p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Fe(C));else Y=t;return Y!==t&&(D=ne,Y=h()),ne=Y,ne}function qe(){var ne,Y,he;if(ne=v,Y=[],y.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Fe(B)),he!==t)for(;he!==t;)Y.push(he),y.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Fe(B));else Y=t;return Y!==t&&(D=ne,Y=h()),ne=Y,ne}if(V=n(),V!==t&&v===r.length)return V;throw V!==t&&v{"use strict";function mU(r){return typeof r>"u"||r===null}function Rfe(r){return typeof r=="object"&&r!==null}function Ffe(r){return Array.isArray(r)?r:mU(r)?[]:[r]}function Nfe(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function Vp(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Vp.prototype=Object.create(Error.prototype);Vp.prototype.constructor=Vp;Vp.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};EU.exports=Vp});var wU=w((SZe,yU)=>{"use strict";var IU=tc();function HS(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}HS.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r +\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>t/2-1){i=" ... ",n+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(n,o),IU.repeat(" ",e)+i+a+s+` +`+IU.repeat(" ",e+this.position-n+i.length)+"^"};HS.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(i+=`: +`+t)),i};yU.exports=HS});var si=w((vZe,bU)=>{"use strict";var BU=Ng(),Ofe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Mfe=["scalar","sequence","mapping"];function Kfe(r){var e={};return r!==null&&Object.keys(r).forEach(function(t){r[t].forEach(function(i){e[String(i)]=t})}),e}function Ufe(r,e){if(e=e||{},Object.keys(e).forEach(function(t){if(Ofe.indexOf(t)===-1)throw new BU('Unknown option "'+t+'" is met in definition of "'+r+'" YAML type.')}),this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=Kfe(e.styleAliases||null),Mfe.indexOf(this.kind)===-1)throw new BU('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}bU.exports=Ufe});var rc=w((xZe,SU)=>{"use strict";var QU=tc(),dI=Ng(),Hfe=si();function GS(r,e,t){var i=[];return r.include.forEach(function(n){t=GS(n,e,t)}),r[e].forEach(function(n){t.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),t.push(n)}),t.filter(function(n,s){return i.indexOf(s)===-1})}function Gfe(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},e,t;function i(n){r[n.kind][n.tag]=r.fallback[n.tag]=n}for(e=0,t=arguments.length;e{"use strict";var Yfe=si();vU.exports=new Yfe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})});var DU=w((DZe,PU)=>{"use strict";var jfe=si();PU.exports=new jfe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})});var RU=w((kZe,kU)=>{"use strict";var qfe=si();kU.exports=new qfe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})});var CI=w((RZe,FU)=>{"use strict";var Jfe=rc();FU.exports=new Jfe({explicit:[xU(),DU(),RU()]})});var TU=w((FZe,NU)=>{"use strict";var Wfe=si();function zfe(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}function Vfe(){return null}function Xfe(r){return r===null}NU.exports=new Wfe("tag:yaml.org,2002:null",{kind:"scalar",resolve:zfe,construct:Vfe,predicate:Xfe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var OU=w((NZe,LU)=>{"use strict";var Zfe=si();function _fe(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}function $fe(r){return r==="true"||r==="True"||r==="TRUE"}function ehe(r){return Object.prototype.toString.call(r)==="[object Boolean]"}LU.exports=new Zfe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:_fe,construct:$fe,predicate:ehe,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})});var KU=w((TZe,MU)=>{"use strict";var the=tc(),rhe=si();function ihe(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function nhe(r){return 48<=r&&r<=55}function she(r){return 48<=r&&r<=57}function ohe(r){if(r===null)return!1;var e=r.length,t=0,i=!1,n;if(!e)return!1;if(n=r[t],(n==="-"||n==="+")&&(n=r[++t]),n==="0"){if(t+1===e)return!0;if(n=r[++t],n==="b"){for(t++;t=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0"+r.toString(8):"-0"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var GU=w((LZe,HU)=>{"use strict";var UU=tc(),lhe=si(),che=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function uhe(r){return!(r===null||!che.test(r)||r[r.length-1]==="_")}function ghe(r){var e,t,i,n;return e=r.replace(/_/g,"").toLowerCase(),t=e[0]==="-"?-1:1,n=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(s){n.unshift(parseFloat(s,10))}),e=0,i=1,n.forEach(function(s){e+=s*i,i*=60}),t*e):t*parseFloat(e,10)}var fhe=/^[-+]?[0-9]+e/;function hhe(r,e){var t;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(UU.isNegativeZero(r))return"-0.0";return t=r.toString(10),fhe.test(t)?t.replace("e",".e"):t}function phe(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||UU.isNegativeZero(r))}HU.exports=new lhe("tag:yaml.org,2002:float",{kind:"scalar",resolve:uhe,construct:ghe,predicate:phe,represent:hhe,defaultStyle:"lowercase"})});var YS=w((OZe,YU)=>{"use strict";var dhe=rc();YU.exports=new dhe({include:[CI()],implicit:[TU(),OU(),KU(),GU()]})});var jS=w((MZe,jU)=>{"use strict";var Che=rc();jU.exports=new Che({include:[YS()]})});var zU=w((KZe,WU)=>{"use strict";var mhe=si(),qU=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),JU=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Ehe(r){return r===null?!1:qU.exec(r)!==null||JU.exec(r)!==null}function Ihe(r){var e,t,i,n,s,o,a,l=0,c=null,u,g,f;if(e=qU.exec(r),e===null&&(e=JU.exec(r)),e===null)throw new Error("Date resolve error");if(t=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(t,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],g=+(e[11]||0),c=(u*60+g)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(t,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function yhe(r){return r.toISOString()}WU.exports=new mhe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ehe,construct:Ihe,instanceOf:Date,represent:yhe})});var XU=w((UZe,VU)=>{"use strict";var whe=si();function Bhe(r){return r==="<<"||r===null}VU.exports=new whe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Bhe})});var $U=w((HZe,_U)=>{"use strict";var ic;try{ZU=J,ic=ZU("buffer").Buffer}catch{}var ZU,bhe=si(),qS=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function Qhe(r){if(r===null)return!1;var e,t,i=0,n=r.length,s=qS;for(t=0;t64)){if(e<0)return!1;i+=6}return i%8===0}function She(r){var e,t,i=r.replace(/[\r\n=]/g,""),n=i.length,s=qS,o=0,a=[];for(e=0;e>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return t=n%4*6,t===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):t===18?(a.push(o>>10&255),a.push(o>>2&255)):t===12&&a.push(o>>4&255),ic?ic.from?ic.from(a):new ic(a):a}function vhe(r){var e="",t=0,i,n,s=r.length,o=qS;for(i=0;i>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]),t=(t<<8)+r[i];return n=s%3,n===0?(e+=o[t>>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]):n===2?(e+=o[t>>10&63],e+=o[t>>4&63],e+=o[t<<2&63],e+=o[64]):n===1&&(e+=o[t>>2&63],e+=o[t<<4&63],e+=o[64],e+=o[64]),e}function xhe(r){return ic&&ic.isBuffer(r)}_U.exports=new bhe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Qhe,construct:She,predicate:xhe,represent:vhe})});var t2=w((YZe,e2)=>{"use strict";var Phe=si(),Dhe=Object.prototype.hasOwnProperty,khe=Object.prototype.toString;function Rhe(r){if(r===null)return!0;var e=[],t,i,n,s,o,a=r;for(t=0,i=a.length;t{"use strict";var Nhe=si(),The=Object.prototype.toString;function Lhe(r){if(r===null)return!0;var e,t,i,n,s,o=r;for(s=new Array(o.length),e=0,t=o.length;e{"use strict";var Mhe=si(),Khe=Object.prototype.hasOwnProperty;function Uhe(r){if(r===null)return!0;var e,t=r;for(e in t)if(Khe.call(t,e)&&t[e]!==null)return!1;return!0}function Hhe(r){return r!==null?r:{}}n2.exports=new Mhe("tag:yaml.org,2002:set",{kind:"mapping",resolve:Uhe,construct:Hhe})});var Lg=w((JZe,o2)=>{"use strict";var Ghe=rc();o2.exports=new Ghe({include:[jS()],implicit:[zU(),XU()],explicit:[$U(),t2(),i2(),s2()]})});var A2=w((WZe,a2)=>{"use strict";var Yhe=si();function jhe(){return!0}function qhe(){}function Jhe(){return""}function Whe(r){return typeof r>"u"}a2.exports=new Yhe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:jhe,construct:qhe,predicate:Whe,represent:Jhe})});var c2=w((zZe,l2)=>{"use strict";var zhe=si();function Vhe(r){if(r===null||r.length===0)return!1;var e=r,t=/\/([gim]*)$/.exec(r),i="";return!(e[0]==="/"&&(t&&(i=t[1]),i.length>3||e[e.length-i.length-1]!=="/"))}function Xhe(r){var e=r,t=/\/([gim]*)$/.exec(r),i="";return e[0]==="/"&&(t&&(i=t[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function Zhe(r){var e="/"+r.source+"/";return r.global&&(e+="g"),r.multiline&&(e+="m"),r.ignoreCase&&(e+="i"),e}function _he(r){return Object.prototype.toString.call(r)==="[object RegExp]"}l2.exports=new zhe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Vhe,construct:Xhe,predicate:_he,represent:Zhe})});var f2=w((VZe,g2)=>{"use strict";var mI;try{u2=J,mI=u2("esprima")}catch{typeof window<"u"&&(mI=window.esprima)}var u2,$he=si();function epe(r){if(r===null)return!1;try{var e="("+r+")",t=mI.parse(e,{range:!0});return!(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function tpe(r){var e="("+r+")",t=mI.parse(e,{range:!0}),i=[],n;if(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return t.body[0].expression.params.forEach(function(s){i.push(s.name)}),n=t.body[0].expression.body.range,t.body[0].expression.body.type==="BlockStatement"?new Function(i,e.slice(n[0]+1,n[1]-1)):new Function(i,"return "+e.slice(n[0],n[1]))}function rpe(r){return r.toString()}function ipe(r){return Object.prototype.toString.call(r)==="[object Function]"}g2.exports=new $he("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:epe,construct:tpe,predicate:ipe,represent:rpe})});var Xp=w((ZZe,p2)=>{"use strict";var h2=rc();p2.exports=h2.DEFAULT=new h2({include:[Lg()],explicit:[A2(),c2(),f2()]})});var N2=w((_Ze,Zp)=>{"use strict";var Ba=tc(),w2=Ng(),npe=wU(),B2=Lg(),spe=Xp(),kA=Object.prototype.hasOwnProperty,EI=1,b2=2,Q2=3,II=4,JS=1,ope=2,d2=3,ape=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ape=/[\x85\u2028\u2029]/,lpe=/[,\[\]\{\}]/,S2=/^(?:!|!!|![a-z\-]+!)$/i,v2=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function C2(r){return Object.prototype.toString.call(r)}function xo(r){return r===10||r===13}function sc(r){return r===9||r===32}function fn(r){return r===9||r===32||r===10||r===13}function Og(r){return r===44||r===91||r===93||r===123||r===125}function cpe(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}function upe(r){return r===120?2:r===117?4:r===85?8:0}function gpe(r){return 48<=r&&r<=57?r-48:-1}function m2(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?` +`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"\x85":r===95?"\xA0":r===76?"\u2028":r===80?"\u2029":""}function fpe(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var x2=new Array(256),P2=new Array(256);for(nc=0;nc<256;nc++)x2[nc]=m2(nc)?1:0,P2[nc]=m2(nc);var nc;function hpe(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||spe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function D2(r,e){return new w2(e,new npe(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function ft(r,e){throw D2(r,e)}function yI(r,e){r.onWarning&&r.onWarning.call(null,D2(r,e))}var E2={YAML:function(e,t,i){var n,s,o;e.version!==null&&ft(e,"duplication of %YAML directive"),i.length!==1&&ft(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&ft(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&ft(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&yI(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,s;i.length!==2&&ft(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],S2.test(n)||ft(e,"ill-formed tag handle (first argument) of the TAG directive"),kA.call(e.tagMap,n)&&ft(e,'there is a previously declared suffix for "'+n+'" tag handle'),v2.test(s)||ft(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function DA(r,e,t,i){var n,s,o,a;if(e1&&(r.result+=Ba.repeat(` +`,e-1))}function ppe(r,e,t){var i,n,s,o,a,l,c,u,g=r.kind,f=r.result,h;if(h=r.input.charCodeAt(r.position),fn(h)||Og(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=r.input.charCodeAt(r.position+1),fn(n)||t&&Og(n)))return!1;for(r.kind="scalar",r.result="",s=o=r.position,a=!1;h!==0;){if(h===58){if(n=r.input.charCodeAt(r.position+1),fn(n)||t&&Og(n))break}else if(h===35){if(i=r.input.charCodeAt(r.position-1),fn(i))break}else{if(r.position===r.lineStart&&wI(r)||t&&Og(h))break;if(xo(h))if(l=r.line,c=r.lineStart,u=r.lineIndent,zr(r,!1,-1),r.lineIndent>=e){a=!0,h=r.input.charCodeAt(r.position);continue}else{r.position=o,r.line=l,r.lineStart=c,r.lineIndent=u;break}}a&&(DA(r,s,o,!1),zS(r,r.line-l),s=o=r.position,a=!1),sc(h)||(o=r.position+1),h=r.input.charCodeAt(++r.position)}return DA(r,s,o,!1),r.result?!0:(r.kind=g,r.result=f,!1)}function dpe(r,e){var t,i,n;if(t=r.input.charCodeAt(r.position),t!==39)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(t=r.input.charCodeAt(r.position))!==0;)if(t===39)if(DA(r,i,r.position,!0),t=r.input.charCodeAt(++r.position),t===39)i=r.position,r.position++,n=r.position;else return!0;else xo(t)?(DA(r,i,n,!0),zS(r,zr(r,!1,e)),i=n=r.position):r.position===r.lineStart&&wI(r)?ft(r,"unexpected end of the document within a single quoted scalar"):(r.position++,n=r.position);ft(r,"unexpected end of the stream within a single quoted scalar")}function Cpe(r,e){var t,i,n,s,o,a;if(a=r.input.charCodeAt(r.position),a!==34)return!1;for(r.kind="scalar",r.result="",r.position++,t=i=r.position;(a=r.input.charCodeAt(r.position))!==0;){if(a===34)return DA(r,t,r.position,!0),r.position++,!0;if(a===92){if(DA(r,t,r.position,!0),a=r.input.charCodeAt(++r.position),xo(a))zr(r,!1,e);else if(a<256&&x2[a])r.result+=P2[a],r.position++;else if((o=upe(a))>0){for(n=o,s=0;n>0;n--)a=r.input.charCodeAt(++r.position),(o=cpe(a))>=0?s=(s<<4)+o:ft(r,"expected hexadecimal character");r.result+=fpe(s),r.position++}else ft(r,"unknown escape sequence");t=i=r.position}else xo(a)?(DA(r,t,i,!0),zS(r,zr(r,!1,e)),t=i=r.position):r.position===r.lineStart&&wI(r)?ft(r,"unexpected end of the document within a double quoted scalar"):(r.position++,i=r.position)}ft(r,"unexpected end of the stream within a double quoted scalar")}function mpe(r,e){var t=!0,i,n=r.tag,s,o=r.anchor,a,l,c,u,g,f={},h,p,C,y;if(y=r.input.charCodeAt(r.position),y===91)l=93,g=!1,s=[];else if(y===123)l=125,g=!0,s={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),y=r.input.charCodeAt(++r.position);y!==0;){if(zr(r,!0,e),y=r.input.charCodeAt(r.position),y===l)return r.position++,r.tag=n,r.anchor=o,r.kind=g?"mapping":"sequence",r.result=s,!0;t||ft(r,"missed comma between flow collection entries"),p=h=C=null,c=u=!1,y===63&&(a=r.input.charCodeAt(r.position+1),fn(a)&&(c=u=!0,r.position++,zr(r,!0,e))),i=r.line,Kg(r,e,EI,!1,!0),p=r.tag,h=r.result,zr(r,!0,e),y=r.input.charCodeAt(r.position),(u||r.line===i)&&y===58&&(c=!0,y=r.input.charCodeAt(++r.position),zr(r,!0,e),Kg(r,e,EI,!1,!0),C=r.result),g?Mg(r,s,f,p,h,C):c?s.push(Mg(r,null,f,p,h,C)):s.push(h),zr(r,!0,e),y=r.input.charCodeAt(r.position),y===44?(t=!0,y=r.input.charCodeAt(++r.position)):t=!1}ft(r,"unexpected end of the stream within a flow collection")}function Epe(r,e){var t,i,n=JS,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=r.input.charCodeAt(r.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)JS===n?n=g===43?d2:ope:ft(r,"repeat of a chomping mode identifier");else if((u=gpe(g))>=0)u===0?ft(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?ft(r,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(sc(g)){do g=r.input.charCodeAt(++r.position);while(sc(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!xo(g)&&g!==0)}for(;g!==0;){for(WS(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!o||r.lineIndenta&&(a=r.lineIndent),xo(g)){l++;continue}if(r.lineIndente)&&l!==0)ft(r,"bad indentation of a sequence entry");else if(r.lineIndente)&&(Kg(r,e,II,!0,n)&&(p?f=r.result:h=r.result),p||(Mg(r,c,u,g,f,h,s,o),g=f=h=null),zr(r,!0,-1),y=r.input.charCodeAt(r.position)),r.lineIndent>e&&y!==0)ft(r,"bad indentation of a mapping entry");else if(r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndent tag; it should be "scalar", not "'+r.kind+'"'),g=0,f=r.implicitTypes.length;g tag; it should be "'+h.kind+'", not "'+r.kind+'"'),h.resolve(r.result)?(r.result=h.construct(r.result),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):ft(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")):ft(r,"unknown tag !<"+r.tag+">");return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||u}function bpe(r){var e=r.position,t,i,n,s=!1,o;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap={},r.anchorMap={};(o=r.input.charCodeAt(r.position))!==0&&(zr(r,!0,-1),o=r.input.charCodeAt(r.position),!(r.lineIndent>0||o!==37));){for(s=!0,o=r.input.charCodeAt(++r.position),t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);for(i=r.input.slice(t,r.position),n=[],i.length<1&&ft(r,"directive name must not be less than one character in length");o!==0;){for(;sc(o);)o=r.input.charCodeAt(++r.position);if(o===35){do o=r.input.charCodeAt(++r.position);while(o!==0&&!xo(o));break}if(xo(o))break;for(t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);n.push(r.input.slice(t,r.position))}o!==0&&WS(r),kA.call(E2,i)?E2[i](r,i,n):yI(r,'unknown document directive "'+i+'"')}if(zr(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,zr(r,!0,-1)):s&&ft(r,"directives end mark is expected"),Kg(r,r.lineIndent-1,II,!1,!0),zr(r,!0,-1),r.checkLineBreaks&&Ape.test(r.input.slice(e,r.position))&&yI(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&wI(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,zr(r,!0,-1));return}if(r.position"u"&&(t=e,e=null);var i=k2(r,t);if(typeof e!="function")return i;for(var n=0,s=i.length;n"u"&&(t=e,e=null),R2(r,e,Ba.extend({schema:B2},t))}function Spe(r,e){return F2(r,Ba.extend({schema:B2},e))}Zp.exports.loadAll=R2;Zp.exports.load=F2;Zp.exports.safeLoadAll=Qpe;Zp.exports.safeLoad=Spe});var iH=w(($Ze,_S)=>{"use strict";var $p=tc(),ed=Ng(),vpe=Xp(),xpe=Lg(),G2=Object.prototype.toString,Y2=Object.prototype.hasOwnProperty,Ppe=9,_p=10,Dpe=13,kpe=32,Rpe=33,Fpe=34,j2=35,Npe=37,Tpe=38,Lpe=39,Ope=42,q2=44,Mpe=45,J2=58,Kpe=61,Upe=62,Hpe=63,Gpe=64,W2=91,z2=93,Ype=96,V2=123,jpe=124,X2=125,Ni={};Ni[0]="\\0";Ni[7]="\\a";Ni[8]="\\b";Ni[9]="\\t";Ni[10]="\\n";Ni[11]="\\v";Ni[12]="\\f";Ni[13]="\\r";Ni[27]="\\e";Ni[34]='\\"';Ni[92]="\\\\";Ni[133]="\\N";Ni[160]="\\_";Ni[8232]="\\L";Ni[8233]="\\P";var qpe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Jpe(r,e){var t,i,n,s,o,a,l;if(e===null)return{};for(t={},i=Object.keys(e),n=0,s=i.length;n0?r.charCodeAt(s-1):null,f=f&&O2(o,a)}else{for(s=0;si&&r[g+1]!==" ",g=s);else if(!Ug(o))return BI;a=s>0?r.charCodeAt(s-1):null,f=f&&O2(o,a)}c=c||u&&s-g-1>i&&r[g+1]!==" "}return!l&&!c?f&&!n(r)?_2:$2:t>9&&Z2(r)?BI:c?tH:eH}function _pe(r,e,t,i){r.dump=function(){if(e.length===0)return"''";if(!r.noCompatMode&&qpe.indexOf(e)!==-1)return"'"+e+"'";var n=r.indent*Math.max(1,t),s=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-n),o=i||r.flowLevel>-1&&t>=r.flowLevel;function a(l){return zpe(r,l)}switch(Zpe(e,o,r.indent,s,a)){case _2:return e;case $2:return"'"+e.replace(/'/g,"''")+"'";case eH:return"|"+M2(e,r.indent)+K2(L2(e,n));case tH:return">"+M2(e,r.indent)+K2(L2($pe(e,s),n));case BI:return'"'+ede(e,s)+'"';default:throw new ed("impossible error: invalid scalar style")}}()}function M2(r,e){var t=Z2(r)?String(e):"",i=r[r.length-1]===` +`,n=i&&(r[r.length-2]===` +`||r===` +`),s=n?"+":i?"":"-";return t+s+` +`}function K2(r){return r[r.length-1]===` +`?r.slice(0,-1):r}function $pe(r,e){for(var t=/(\n+)([^\n]*)/g,i=function(){var c=r.indexOf(` +`);return c=c!==-1?c:r.length,t.lastIndex=c,U2(r.slice(0,c),e)}(),n=r[0]===` +`||r[0]===" ",s,o;o=t.exec(r);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?` +`:"")+U2(l,e),n=s}return i}function U2(r,e){if(r===""||r[0]===" ")return r;for(var t=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=t.exec(r);)a=i.index,a-n>e&&(s=o>n?o:a,l+=` +`+r.slice(n,s),n=s+1),o=a;return l+=` +`,r.length-n>e&&o>n?l+=r.slice(n,o)+` +`+r.slice(o+1):l+=r.slice(n),l.slice(1)}function ede(r){for(var e="",t,i,n,s=0;s=55296&&t<=56319&&(i=r.charCodeAt(s+1),i>=56320&&i<=57343)){e+=T2((t-55296)*1024+i-56320+65536),s++;continue}n=Ni[t],e+=!n&&Ug(t)?r[s]:n||T2(t)}return e}function tde(r,e,t){var i="",n=r.tag,s,o;for(s=0,o=t.length;s1024&&(u+="? "),u+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),oc(r,e,c,!1,!1)&&(u+=r.dump,i+=u));r.tag=n,r.dump="{"+i+"}"}function nde(r,e,t,i){var n="",s=r.tag,o=Object.keys(t),a,l,c,u,g,f;if(r.sortKeys===!0)o.sort();else if(typeof r.sortKeys=="function")o.sort(r.sortKeys);else if(r.sortKeys)throw new ed("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,g&&(r.dump&&_p===r.dump.charCodeAt(0)?f+="?":f+="? "),f+=r.dump,g&&(f+=VS(r,e)),oc(r,e+1,u,!0,g)&&(r.dump&&_p===r.dump.charCodeAt(0)?f+=":":f+=": ",f+=r.dump,n+=f));r.tag=s,r.dump=n||"{}"}function H2(r,e,t){var i,n,s,o,a,l;for(n=t?r.explicitTypes:r.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+l+'" style');r.dump=i}return!0}return!1}function oc(r,e,t,i,n,s){r.tag=null,r.dump=t,H2(r,t,!1)||H2(r,t,!0);var o=G2.call(r.dump);i&&(i=r.flowLevel<0||r.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=r.duplicates.indexOf(t),c=l!==-1),(r.tag!==null&&r.tag!=="?"||c||r.indent!==2&&e>0)&&(n=!1),c&&r.usedDuplicates[l])r.dump="*ref_"+l;else{if(a&&c&&!r.usedDuplicates[l]&&(r.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(r.dump).length!==0?(nde(r,e,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(ide(r,e,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump));else if(o==="[object Array]"){var u=r.noArrayIndent&&e>0?e-1:e;i&&r.dump.length!==0?(rde(r,u,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(tde(r,u,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump))}else if(o==="[object String]")r.tag!=="?"&&_pe(r,r.dump,e,s);else{if(r.skipInvalid)return!1;throw new ed("unacceptable kind of an object to dump "+o)}r.tag!==null&&r.tag!=="?"&&(r.dump="!<"+r.tag+"> "+r.dump)}return!0}function sde(r,e){var t=[],i=[],n,s;for(XS(r,t,i),n=0,s=i.length;n{"use strict";var bI=N2(),nH=iH();function QI(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}Fr.exports.Type=si();Fr.exports.Schema=rc();Fr.exports.FAILSAFE_SCHEMA=CI();Fr.exports.JSON_SCHEMA=YS();Fr.exports.CORE_SCHEMA=jS();Fr.exports.DEFAULT_SAFE_SCHEMA=Lg();Fr.exports.DEFAULT_FULL_SCHEMA=Xp();Fr.exports.load=bI.load;Fr.exports.loadAll=bI.loadAll;Fr.exports.safeLoad=bI.safeLoad;Fr.exports.safeLoadAll=bI.safeLoadAll;Fr.exports.dump=nH.dump;Fr.exports.safeDump=nH.safeDump;Fr.exports.YAMLException=Ng();Fr.exports.MINIMAL_SCHEMA=CI();Fr.exports.SAFE_SCHEMA=Lg();Fr.exports.DEFAULT_SCHEMA=Xp();Fr.exports.scan=QI("scan");Fr.exports.parse=QI("parse");Fr.exports.compose=QI("compose");Fr.exports.addConstructor=QI("addConstructor")});var aH=w((t_e,oH)=>{"use strict";var ade=sH();oH.exports=ade});var lH=w((r_e,AH)=>{"use strict";function Ade(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function ac(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ac)}Ade(ac,Error);ac.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g({[Ke]:Ce})))},H=function(R){return R},j=function(R){return R},$=Us("correct indentation"),V=" ",W=ar(" ",!1),_=function(R){return R.length===bA*yg},A=function(R){return R.length===(bA+1)*yg},Ae=function(){return bA++,!0},ge=function(){return bA--,!0},re=function(){return pg()},O=Us("pseudostring"),F=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,ue=Tn(["\r",` +`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),pe=/^[^\r\n\t ,\][{}:#"']/,ke=Tn(["\r",` +`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),Fe=function(){return pg().replace(/^ *| *$/g,"")},Ne="--",oe=ar("--",!1),le=/^[a-zA-Z\/0-9]/,Be=Tn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),fe=/^[^\r\n\t :,]/,ae=Tn(["\r",` +`," "," ",":",","],!0,!1),qe="null",ne=ar("null",!1),Y=function(){return null},he="true",ie=ar("true",!1),de=function(){return!0},_e="false",Pt=ar("false",!1),It=function(){return!1},Or=Us("string"),ii='"',gi=ar('"',!1),hr=function(){return""},fi=function(R){return R},ni=function(R){return R.join("")},Ks=/^[^"\\\0-\x1F\x7F]/,pr=Tn(['"',"\\",["\0",""],"\x7F"],!0,!1),Ii='\\"',rs=ar('\\"',!1),fa=function(){return'"'},dA="\\\\",cg=ar("\\\\",!1),is=function(){return"\\"},CA="\\/",ha=ar("\\/",!1),wp=function(){return"/"},mA="\\b",EA=ar("\\b",!1),wr=function(){return"\b"},Tl="\\f",ug=ar("\\f",!1),yo=function(){return"\f"},gg="\\n",Bp=ar("\\n",!1),bp=function(){return` +`},vr="\\r",se=ar("\\r",!1),wo=function(){return"\r"},Fn="\\t",fg=ar("\\t",!1),bt=function(){return" "},Ll="\\u",Nn=ar("\\u",!1),ns=function(R,q,Ce,Ke){return String.fromCharCode(parseInt(`0x${R}${q}${Ce}${Ke}`))},ss=/^[0-9a-fA-F]/,gt=Tn([["0","9"],["a","f"],["A","F"]],!1,!1),Bo=Us("blank space"),At=/^[ \t]/,ln=Tn([" "," "],!1,!1),S=Us("white space"),Lt=/^[ \t\n\r]/,hg=Tn([" "," ",` +`,"\r"],!1,!1),Ol=`\r +`,Qp=ar(`\r +`,!1),Sp=` +`,vp=ar(` +`,!1),xp="\r",Pp=ar("\r",!1),G=0,yt=0,IA=[{line:1,column:1}],zi=0,Ml=[],Xe=0,pa;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function pg(){return r.substring(yt,G)}function OE(){return cn(yt,G)}function Dp(R,q){throw q=q!==void 0?q:cn(yt,G),Ul([Us(R)],r.substring(yt,G),q)}function ME(R,q){throw q=q!==void 0?q:cn(yt,G),dg(R,q)}function ar(R,q){return{type:"literal",text:R,ignoreCase:q}}function Tn(R,q,Ce){return{type:"class",parts:R,inverted:q,ignoreCase:Ce}}function Kl(){return{type:"any"}}function kp(){return{type:"end"}}function Us(R){return{type:"other",description:R}}function da(R){var q=IA[R],Ce;if(q)return q;for(Ce=R-1;!IA[Ce];)Ce--;for(q=IA[Ce],q={line:q.line,column:q.column};Cezi&&(zi=G,Ml=[]),Ml.push(R))}function dg(R,q){return new ac(R,null,null,q)}function Ul(R,q,Ce){return new ac(ac.buildMessage(R,q),R,q,Ce)}function Hs(){var R;return R=Cg(),R}function Hl(){var R,q,Ce;for(R=G,q=[],Ce=yA();Ce!==t;)q.push(Ce),Ce=yA();return q!==t&&(yt=R,q=s(q)),R=q,R}function yA(){var R,q,Ce,Ke,Re;return R=G,q=ma(),q!==t?(r.charCodeAt(G)===45?(Ce=o,G++):(Ce=t,Xe===0&&Le(a)),Ce!==t?(Ke=Rr(),Ke!==t?(Re=Ca(),Re!==t?(yt=R,q=l(Re),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R}function Cg(){var R,q,Ce;for(R=G,q=[],Ce=mg();Ce!==t;)q.push(Ce),Ce=mg();return q!==t&&(yt=R,q=c(q)),R=q,R}function mg(){var R,q,Ce,Ke,Re,ze,dt,Ft,Ln;if(R=G,q=Rr(),q===t&&(q=null),q!==t){if(Ce=G,r.charCodeAt(G)===35?(Ke=u,G++):(Ke=t,Xe===0&&Le(g)),Ke!==t){if(Re=[],ze=G,dt=G,Xe++,Ft=js(),Xe--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,Xe===0&&Le(f)),Ft!==t?(dt=[dt,Ft],ze=dt):(G=ze,ze=t)):(G=ze,ze=t),ze!==t)for(;ze!==t;)Re.push(ze),ze=G,dt=G,Xe++,Ft=js(),Xe--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,Xe===0&&Le(f)),Ft!==t?(dt=[dt,Ft],ze=dt):(G=ze,ze=t)):(G=ze,ze=t);else Re=t;Re!==t?(Ke=[Ke,Re],Ce=Ke):(G=Ce,Ce=t)}else G=Ce,Ce=t;if(Ce===t&&(Ce=null),Ce!==t){if(Ke=[],Re=Ys(),Re!==t)for(;Re!==t;)Ke.push(Re),Re=Ys();else Ke=t;Ke!==t?(yt=R,q=h(),R=q):(G=R,R=t)}else G=R,R=t}else G=R,R=t;if(R===t&&(R=G,q=ma(),q!==t?(Ce=Gl(),Ce!==t?(Ke=Rr(),Ke===t&&(Ke=null),Ke!==t?(r.charCodeAt(G)===58?(Re=p,G++):(Re=t,Xe===0&&Le(C)),Re!==t?(ze=Rr(),ze===t&&(ze=null),ze!==t?(dt=Ca(),dt!==t?(yt=R,q=y(Ce,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=ma(),q!==t?(Ce=Gs(),Ce!==t?(Ke=Rr(),Ke===t&&(Ke=null),Ke!==t?(r.charCodeAt(G)===58?(Re=p,G++):(Re=t,Xe===0&&Le(C)),Re!==t?(ze=Rr(),ze===t&&(ze=null),ze!==t?(dt=Ca(),dt!==t?(yt=R,q=y(Ce,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))){if(R=G,q=ma(),q!==t)if(Ce=Gs(),Ce!==t)if(Ke=Rr(),Ke!==t)if(Re=KE(),Re!==t){if(ze=[],dt=Ys(),dt!==t)for(;dt!==t;)ze.push(dt),dt=Ys();else ze=t;ze!==t?(yt=R,q=y(Ce,Re),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;else G=R,R=t;else G=R,R=t;if(R===t)if(R=G,q=ma(),q!==t)if(Ce=Gs(),Ce!==t){if(Ke=[],Re=G,ze=Rr(),ze===t&&(ze=null),ze!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,Xe===0&&Le(v)),dt!==t?(Ft=Rr(),Ft===t&&(Ft=null),Ft!==t?(Ln=Gs(),Ln!==t?(yt=Re,ze=D(Ce,Ln),Re=ze):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t),Re!==t)for(;Re!==t;)Ke.push(Re),Re=G,ze=Rr(),ze===t&&(ze=null),ze!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,Xe===0&&Le(v)),dt!==t?(Ft=Rr(),Ft===t&&(Ft=null),Ft!==t?(Ln=Gs(),Ln!==t?(yt=Re,ze=D(Ce,Ln),Re=ze):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t);else Ke=t;Ke!==t?(Re=Rr(),Re===t&&(Re=null),Re!==t?(r.charCodeAt(G)===58?(ze=p,G++):(ze=t,Xe===0&&Le(C)),ze!==t?(dt=Rr(),dt===t&&(dt=null),dt!==t?(Ft=Ca(),Ft!==t?(yt=R,q=T(Ce,Ke,Ft),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)}else G=R,R=t;else G=R,R=t}return R}function Ca(){var R,q,Ce,Ke,Re,ze,dt;if(R=G,q=G,Xe++,Ce=G,Ke=js(),Ke!==t?(Re=rt(),Re!==t?(r.charCodeAt(G)===45?(ze=o,G++):(ze=t,Xe===0&&Le(a)),ze!==t?(dt=Rr(),dt!==t?(Ke=[Ke,Re,ze,dt],Ce=Ke):(G=Ce,Ce=t)):(G=Ce,Ce=t)):(G=Ce,Ce=t)):(G=Ce,Ce=t),Xe--,Ce!==t?(G=q,q=void 0):q=t,q!==t?(Ce=Ys(),Ce!==t?(Ke=bo(),Ke!==t?(Re=Hl(),Re!==t?(ze=wA(),ze!==t?(yt=R,q=H(Re),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=js(),q!==t?(Ce=bo(),Ce!==t?(Ke=Cg(),Ke!==t?(Re=wA(),Re!==t?(yt=R,q=H(Ke),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))if(R=G,q=Yl(),q!==t){if(Ce=[],Ke=Ys(),Ke!==t)for(;Ke!==t;)Ce.push(Ke),Ke=Ys();else Ce=t;Ce!==t?(yt=R,q=j(q),R=q):(G=R,R=t)}else G=R,R=t;return R}function ma(){var R,q,Ce;for(Xe++,R=G,q=[],r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Le(W));Ce!==t;)q.push(Ce),r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Le(W));return q!==t?(yt=G,Ce=_(q),Ce?Ce=void 0:Ce=t,Ce!==t?(q=[q,Ce],R=q):(G=R,R=t)):(G=R,R=t),Xe--,R===t&&(q=t,Xe===0&&Le($)),R}function rt(){var R,q,Ce;for(R=G,q=[],r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Le(W));Ce!==t;)q.push(Ce),r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Le(W));return q!==t?(yt=G,Ce=A(q),Ce?Ce=void 0:Ce=t,Ce!==t?(q=[q,Ce],R=q):(G=R,R=t)):(G=R,R=t),R}function bo(){var R;return yt=G,R=Ae(),R?R=void 0:R=t,R}function wA(){var R;return yt=G,R=ge(),R?R=void 0:R=t,R}function Gl(){var R;return R=jl(),R===t&&(R=Rp()),R}function Gs(){var R,q,Ce;if(R=jl(),R===t){if(R=G,q=[],Ce=Eg(),Ce!==t)for(;Ce!==t;)q.push(Ce),Ce=Eg();else q=t;q!==t&&(yt=R,q=re()),R=q}return R}function Yl(){var R;return R=Fp(),R===t&&(R=UE(),R===t&&(R=jl(),R===t&&(R=Rp()))),R}function KE(){var R;return R=Fp(),R===t&&(R=jl(),R===t&&(R=Eg())),R}function Rp(){var R,q,Ce,Ke,Re,ze;if(Xe++,R=G,F.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Le(ue)),q!==t){for(Ce=[],Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(pe.test(r.charAt(G))?(ze=r.charAt(G),G++):(ze=t,Xe===0&&Le(ke)),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ke!==t;)Ce.push(Ke),Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(pe.test(r.charAt(G))?(ze=r.charAt(G),G++):(ze=t,Xe===0&&Le(ke)),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ce!==t?(yt=R,q=Fe(),R=q):(G=R,R=t)}else G=R,R=t;return Xe--,R===t&&(q=t,Xe===0&&Le(O)),R}function Eg(){var R,q,Ce,Ke,Re;if(R=G,r.substr(G,2)===Ne?(q=Ne,G+=2):(q=t,Xe===0&&Le(oe)),q===t&&(q=null),q!==t)if(le.test(r.charAt(G))?(Ce=r.charAt(G),G++):(Ce=t,Xe===0&&Le(Be)),Ce!==t){for(Ke=[],fe.test(r.charAt(G))?(Re=r.charAt(G),G++):(Re=t,Xe===0&&Le(ae));Re!==t;)Ke.push(Re),fe.test(r.charAt(G))?(Re=r.charAt(G),G++):(Re=t,Xe===0&&Le(ae));Ke!==t?(yt=R,q=Fe(),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;return R}function Fp(){var R,q;return R=G,r.substr(G,4)===qe?(q=qe,G+=4):(q=t,Xe===0&&Le(ne)),q!==t&&(yt=R,q=Y()),R=q,R}function UE(){var R,q;return R=G,r.substr(G,4)===he?(q=he,G+=4):(q=t,Xe===0&&Le(ie)),q!==t&&(yt=R,q=de()),R=q,R===t&&(R=G,r.substr(G,5)===_e?(q=_e,G+=5):(q=t,Xe===0&&Le(Pt)),q!==t&&(yt=R,q=It()),R=q),R}function jl(){var R,q,Ce,Ke;return Xe++,R=G,r.charCodeAt(G)===34?(q=ii,G++):(q=t,Xe===0&&Le(gi)),q!==t?(r.charCodeAt(G)===34?(Ce=ii,G++):(Ce=t,Xe===0&&Le(gi)),Ce!==t?(yt=R,q=hr(),R=q):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,r.charCodeAt(G)===34?(q=ii,G++):(q=t,Xe===0&&Le(gi)),q!==t?(Ce=HE(),Ce!==t?(r.charCodeAt(G)===34?(Ke=ii,G++):(Ke=t,Xe===0&&Le(gi)),Ke!==t?(yt=R,q=fi(Ce),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)),Xe--,R===t&&(q=t,Xe===0&&Le(Or)),R}function HE(){var R,q,Ce;if(R=G,q=[],Ce=Ig(),Ce!==t)for(;Ce!==t;)q.push(Ce),Ce=Ig();else q=t;return q!==t&&(yt=R,q=ni(q)),R=q,R}function Ig(){var R,q,Ce,Ke,Re,ze;return Ks.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,Xe===0&&Le(pr)),R===t&&(R=G,r.substr(G,2)===Ii?(q=Ii,G+=2):(q=t,Xe===0&&Le(rs)),q!==t&&(yt=R,q=fa()),R=q,R===t&&(R=G,r.substr(G,2)===dA?(q=dA,G+=2):(q=t,Xe===0&&Le(cg)),q!==t&&(yt=R,q=is()),R=q,R===t&&(R=G,r.substr(G,2)===CA?(q=CA,G+=2):(q=t,Xe===0&&Le(ha)),q!==t&&(yt=R,q=wp()),R=q,R===t&&(R=G,r.substr(G,2)===mA?(q=mA,G+=2):(q=t,Xe===0&&Le(EA)),q!==t&&(yt=R,q=wr()),R=q,R===t&&(R=G,r.substr(G,2)===Tl?(q=Tl,G+=2):(q=t,Xe===0&&Le(ug)),q!==t&&(yt=R,q=yo()),R=q,R===t&&(R=G,r.substr(G,2)===gg?(q=gg,G+=2):(q=t,Xe===0&&Le(Bp)),q!==t&&(yt=R,q=bp()),R=q,R===t&&(R=G,r.substr(G,2)===vr?(q=vr,G+=2):(q=t,Xe===0&&Le(se)),q!==t&&(yt=R,q=wo()),R=q,R===t&&(R=G,r.substr(G,2)===Fn?(q=Fn,G+=2):(q=t,Xe===0&&Le(fg)),q!==t&&(yt=R,q=bt()),R=q,R===t&&(R=G,r.substr(G,2)===Ll?(q=Ll,G+=2):(q=t,Xe===0&&Le(Nn)),q!==t?(Ce=BA(),Ce!==t?(Ke=BA(),Ke!==t?(Re=BA(),Re!==t?(ze=BA(),ze!==t?(yt=R,q=ns(Ce,Ke,Re,ze),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)))))))))),R}function BA(){var R;return ss.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,Xe===0&&Le(gt)),R}function Rr(){var R,q;if(Xe++,R=[],At.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Le(ln)),q!==t)for(;q!==t;)R.push(q),At.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Le(ln));else R=t;return Xe--,R===t&&(q=t,Xe===0&&Le(Bo)),R}function GE(){var R,q;if(Xe++,R=[],Lt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Le(hg)),q!==t)for(;q!==t;)R.push(q),Lt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Le(hg));else R=t;return Xe--,R===t&&(q=t,Xe===0&&Le(S)),R}function Ys(){var R,q,Ce,Ke,Re,ze;if(R=G,q=js(),q!==t){for(Ce=[],Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(ze=js(),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ke!==t;)Ce.push(Ke),Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(ze=js(),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ce!==t?(q=[q,Ce],R=q):(G=R,R=t)}else G=R,R=t;return R}function js(){var R;return r.substr(G,2)===Ol?(R=Ol,G+=2):(R=t,Xe===0&&Le(Qp)),R===t&&(r.charCodeAt(G)===10?(R=Sp,G++):(R=t,Xe===0&&Le(vp)),R===t&&(r.charCodeAt(G)===13?(R=xp,G++):(R=t,Xe===0&&Le(Pp)))),R}let yg=2,bA=0;if(pa=n(),pa!==t&&G===r.length)return pa;throw pa!==t&&G{"use strict";var hde=r=>{let e=!1,t=!1,i=!1;for(let n=0;n{if(!(typeof r=="string"||Array.isArray(r)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let t=n=>e.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;return Array.isArray(r)?r=r.map(n=>n.trim()).filter(n=>n.length).join("-"):r=r.trim(),r.length===0?"":r.length===1?e.pascalCase?r.toUpperCase():r.toLowerCase():(r!==r.toLowerCase()&&(r=hde(r)),r=r.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(n,s)=>s.toUpperCase()).replace(/\d+(\w|$)/g,n=>n.toUpperCase()),t(r))};ev.exports=hH;ev.exports.default=hH});var dH=w((A_e,pde)=>{pde.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var Ac=w(Un=>{"use strict";var mH=dH(),Po=process.env;Object.defineProperty(Un,"_vendors",{value:mH.map(function(r){return r.constant})});Un.name=null;Un.isPR=null;mH.forEach(function(r){let t=(Array.isArray(r.env)?r.env:[r.env]).every(function(i){return CH(i)});if(Un[r.constant]=t,t)switch(Un.name=r.name,typeof r.pr){case"string":Un.isPR=!!Po[r.pr];break;case"object":"env"in r.pr?Un.isPR=r.pr.env in Po&&Po[r.pr.env]!==r.pr.ne:"any"in r.pr?Un.isPR=r.pr.any.some(function(i){return!!Po[i]}):Un.isPR=CH(r.pr);break;default:Un.isPR=null}});Un.isCI=!!(Po.CI||Po.CONTINUOUS_INTEGRATION||Po.BUILD_NUMBER||Po.RUN_ID||Un.name);function CH(r){return typeof r=="string"?!!Po[r]:Object.keys(r).every(function(e){return Po[e]===r[e]})}});var hn={};ut(hn,{KeyRelationship:()=>lc,applyCascade:()=>od,base64RegExp:()=>BH,colorStringAlphaRegExp:()=>wH,colorStringRegExp:()=>yH,computeKey:()=>RA,getPrintable:()=>Vr,hasExactLength:()=>xH,hasForbiddenKeys:()=>Wde,hasKeyRelationship:()=>av,hasMaxLength:()=>Dde,hasMinLength:()=>Pde,hasMutuallyExclusiveKeys:()=>zde,hasRequiredKeys:()=>Jde,hasUniqueItems:()=>kde,isArray:()=>yde,isAtLeast:()=>Nde,isAtMost:()=>Tde,isBase64:()=>jde,isBoolean:()=>mde,isDate:()=>Ide,isDict:()=>Bde,isEnum:()=>Zi,isHexColor:()=>Yde,isISO8601:()=>Gde,isInExclusiveRange:()=>Ode,isInInclusiveRange:()=>Lde,isInstanceOf:()=>Qde,isInteger:()=>Mde,isJSON:()=>qde,isLiteral:()=>dde,isLowerCase:()=>Kde,isNegative:()=>Rde,isNullable:()=>xde,isNumber:()=>Ede,isObject:()=>bde,isOneOf:()=>Sde,isOptional:()=>vde,isPositive:()=>Fde,isString:()=>sd,isTuple:()=>wde,isUUID4:()=>Hde,isUnknown:()=>vH,isUpperCase:()=>Ude,iso8601RegExp:()=>ov,makeCoercionFn:()=>cc,makeSetter:()=>SH,makeTrait:()=>QH,makeValidator:()=>Qt,matchesRegExp:()=>ad,plural:()=>kI,pushError:()=>pt,simpleKeyRegExp:()=>IH,uuid4RegExp:()=>bH});function Qt({test:r}){return QH(r)()}function Vr(r){return r===null?"null":r===void 0?"undefined":r===""?"an empty string":JSON.stringify(r)}function RA(r,e){var t,i,n;return typeof e=="number"?`${(t=r==null?void 0:r.p)!==null&&t!==void 0?t:"."}[${e}]`:IH.test(e)?`${(i=r==null?void 0:r.p)!==null&&i!==void 0?i:""}.${e}`:`${(n=r==null?void 0:r.p)!==null&&n!==void 0?n:"."}[${JSON.stringify(e)}]`}function cc(r,e){return t=>{let i=r[e];return r[e]=t,cc(r,e).bind(null,i)}}function SH(r,e){return t=>{r[e]=t}}function kI(r,e,t){return r===1?e:t}function pt({errors:r,p:e}={},t){return r==null||r.push(`${e!=null?e:"."}: ${t}`),!1}function dde(r){return Qt({test:(e,t)=>e!==r?pt(t,`Expected a literal (got ${Vr(r)})`):!0})}function Zi(r){let e=Array.isArray(r)?r:Object.values(r),t=new Set(e);return Qt({test:(i,n)=>t.has(i)?!0:pt(n,`Expected a valid enumeration value (got ${Vr(i)})`)})}var IH,yH,wH,BH,bH,ov,QH,vH,sd,Cde,mde,Ede,Ide,yde,wde,Bde,bde,Qde,Sde,od,vde,xde,Pde,Dde,xH,kde,Rde,Fde,Nde,Tde,Lde,Ode,Mde,ad,Kde,Ude,Hde,Gde,Yde,jde,qde,Jde,Wde,zde,lc,Vde,av,ls=Tge(()=>{IH=/^[a-zA-Z_][a-zA-Z0-9_]*$/,yH=/^#[0-9a-f]{6}$/i,wH=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,BH=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,bH=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,ov=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,QH=r=>()=>r;vH=()=>Qt({test:(r,e)=>!0});sd=()=>Qt({test:(r,e)=>typeof r!="string"?pt(e,`Expected a string (got ${Vr(r)})`):!0});Cde=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),mde=()=>Qt({test:(r,e)=>{var t;if(typeof r!="boolean"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i=Cde.get(r);if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a boolean (got ${Vr(r)})`)}return!0}}),Ede=()=>Qt({test:(r,e)=>{var t;if(typeof r!="number"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"){let n;try{n=JSON.parse(r)}catch{}if(typeof n=="number")if(JSON.stringify(n)===r)i=n;else return pt(e,`Received a number that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a number (got ${Vr(r)})`)}return!0}}),Ide=()=>Qt({test:(r,e)=>{var t;if(!(r instanceof Date)){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"&&ov.test(r))i=new Date(r);else{let n;if(typeof r=="string"){let s;try{s=JSON.parse(r)}catch{}typeof s=="number"&&(n=s)}else typeof r=="number"&&(n=r);if(typeof n<"u")if(Number.isSafeInteger(n)||!Number.isSafeInteger(n*1e3))i=new Date(n*1e3);else return pt(e,`Received a timestamp that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a date (got ${Vr(r)})`)}return!0}}),yde=(r,{delimiter:e}={})=>Qt({test:(t,i)=>{var n;if(typeof t=="string"&&typeof e<"u"&&typeof(i==null?void 0:i.coercions)<"u"){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");t=t.split(e),i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,t)])}if(!Array.isArray(t))return pt(i,`Expected an array (got ${Vr(t)})`);let s=!0;for(let o=0,a=t.length;o{let t=xH(r.length);return Qt({test:(i,n)=>{var s;if(typeof i=="string"&&typeof e<"u"&&typeof(n==null?void 0:n.coercions)<"u"){if(typeof(n==null?void 0:n.coercion)>"u")return pt(n,"Unbound coercion result");i=i.split(e),n.coercions.push([(s=n.p)!==null&&s!==void 0?s:".",n.coercion.bind(null,i)])}if(!Array.isArray(i))return pt(n,`Expected a tuple (got ${Vr(i)})`);let o=t(i,Object.assign({},n));for(let a=0,l=i.length;aQt({test:(t,i)=>{if(typeof t!="object"||t===null)return pt(i,`Expected an object (got ${Vr(t)})`);let n=Object.keys(t),s=!0;for(let o=0,a=n.length;o{let t=Object.keys(r);return Qt({test:(i,n)=>{if(typeof i!="object"||i===null)return pt(n,`Expected an object (got ${Vr(i)})`);let s=new Set([...t,...Object.keys(i)]),o={},a=!0;for(let l of s){if(l==="constructor"||l==="__proto__")a=pt(Object.assign(Object.assign({},n),{p:RA(n,l)}),"Unsafe property name");else{let c=Object.prototype.hasOwnProperty.call(r,l)?r[l]:void 0,u=Object.prototype.hasOwnProperty.call(i,l)?i[l]:void 0;typeof c<"u"?a=c(u,Object.assign(Object.assign({},n),{p:RA(n,l),coercion:cc(i,l)}))&&a:e===null?a=pt(Object.assign(Object.assign({},n),{p:RA(n,l)}),`Extraneous property (got ${Vr(u)})`):Object.defineProperty(o,l,{enumerable:!0,get:()=>u,set:SH(i,l)})}if(!a&&(n==null?void 0:n.errors)==null)break}return e!==null&&(a||(n==null?void 0:n.errors)!=null)&&(a=e(o,n)&&a),a}})},Qde=r=>Qt({test:(e,t)=>e instanceof r?!0:pt(t,`Expected an instance of ${r.name} (got ${Vr(e)})`)}),Sde=(r,{exclusive:e=!1}={})=>Qt({test:(t,i)=>{var n,s,o;let a=[],l=typeof(i==null?void 0:i.errors)<"u"?[]:void 0;for(let c=0,u=r.length;c1?pt(i,`Expected to match exactly a single predicate (matched ${a.join(", ")})`):(o=i==null?void 0:i.errors)===null||o===void 0||o.push(...l),!1}}),od=(r,e)=>Qt({test:(t,i)=>{var n,s;let o={value:t},a=typeof(i==null?void 0:i.coercions)<"u"?cc(o,"value"):void 0,l=typeof(i==null?void 0:i.coercions)<"u"?[]:void 0;if(!r(t,Object.assign(Object.assign({},i),{coercion:a,coercions:l})))return!1;let c=[];if(typeof l<"u")for(let[,u]of l)c.push(u());try{if(typeof(i==null?void 0:i.coercions)<"u"){if(o.value!==t){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,o.value)])}(s=i==null?void 0:i.coercions)===null||s===void 0||s.push(...l)}return e.every(u=>u(o.value,i))}finally{for(let u of c)u()}}}),vde=r=>Qt({test:(e,t)=>typeof e>"u"?!0:r(e,t)}),xde=r=>Qt({test:(e,t)=>e===null?!0:r(e,t)}),Pde=r=>Qt({test:(e,t)=>e.length>=r?!0:pt(t,`Expected to have a length of at least ${r} elements (got ${e.length})`)}),Dde=r=>Qt({test:(e,t)=>e.length<=r?!0:pt(t,`Expected to have a length of at most ${r} elements (got ${e.length})`)}),xH=r=>Qt({test:(e,t)=>e.length!==r?pt(t,`Expected to have a length of exactly ${r} elements (got ${e.length})`):!0}),kde=({map:r}={})=>Qt({test:(e,t)=>{let i=new Set,n=new Set;for(let s=0,o=e.length;sQt({test:(r,e)=>r<=0?!0:pt(e,`Expected to be negative (got ${r})`)}),Fde=()=>Qt({test:(r,e)=>r>=0?!0:pt(e,`Expected to be positive (got ${r})`)}),Nde=r=>Qt({test:(e,t)=>e>=r?!0:pt(t,`Expected to be at least ${r} (got ${e})`)}),Tde=r=>Qt({test:(e,t)=>e<=r?!0:pt(t,`Expected to be at most ${r} (got ${e})`)}),Lde=(r,e)=>Qt({test:(t,i)=>t>=r&&t<=e?!0:pt(i,`Expected to be in the [${r}; ${e}] range (got ${t})`)}),Ode=(r,e)=>Qt({test:(t,i)=>t>=r&&tQt({test:(e,t)=>e!==Math.round(e)?pt(t,`Expected to be an integer (got ${e})`):Number.isSafeInteger(e)?!0:pt(t,`Expected to be a safe integer (got ${e})`)}),ad=r=>Qt({test:(e,t)=>r.test(e)?!0:pt(t,`Expected to match the pattern ${r.toString()} (got ${Vr(e)})`)}),Kde=()=>Qt({test:(r,e)=>r!==r.toLowerCase()?pt(e,`Expected to be all-lowercase (got ${r})`):!0}),Ude=()=>Qt({test:(r,e)=>r!==r.toUpperCase()?pt(e,`Expected to be all-uppercase (got ${r})`):!0}),Hde=()=>Qt({test:(r,e)=>bH.test(r)?!0:pt(e,`Expected to be a valid UUID v4 (got ${Vr(r)})`)}),Gde=()=>Qt({test:(r,e)=>ov.test(r)?!1:pt(e,`Expected to be a valid ISO 8601 date string (got ${Vr(r)})`)}),Yde=({alpha:r=!1})=>Qt({test:(e,t)=>(r?yH.test(e):wH.test(e))?!0:pt(t,`Expected to be a valid hexadecimal color string (got ${Vr(e)})`)}),jde=()=>Qt({test:(r,e)=>BH.test(r)?!0:pt(e,`Expected to be a valid base 64 string (got ${Vr(r)})`)}),qde=(r=vH())=>Qt({test:(e,t)=>{let i;try{i=JSON.parse(e)}catch{return pt(t,`Expected to be a valid JSON string (got ${Vr(e)})`)}return r(i,t)}}),Jde=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)||s.push(o);return s.length>0?pt(i,`Missing required ${kI(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},Wde=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>0?pt(i,`Forbidden ${kI(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},zde=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>1?pt(i,`Mutually exclusive properties ${s.map(o=>`"${o}"`).join(", ")}`):!0}})};(function(r){r.Forbids="Forbids",r.Requires="Requires"})(lc||(lc={}));Vde={[lc.Forbids]:{expect:!1,message:"forbids using"},[lc.Requires]:{expect:!0,message:"requires using"}},av=(r,e,t,{ignore:i=[]}={})=>{let n=new Set(i),s=new Set(t),o=Vde[e];return Qt({test:(a,l)=>{let c=new Set(Object.keys(a));if(!c.has(r)||n.has(a[r]))return!0;let u=[];for(let g of s)(c.has(g)&&!n.has(a[g]))!==o.expect&&u.push(g);return u.length>=1?pt(l,`Property "${r}" ${o.message} ${kI(u.length,"property","properties")} ${u.map(g=>`"${g}"`).join(", ")}`):!0}})}});var qH=w((A$e,jH)=>{"use strict";jH.exports=(r,...e)=>new Promise(t=>{t(r(...e))})});var Jg=w((l$e,pv)=>{"use strict";var gCe=qH(),JH=r=>{if(r<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],t=0,i=()=>{t--,e.length>0&&e.shift()()},n=(a,l,...c)=>{t++;let u=gCe(a,...c);l(u),u.then(i,i)},s=(a,l,...c)=>{tnew Promise(c=>s(a,c,...l));return Object.defineProperties(o,{activeCount:{get:()=>t},pendingCount:{get:()=>e.length}}),o};pv.exports=JH;pv.exports.default=JH});var gd=w((u$e,WH)=>{var fCe="2.0.0",hCe=Number.MAX_SAFE_INTEGER||9007199254740991,pCe=16;WH.exports={SEMVER_SPEC_VERSION:fCe,MAX_LENGTH:256,MAX_SAFE_INTEGER:hCe,MAX_SAFE_COMPONENT_LENGTH:pCe}});var fd=w((g$e,zH)=>{var dCe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};zH.exports=dCe});var uc=w((NA,VH)=>{var{MAX_SAFE_COMPONENT_LENGTH:dv}=gd(),CCe=fd();NA=VH.exports={};var mCe=NA.re=[],et=NA.src=[],tt=NA.t={},ECe=0,St=(r,e,t)=>{let i=ECe++;CCe(i,e),tt[r]=i,et[i]=e,mCe[i]=new RegExp(e,t?"g":void 0)};St("NUMERICIDENTIFIER","0|[1-9]\\d*");St("NUMERICIDENTIFIERLOOSE","[0-9]+");St("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");St("MAINVERSION",`(${et[tt.NUMERICIDENTIFIER]})\\.(${et[tt.NUMERICIDENTIFIER]})\\.(${et[tt.NUMERICIDENTIFIER]})`);St("MAINVERSIONLOOSE",`(${et[tt.NUMERICIDENTIFIERLOOSE]})\\.(${et[tt.NUMERICIDENTIFIERLOOSE]})\\.(${et[tt.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASEIDENTIFIER",`(?:${et[tt.NUMERICIDENTIFIER]}|${et[tt.NONNUMERICIDENTIFIER]})`);St("PRERELEASEIDENTIFIERLOOSE",`(?:${et[tt.NUMERICIDENTIFIERLOOSE]}|${et[tt.NONNUMERICIDENTIFIER]})`);St("PRERELEASE",`(?:-(${et[tt.PRERELEASEIDENTIFIER]}(?:\\.${et[tt.PRERELEASEIDENTIFIER]})*))`);St("PRERELEASELOOSE",`(?:-?(${et[tt.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${et[tt.PRERELEASEIDENTIFIERLOOSE]})*))`);St("BUILDIDENTIFIER","[0-9A-Za-z-]+");St("BUILD",`(?:\\+(${et[tt.BUILDIDENTIFIER]}(?:\\.${et[tt.BUILDIDENTIFIER]})*))`);St("FULLPLAIN",`v?${et[tt.MAINVERSION]}${et[tt.PRERELEASE]}?${et[tt.BUILD]}?`);St("FULL",`^${et[tt.FULLPLAIN]}$`);St("LOOSEPLAIN",`[v=\\s]*${et[tt.MAINVERSIONLOOSE]}${et[tt.PRERELEASELOOSE]}?${et[tt.BUILD]}?`);St("LOOSE",`^${et[tt.LOOSEPLAIN]}$`);St("GTLT","((?:<|>)?=?)");St("XRANGEIDENTIFIERLOOSE",`${et[tt.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);St("XRANGEIDENTIFIER",`${et[tt.NUMERICIDENTIFIER]}|x|X|\\*`);St("XRANGEPLAIN",`[v=\\s]*(${et[tt.XRANGEIDENTIFIER]})(?:\\.(${et[tt.XRANGEIDENTIFIER]})(?:\\.(${et[tt.XRANGEIDENTIFIER]})(?:${et[tt.PRERELEASE]})?${et[tt.BUILD]}?)?)?`);St("XRANGEPLAINLOOSE",`[v=\\s]*(${et[tt.XRANGEIDENTIFIERLOOSE]})(?:\\.(${et[tt.XRANGEIDENTIFIERLOOSE]})(?:\\.(${et[tt.XRANGEIDENTIFIERLOOSE]})(?:${et[tt.PRERELEASELOOSE]})?${et[tt.BUILD]}?)?)?`);St("XRANGE",`^${et[tt.GTLT]}\\s*${et[tt.XRANGEPLAIN]}$`);St("XRANGELOOSE",`^${et[tt.GTLT]}\\s*${et[tt.XRANGEPLAINLOOSE]}$`);St("COERCE",`(^|[^\\d])(\\d{1,${dv}})(?:\\.(\\d{1,${dv}}))?(?:\\.(\\d{1,${dv}}))?(?:$|[^\\d])`);St("COERCERTL",et[tt.COERCE],!0);St("LONETILDE","(?:~>?)");St("TILDETRIM",`(\\s*)${et[tt.LONETILDE]}\\s+`,!0);NA.tildeTrimReplace="$1~";St("TILDE",`^${et[tt.LONETILDE]}${et[tt.XRANGEPLAIN]}$`);St("TILDELOOSE",`^${et[tt.LONETILDE]}${et[tt.XRANGEPLAINLOOSE]}$`);St("LONECARET","(?:\\^)");St("CARETTRIM",`(\\s*)${et[tt.LONECARET]}\\s+`,!0);NA.caretTrimReplace="$1^";St("CARET",`^${et[tt.LONECARET]}${et[tt.XRANGEPLAIN]}$`);St("CARETLOOSE",`^${et[tt.LONECARET]}${et[tt.XRANGEPLAINLOOSE]}$`);St("COMPARATORLOOSE",`^${et[tt.GTLT]}\\s*(${et[tt.LOOSEPLAIN]})$|^$`);St("COMPARATOR",`^${et[tt.GTLT]}\\s*(${et[tt.FULLPLAIN]})$|^$`);St("COMPARATORTRIM",`(\\s*)${et[tt.GTLT]}\\s*(${et[tt.LOOSEPLAIN]}|${et[tt.XRANGEPLAIN]})`,!0);NA.comparatorTrimReplace="$1$2$3";St("HYPHENRANGE",`^\\s*(${et[tt.XRANGEPLAIN]})\\s+-\\s+(${et[tt.XRANGEPLAIN]})\\s*$`);St("HYPHENRANGELOOSE",`^\\s*(${et[tt.XRANGEPLAINLOOSE]})\\s+-\\s+(${et[tt.XRANGEPLAINLOOSE]})\\s*$`);St("STAR","(<|>)?=?\\s*\\*");St("GTE0","^\\s*>=\\s*0.0.0\\s*$");St("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var hd=w((f$e,XH)=>{var ICe=["includePrerelease","loose","rtl"],yCe=r=>r?typeof r!="object"?{loose:!0}:ICe.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};XH.exports=yCe});var OI=w((h$e,$H)=>{var ZH=/^[0-9]+$/,_H=(r,e)=>{let t=ZH.test(r),i=ZH.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:r_H(e,r);$H.exports={compareIdentifiers:_H,rcompareIdentifiers:wCe}});var Li=w((p$e,iG)=>{var MI=fd(),{MAX_LENGTH:eG,MAX_SAFE_INTEGER:KI}=gd(),{re:tG,t:rG}=uc(),BCe=hd(),{compareIdentifiers:pd}=OI(),Yn=class{constructor(e,t){if(t=BCe(t),e instanceof Yn){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>eG)throw new TypeError(`version is longer than ${eG} characters`);MI("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?tG[rG.LOOSE]:tG[rG.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>KI||this.major<0)throw new TypeError("Invalid major version");if(this.minor>KI||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>KI||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};iG.exports=Yn});var gc=w((d$e,aG)=>{var{MAX_LENGTH:bCe}=gd(),{re:nG,t:sG}=uc(),oG=Li(),QCe=hd(),SCe=(r,e)=>{if(e=QCe(e),r instanceof oG)return r;if(typeof r!="string"||r.length>bCe||!(e.loose?nG[sG.LOOSE]:nG[sG.FULL]).test(r))return null;try{return new oG(r,e)}catch{return null}};aG.exports=SCe});var lG=w((C$e,AG)=>{var vCe=gc(),xCe=(r,e)=>{let t=vCe(r,e);return t?t.version:null};AG.exports=xCe});var uG=w((m$e,cG)=>{var PCe=gc(),DCe=(r,e)=>{let t=PCe(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};cG.exports=DCe});var fG=w((E$e,gG)=>{var kCe=Li(),RCe=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new kCe(r,t).inc(e,i).version}catch{return null}};gG.exports=RCe});var cs=w((I$e,pG)=>{var hG=Li(),FCe=(r,e,t)=>new hG(r,t).compare(new hG(e,t));pG.exports=FCe});var UI=w((y$e,dG)=>{var NCe=cs(),TCe=(r,e,t)=>NCe(r,e,t)===0;dG.exports=TCe});var EG=w((w$e,mG)=>{var CG=gc(),LCe=UI(),OCe=(r,e)=>{if(LCe(r,e))return null;{let t=CG(r),i=CG(e),n=t.prerelease.length||i.prerelease.length,s=n?"pre":"",o=n?"prerelease":"";for(let a in t)if((a==="major"||a==="minor"||a==="patch")&&t[a]!==i[a])return s+a;return o}};mG.exports=OCe});var yG=w((B$e,IG)=>{var MCe=Li(),KCe=(r,e)=>new MCe(r,e).major;IG.exports=KCe});var BG=w((b$e,wG)=>{var UCe=Li(),HCe=(r,e)=>new UCe(r,e).minor;wG.exports=HCe});var QG=w((Q$e,bG)=>{var GCe=Li(),YCe=(r,e)=>new GCe(r,e).patch;bG.exports=YCe});var vG=w((S$e,SG)=>{var jCe=gc(),qCe=(r,e)=>{let t=jCe(r,e);return t&&t.prerelease.length?t.prerelease:null};SG.exports=qCe});var PG=w((v$e,xG)=>{var JCe=cs(),WCe=(r,e,t)=>JCe(e,r,t);xG.exports=WCe});var kG=w((x$e,DG)=>{var zCe=cs(),VCe=(r,e)=>zCe(r,e,!0);DG.exports=VCe});var HI=w((P$e,FG)=>{var RG=Li(),XCe=(r,e,t)=>{let i=new RG(r,t),n=new RG(e,t);return i.compare(n)||i.compareBuild(n)};FG.exports=XCe});var TG=w((D$e,NG)=>{var ZCe=HI(),_Ce=(r,e)=>r.sort((t,i)=>ZCe(t,i,e));NG.exports=_Ce});var OG=w((k$e,LG)=>{var $Ce=HI(),eme=(r,e)=>r.sort((t,i)=>$Ce(i,t,e));LG.exports=eme});var dd=w((R$e,MG)=>{var tme=cs(),rme=(r,e,t)=>tme(r,e,t)>0;MG.exports=rme});var GI=w((F$e,KG)=>{var ime=cs(),nme=(r,e,t)=>ime(r,e,t)<0;KG.exports=nme});var Cv=w((N$e,UG)=>{var sme=cs(),ome=(r,e,t)=>sme(r,e,t)!==0;UG.exports=ome});var YI=w((T$e,HG)=>{var ame=cs(),Ame=(r,e,t)=>ame(r,e,t)>=0;HG.exports=Ame});var jI=w((L$e,GG)=>{var lme=cs(),cme=(r,e,t)=>lme(r,e,t)<=0;GG.exports=cme});var mv=w((O$e,YG)=>{var ume=UI(),gme=Cv(),fme=dd(),hme=YI(),pme=GI(),dme=jI(),Cme=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return ume(r,t,i);case"!=":return gme(r,t,i);case">":return fme(r,t,i);case">=":return hme(r,t,i);case"<":return pme(r,t,i);case"<=":return dme(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};YG.exports=Cme});var qG=w((M$e,jG)=>{var mme=Li(),Eme=gc(),{re:qI,t:JI}=uc(),Ime=(r,e)=>{if(r instanceof mme)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(qI[JI.COERCE]);else{let i;for(;(i=qI[JI.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),qI[JI.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;qI[JI.COERCERTL].lastIndex=-1}return t===null?null:Eme(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};jG.exports=Ime});var WG=w((K$e,JG)=>{"use strict";JG.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var WI=w((U$e,zG)=>{"use strict";zG.exports=Ht;Ht.Node=fc;Ht.create=Ht;function Ht(r){var e=this;if(e instanceof Ht||(e=new Ht),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var t=0,i=arguments.length;t1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)t=r(t,i.value,n),i=i.next;return t};Ht.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)t=r(t,i.value,n),i=i.prev;return t};Ht.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};Ht.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};Ht.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Ht;if(ethis.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&ithis.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>r;i--,n=n.prev)t.push(n.value);return t};Ht.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,n=this.head;n!==null&&i{"use strict";var bme=WI(),hc=Symbol("max"),va=Symbol("length"),Wg=Symbol("lengthCalculator"),md=Symbol("allowStale"),pc=Symbol("maxAge"),Sa=Symbol("dispose"),VG=Symbol("noDisposeOnSet"),di=Symbol("lruList"),Zs=Symbol("cache"),ZG=Symbol("updateAgeOnGet"),Ev=()=>1,yv=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[hc]=e.max||1/0,i=e.length||Ev;if(this[Wg]=typeof i!="function"?Ev:i,this[md]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[pc]=e.maxAge||0,this[Sa]=e.dispose,this[VG]=e.noDisposeOnSet||!1,this[ZG]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[hc]=e||1/0,Cd(this)}get max(){return this[hc]}set allowStale(e){this[md]=!!e}get allowStale(){return this[md]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[pc]=e,Cd(this)}get maxAge(){return this[pc]}set lengthCalculator(e){typeof e!="function"&&(e=Ev),e!==this[Wg]&&(this[Wg]=e,this[va]=0,this[di].forEach(t=>{t.length=this[Wg](t.value,t.key),this[va]+=t.length})),Cd(this)}get lengthCalculator(){return this[Wg]}get length(){return this[va]}get itemCount(){return this[di].length}rforEach(e,t){t=t||this;for(let i=this[di].tail;i!==null;){let n=i.prev;XG(this,e,i,t),i=n}}forEach(e,t){t=t||this;for(let i=this[di].head;i!==null;){let n=i.next;XG(this,e,i,t),i=n}}keys(){return this[di].toArray().map(e=>e.key)}values(){return this[di].toArray().map(e=>e.value)}reset(){this[Sa]&&this[di]&&this[di].length&&this[di].forEach(e=>this[Sa](e.key,e.value)),this[Zs]=new Map,this[di]=new bme,this[va]=0}dump(){return this[di].map(e=>zI(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[di]}set(e,t,i){if(i=i||this[pc],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let n=i?Date.now():0,s=this[Wg](t,e);if(this[Zs].has(e)){if(s>this[hc])return zg(this,this[Zs].get(e)),!1;let l=this[Zs].get(e).value;return this[Sa]&&(this[VG]||this[Sa](e,l.value)),l.now=n,l.maxAge=i,l.value=t,this[va]+=s-l.length,l.length=s,this.get(e),Cd(this),!0}let o=new wv(e,t,s,n,i);return o.length>this[hc]?(this[Sa]&&this[Sa](e,t),!1):(this[va]+=o.length,this[di].unshift(o),this[Zs].set(e,this[di].head),Cd(this),!0)}has(e){if(!this[Zs].has(e))return!1;let t=this[Zs].get(e).value;return!zI(this,t)}get(e){return Iv(this,e,!0)}peek(e){return Iv(this,e,!1)}pop(){let e=this[di].tail;return e?(zg(this,e),e.value):null}del(e){zg(this,this[Zs].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let n=e[i],s=n.e||0;if(s===0)this.set(n.k,n.v);else{let o=s-t;o>0&&this.set(n.k,n.v,o)}}}prune(){this[Zs].forEach((e,t)=>Iv(this,t,!1))}},Iv=(r,e,t)=>{let i=r[Zs].get(e);if(i){let n=i.value;if(zI(r,n)){if(zg(r,i),!r[md])return}else t&&(r[ZG]&&(i.value.now=Date.now()),r[di].unshiftNode(i));return n.value}},zI=(r,e)=>{if(!e||!e.maxAge&&!r[pc])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[pc]&&t>r[pc]},Cd=r=>{if(r[va]>r[hc])for(let e=r[di].tail;r[va]>r[hc]&&e!==null;){let t=e.prev;zg(r,e),e=t}},zg=(r,e)=>{if(e){let t=e.value;r[Sa]&&r[Sa](t.key,t.value),r[va]-=t.length,r[Zs].delete(t.key),r[di].removeNode(e)}},wv=class{constructor(e,t,i,n,s){this.key=e,this.value=t,this.length=i,this.now=n,this.maxAge=s||0}},XG=(r,e,t,i)=>{let n=t.value;zI(r,n)&&(zg(r,t),r[md]||(n=void 0)),n&&e.call(i,n.value,n.key,r)};_G.exports=yv});var us=w((G$e,iY)=>{var dc=class{constructor(e,t){if(t=Sme(t),e instanceof dc)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new dc(e.raw,t);if(e instanceof Bv)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!tY(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&kme(n[0])){this.set=[n];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=eY.get(i);if(n)return n;let s=this.options.loose,o=s?Oi[bi.HYPHENRANGELOOSE]:Oi[bi.HYPHENRANGE];e=e.replace(o,Hme(this.options.includePrerelease)),Hr("hyphen replace",e),e=e.replace(Oi[bi.COMPARATORTRIM],xme),Hr("comparator trim",e,Oi[bi.COMPARATORTRIM]),e=e.replace(Oi[bi.TILDETRIM],Pme),e=e.replace(Oi[bi.CARETTRIM],Dme),e=e.split(/\s+/).join(" ");let a=s?Oi[bi.COMPARATORLOOSE]:Oi[bi.COMPARATOR],l=e.split(" ").map(f=>Rme(f,this.options)).join(" ").split(/\s+/).map(f=>Ume(f,this.options)).filter(this.options.loose?f=>!!f.match(a):()=>!0).map(f=>new Bv(f,this.options)),c=l.length,u=new Map;for(let f of l){if(tY(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let g=[...u.values()];return eY.set(i,g),g}intersects(e,t){if(!(e instanceof dc))throw new TypeError("a Range is required");return this.set.some(i=>rY(i,t)&&e.set.some(n=>rY(n,t)&&i.every(s=>n.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new vme(e,this.options)}catch{return!1}for(let t=0;tr.value==="<0.0.0-0",kme=r=>r.value==="",rY=(r,e)=>{let t=!0,i=r.slice(),n=i.pop();for(;t&&i.length;)t=i.every(s=>n.intersects(s,e)),n=i.pop();return t},Rme=(r,e)=>(Hr("comp",r,e),r=Tme(r,e),Hr("caret",r),r=Fme(r,e),Hr("tildes",r),r=Ome(r,e),Hr("xrange",r),r=Kme(r,e),Hr("stars",r),r),$i=r=>!r||r.toLowerCase()==="x"||r==="*",Fme=(r,e)=>r.trim().split(/\s+/).map(t=>Nme(t,e)).join(" "),Nme=(r,e)=>{let t=e.loose?Oi[bi.TILDELOOSE]:Oi[bi.TILDE];return r.replace(t,(i,n,s,o,a)=>{Hr("tilde",r,i,n,s,o,a);let l;return $i(n)?l="":$i(s)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:$i(o)?l=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(Hr("replaceTilde pr",a),l=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):l=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,Hr("tilde return",l),l})},Tme=(r,e)=>r.trim().split(/\s+/).map(t=>Lme(t,e)).join(" "),Lme=(r,e)=>{Hr("caret",r,e);let t=e.loose?Oi[bi.CARETLOOSE]:Oi[bi.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(n,s,o,a,l)=>{Hr("caret",r,n,s,o,a,l);let c;return $i(s)?c="":$i(o)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:$i(a)?s==="0"?c=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(Hr("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(Hr("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${i} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),Hr("caret return",c),c})},Ome=(r,e)=>(Hr("replaceXRanges",r,e),r.split(/\s+/).map(t=>Mme(t,e)).join(" ")),Mme=(r,e)=>{r=r.trim();let t=e.loose?Oi[bi.XRANGELOOSE]:Oi[bi.XRANGE];return r.replace(t,(i,n,s,o,a,l)=>{Hr("xRange",r,i,n,s,o,a,l);let c=$i(s),u=c||$i(o),g=u||$i(a),f=g;return n==="="&&f&&(n=""),l=e.includePrerelease?"-0":"",c?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&f?(u&&(o=0),a=0,n===">"?(n=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",u?s=+s+1:o=+o+1),n==="<"&&(l="-0"),i=`${n+s}.${o}.${a}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:g&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),Hr("xRange return",i),i})},Kme=(r,e)=>(Hr("replaceStars",r,e),r.trim().replace(Oi[bi.STAR],"")),Ume=(r,e)=>(Hr("replaceGTE0",r,e),r.trim().replace(Oi[e.includePrerelease?bi.GTE0PRE:bi.GTE0],"")),Hme=r=>(e,t,i,n,s,o,a,l,c,u,g,f,h)=>($i(i)?t="":$i(n)?t=`>=${i}.0.0${r?"-0":""}`:$i(s)?t=`>=${i}.${n}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,$i(c)?l="":$i(u)?l=`<${+c+1}.0.0-0`:$i(g)?l=`<${c}.${+u+1}.0-0`:f?l=`<=${c}.${u}.${g}-${f}`:r?l=`<${c}.${u}.${+g+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),Gme=(r,e,t)=>{for(let i=0;i0){let n=r[i].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var Ed=w((Y$e,AY)=>{var Id=Symbol("SemVer ANY"),Vg=class{static get ANY(){return Id}constructor(e,t){if(t=Yme(t),e instanceof Vg){if(e.loose===!!t.loose)return e;e=e.value}Qv("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Id?this.value="":this.value=this.operator+this.semver.version,Qv("comp",this)}parse(e){let t=this.options.loose?nY[sY.COMPARATORLOOSE]:nY[sY.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new oY(i[2],this.options.loose):this.semver=Id}toString(){return this.value}test(e){if(Qv("Comparator.test",e,this.options.loose),this.semver===Id||e===Id)return!0;if(typeof e=="string")try{e=new oY(e,this.options)}catch{return!1}return bv(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Vg))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new aY(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new aY(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=bv(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=bv(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||n||s&&o||a||l}};AY.exports=Vg;var Yme=hd(),{re:nY,t:sY}=uc(),bv=mv(),Qv=fd(),oY=Li(),aY=us()});var yd=w((j$e,lY)=>{var jme=us(),qme=(r,e,t)=>{try{e=new jme(e,t)}catch{return!1}return e.test(r)};lY.exports=qme});var uY=w((q$e,cY)=>{var Jme=us(),Wme=(r,e)=>new Jme(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));cY.exports=Wme});var fY=w((J$e,gY)=>{var zme=Li(),Vme=us(),Xme=(r,e,t)=>{let i=null,n=null,s=null;try{s=new Vme(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===-1)&&(i=o,n=new zme(i,t))}),i};gY.exports=Xme});var pY=w((W$e,hY)=>{var Zme=Li(),_me=us(),$me=(r,e,t)=>{let i=null,n=null,s=null;try{s=new _me(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===1)&&(i=o,n=new Zme(i,t))}),i};hY.exports=$me});var mY=w((z$e,CY)=>{var Sv=Li(),eEe=us(),dY=dd(),tEe=(r,e)=>{r=new eEe(r,e);let t=new Sv("0.0.0");if(r.test(t)||(t=new Sv("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i{let a=new Sv(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||dY(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||dY(t,s))&&(t=s)}return t&&r.test(t)?t:null};CY.exports=tEe});var IY=w((V$e,EY)=>{var rEe=us(),iEe=(r,e)=>{try{return new rEe(r,e).range||"*"}catch{return null}};EY.exports=iEe});var VI=w((X$e,bY)=>{var nEe=Li(),BY=Ed(),{ANY:sEe}=BY,oEe=us(),aEe=yd(),yY=dd(),wY=GI(),AEe=jI(),lEe=YI(),cEe=(r,e,t,i)=>{r=new nEe(r,i),e=new oEe(e,i);let n,s,o,a,l;switch(t){case">":n=yY,s=AEe,o=wY,a=">",l=">=";break;case"<":n=wY,s=lEe,o=yY,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(aEe(r,e,i))return!1;for(let c=0;c{h.semver===sEe&&(h=new BY(">=0.0.0")),g=g||h,f=f||h,n(h.semver,g.semver,i)?g=h:o(h.semver,f.semver,i)&&(f=h)}),g.operator===a||g.operator===l||(!f.operator||f.operator===a)&&s(r,f.semver))return!1;if(f.operator===l&&o(r,f.semver))return!1}return!0};bY.exports=cEe});var SY=w((Z$e,QY)=>{var uEe=VI(),gEe=(r,e,t)=>uEe(r,e,">",t);QY.exports=gEe});var xY=w((_$e,vY)=>{var fEe=VI(),hEe=(r,e,t)=>fEe(r,e,"<",t);vY.exports=hEe});var kY=w(($$e,DY)=>{var PY=us(),pEe=(r,e,t)=>(r=new PY(r,t),e=new PY(e,t),r.intersects(e));DY.exports=pEe});var FY=w((eet,RY)=>{var dEe=yd(),CEe=cs();RY.exports=(r,e,t)=>{let i=[],n=null,s=null,o=r.sort((u,g)=>CEe(u,g,t));for(let u of o)dEe(u,e,t)?(s=u,n||(n=u)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,g]of i)u===g?a.push(u):!g&&u===o[0]?a.push("*"):g?u===o[0]?a.push(`<=${g}`):a.push(`${u} - ${g}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{var NY=us(),XI=Ed(),{ANY:vv}=XI,wd=yd(),xv=cs(),mEe=(r,e,t={})=>{if(r===e)return!0;r=new NY(r,t),e=new NY(e,t);let i=!1;e:for(let n of r.set){for(let s of e.set){let o=EEe(n,s,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},EEe=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===vv){if(e.length===1&&e[0].semver===vv)return!0;t.includePrerelease?r=[new XI(">=0.0.0-0")]:r=[new XI(">=0.0.0")]}if(e.length===1&&e[0].semver===vv){if(t.includePrerelease)return!0;e=[new XI(">=0.0.0")]}let i=new Set,n,s;for(let h of r)h.operator===">"||h.operator===">="?n=TY(n,h,t):h.operator==="<"||h.operator==="<="?s=LY(s,h,t):i.add(h.semver);if(i.size>1)return null;let o;if(n&&s){if(o=xv(n.semver,s.semver,t),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(n&&!wd(h,String(n),t)||s&&!wd(h,String(s),t))return null;for(let p of e)if(!wd(h,String(p),t))return!1;return!0}let a,l,c,u,g=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let h of e){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=TY(n,h,t),a===h&&a!==n)return!1}else if(n.operator===">="&&!wd(n.semver,String(h),t))return!1}if(s){if(g&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===g.major&&h.semver.minor===g.minor&&h.semver.patch===g.patch&&(g=!1),h.operator==="<"||h.operator==="<="){if(l=LY(s,h,t),l===h&&l!==s)return!1}else if(s.operator==="<="&&!wd(s.semver,String(h),t))return!1}if(!h.operator&&(s||n)&&o!==0)return!1}return!(n&&c&&!s&&o!==0||s&&u&&!n&&o!==0||f||g)},TY=(r,e,t)=>{if(!r)return e;let i=xv(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},LY=(r,e,t)=>{if(!r)return e;let i=xv(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};OY.exports=mEe});var Xr=w((ret,KY)=>{var Pv=uc();KY.exports={re:Pv.re,src:Pv.src,tokens:Pv.t,SEMVER_SPEC_VERSION:gd().SEMVER_SPEC_VERSION,SemVer:Li(),compareIdentifiers:OI().compareIdentifiers,rcompareIdentifiers:OI().rcompareIdentifiers,parse:gc(),valid:lG(),clean:uG(),inc:fG(),diff:EG(),major:yG(),minor:BG(),patch:QG(),prerelease:vG(),compare:cs(),rcompare:PG(),compareLoose:kG(),compareBuild:HI(),sort:TG(),rsort:OG(),gt:dd(),lt:GI(),eq:UI(),neq:Cv(),gte:YI(),lte:jI(),cmp:mv(),coerce:qG(),Comparator:Ed(),Range:us(),satisfies:yd(),toComparators:uY(),maxSatisfying:fY(),minSatisfying:pY(),minVersion:mY(),validRange:IY(),outside:VI(),gtr:SY(),ltr:xY(),intersects:kY(),simplifyRange:FY(),subset:MY()}});var Dv=w(ZI=>{"use strict";Object.defineProperty(ZI,"__esModule",{value:!0});ZI.VERSION=void 0;ZI.VERSION="9.1.0"});var Gt=w((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i{(function(r,e){typeof define=="function"&&define.amd?define([],e):typeof _I=="object"&&_I.exports?_I.exports=e():r.regexpToAst=e()})(typeof self<"u"?self:UY,function(){function r(){}r.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},r.prototype.restoreState=function(p){this.idx=p.idx,this.input=p.input,this.groupIdx=p.groupIdx},r.prototype.pattern=function(p){this.idx=0,this.input=p,this.groupIdx=0,this.consumeChar("/");var C=this.disjunction();this.consumeChar("/");for(var y={type:"Flags",loc:{begin:this.idx,end:p.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(y,"global");break;case"i":o(y,"ignoreCase");break;case"m":o(y,"multiLine");break;case"u":o(y,"unicode");break;case"y":o(y,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:y,value:C,loc:this.loc(0)}},r.prototype.disjunction=function(){var p=[],C=this.idx;for(p.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),p.push(this.alternative());return{type:"Disjunction",value:p,loc:this.loc(C)}},r.prototype.alternative=function(){for(var p=[],C=this.idx;this.isTerm();)p.push(this.term());return{type:"Alternative",value:p,loc:this.loc(C)}},r.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},r.prototype.assertion=function(){var p=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(p)};case"$":return{type:"EndAnchor",loc:this.loc(p)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(p)};case"B":return{type:"NonWordBoundary",loc:this.loc(p)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var C;switch(this.popChar()){case"=":C="Lookahead";break;case"!":C="NegativeLookahead";break}a(C);var y=this.disjunction();return this.consumeChar(")"),{type:C,value:y,loc:this.loc(p)}}l()},r.prototype.quantifier=function(p){var C,y=this.idx;switch(this.popChar()){case"*":C={atLeast:0,atMost:1/0};break;case"+":C={atLeast:1,atMost:1/0};break;case"?":C={atLeast:0,atMost:1};break;case"{":var B=this.integerIncludingZero();switch(this.popChar()){case"}":C={atLeast:B,atMost:B};break;case",":var v;this.isDigit()?(v=this.integerIncludingZero(),C={atLeast:B,atMost:v}):C={atLeast:B,atMost:1/0},this.consumeChar("}");break}if(p===!0&&C===void 0)return;a(C);break}if(!(p===!0&&C===void 0))return a(C),this.peekChar(0)==="?"?(this.consumeChar("?"),C.greedy=!1):C.greedy=!0,C.type="Quantifier",C.loc=this.loc(y),C},r.prototype.atom=function(){var p,C=this.idx;switch(this.peekChar()){case".":p=this.dotAll();break;case"\\":p=this.atomEscape();break;case"[":p=this.characterClass();break;case"(":p=this.group();break}return p===void 0&&this.isPatternCharacter()&&(p=this.patternCharacter()),a(p),p.loc=this.loc(C),this.isQuantifier()&&(p.quantifier=this.quantifier()),p},r.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[n(` +`),n("\r"),n("\u2028"),n("\u2029")]}},r.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},r.prototype.decimalEscapeAtom=function(){var p=this.positiveInteger();return{type:"GroupBackReference",value:p}},r.prototype.characterClassEscape=function(){var p,C=!1;switch(this.popChar()){case"d":p=u;break;case"D":p=u,C=!0;break;case"s":p=f;break;case"S":p=f,C=!0;break;case"w":p=g;break;case"W":p=g,C=!0;break}return a(p),{type:"Set",value:p,complement:C}},r.prototype.controlEscapeAtom=function(){var p;switch(this.popChar()){case"f":p=n("\f");break;case"n":p=n(` +`);break;case"r":p=n("\r");break;case"t":p=n(" ");break;case"v":p=n("\v");break}return a(p),{type:"Character",value:p}},r.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var p=this.popChar();if(/[a-zA-Z]/.test(p)===!1)throw Error("Invalid ");var C=p.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:C}},r.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:n("\0")}},r.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},r.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},r.prototype.identityEscapeAtom=function(){var p=this.popChar();return{type:"Character",value:n(p)}},r.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var p=this.popChar();return{type:"Character",value:n(p)}}},r.prototype.characterClass=function(){var p=[],C=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),C=!0);this.isClassAtom();){var y=this.classAtom(),B=y.type==="Character";if(B&&this.isRangeDash()){this.consumeChar("-");var v=this.classAtom(),D=v.type==="Character";if(D){if(v.value=this.input.length)throw Error("Unexpected end of input");this.idx++},r.prototype.loc=function(p){return{begin:p,end:this.idx}};var e=/[0-9a-fA-F]/,t=/[0-9]/,i=/[1-9]/;function n(p){return p.charCodeAt(0)}function s(p,C){p.length!==void 0?p.forEach(function(y){C.push(y)}):C.push(p)}function o(p,C){if(p[C]===!0)throw"duplicate flag "+C;p[C]=!0}function a(p){if(p===void 0)throw Error("Internal Error - Should never get here!")}function l(){throw Error("Internal Error - Should never get here!")}var c,u=[];for(c=n("0");c<=n("9");c++)u.push(c);var g=[n("_")].concat(u);for(c=n("a");c<=n("z");c++)g.push(c);for(c=n("A");c<=n("Z");c++)g.push(c);var f=[n(" "),n("\f"),n(` +`),n("\r"),n(" "),n("\v"),n(" "),n("\xA0"),n("\u1680"),n("\u2000"),n("\u2001"),n("\u2002"),n("\u2003"),n("\u2004"),n("\u2005"),n("\u2006"),n("\u2007"),n("\u2008"),n("\u2009"),n("\u200A"),n("\u2028"),n("\u2029"),n("\u202F"),n("\u205F"),n("\u3000"),n("\uFEFF")];function h(){}return h.prototype.visitChildren=function(p){for(var C in p){var y=p[C];p.hasOwnProperty(C)&&(y.type!==void 0?this.visit(y):Array.isArray(y)&&y.forEach(function(B){this.visit(B)},this))}},h.prototype.visit=function(p){switch(p.type){case"Pattern":this.visitPattern(p);break;case"Flags":this.visitFlags(p);break;case"Disjunction":this.visitDisjunction(p);break;case"Alternative":this.visitAlternative(p);break;case"StartAnchor":this.visitStartAnchor(p);break;case"EndAnchor":this.visitEndAnchor(p);break;case"WordBoundary":this.visitWordBoundary(p);break;case"NonWordBoundary":this.visitNonWordBoundary(p);break;case"Lookahead":this.visitLookahead(p);break;case"NegativeLookahead":this.visitNegativeLookahead(p);break;case"Character":this.visitCharacter(p);break;case"Set":this.visitSet(p);break;case"Group":this.visitGroup(p);break;case"GroupBackReference":this.visitGroupBackReference(p);break;case"Quantifier":this.visitQuantifier(p);break}this.visitChildren(p)},h.prototype.visitPattern=function(p){},h.prototype.visitFlags=function(p){},h.prototype.visitDisjunction=function(p){},h.prototype.visitAlternative=function(p){},h.prototype.visitStartAnchor=function(p){},h.prototype.visitEndAnchor=function(p){},h.prototype.visitWordBoundary=function(p){},h.prototype.visitNonWordBoundary=function(p){},h.prototype.visitLookahead=function(p){},h.prototype.visitNegativeLookahead=function(p){},h.prototype.visitCharacter=function(p){},h.prototype.visitSet=function(p){},h.prototype.visitGroup=function(p){},h.prototype.visitGroupBackReference=function(p){},h.prototype.visitQuantifier=function(p){},{RegExpParser:r,BaseRegExpVisitor:h,VERSION:"0.5.0"}})});var ty=w(Xg=>{"use strict";Object.defineProperty(Xg,"__esModule",{value:!0});Xg.clearRegExpParserCache=Xg.getRegExpAst=void 0;var IEe=$I(),ey={},yEe=new IEe.RegExpParser;function wEe(r){var e=r.toString();if(ey.hasOwnProperty(e))return ey[e];var t=yEe.pattern(e);return ey[e]=t,t}Xg.getRegExpAst=wEe;function BEe(){ey={}}Xg.clearRegExpParserCache=BEe});var qY=w(Cn=>{"use strict";var bEe=Cn&&Cn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.canMatchCharCode=Cn.firstCharOptimizedIndices=Cn.getOptimizedStartCodesIndices=Cn.failedOptimizationPrefixMsg=void 0;var GY=$I(),gs=Gt(),YY=ty(),xa=Rv(),jY="Complement Sets are not supported for first char optimization";Cn.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: +`;function QEe(r,e){e===void 0&&(e=!1);try{var t=(0,YY.getRegExpAst)(r),i=iy(t.value,{},t.flags.ignoreCase);return i}catch(s){if(s.message===jY)e&&(0,gs.PRINT_WARNING)(""+Cn.failedOptimizationPrefixMsg+(" Unable to optimize: < "+r.toString()+` > +`)+` Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var n="";e&&(n=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,gs.PRINT_ERROR)(Cn.failedOptimizationPrefixMsg+` +`+(" Failed parsing: < "+r.toString()+` > +`)+(" Using the regexp-to-ast library version: "+GY.VERSION+` +`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}Cn.getOptimizedStartCodesIndices=QEe;function iy(r,e,t){switch(r.type){case"Disjunction":for(var i=0;i=xa.minOptimizationVal)for(var f=u.from>=xa.minOptimizationVal?u.from:xa.minOptimizationVal,h=u.to,p=(0,xa.charCodeToOptimizedIndex)(f),C=(0,xa.charCodeToOptimizedIndex)(h),y=p;y<=C;y++)e[y]=y}}});break;case"Group":iy(o.value,e,t);break;default:throw Error("Non Exhaustive Match")}var a=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&kv(o)===!1||o.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return(0,gs.values)(e)}Cn.firstCharOptimizedIndices=iy;function ry(r,e,t){var i=(0,xa.charCodeToOptimizedIndex)(r);e[i]=i,t===!0&&SEe(r,e)}function SEe(r,e){var t=String.fromCharCode(r),i=t.toUpperCase();if(i!==t){var n=(0,xa.charCodeToOptimizedIndex)(i.charCodeAt(0));e[n]=n}else{var s=t.toLowerCase();if(s!==t){var n=(0,xa.charCodeToOptimizedIndex)(s.charCodeAt(0));e[n]=n}}}function HY(r,e){return(0,gs.find)(r.value,function(t){if(typeof t=="number")return(0,gs.contains)(e,t);var i=t;return(0,gs.find)(e,function(n){return i.from<=n&&n<=i.to})!==void 0})}function kv(r){return r.quantifier&&r.quantifier.atLeast===0?!0:r.value?(0,gs.isArray)(r.value)?(0,gs.every)(r.value,kv):kv(r.value):!1}var vEe=function(r){bEe(e,r);function e(t){var i=r.call(this)||this;return i.targetCharCodes=t,i.found=!1,i}return e.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}r.prototype.visitChildren.call(this,t)}},e.prototype.visitCharacter=function(t){(0,gs.contains)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?HY(t,this.targetCharCodes)===void 0&&(this.found=!0):HY(t,this.targetCharCodes)!==void 0&&(this.found=!0)},e}(GY.BaseRegExpVisitor);function xEe(r,e){if(e instanceof RegExp){var t=(0,YY.getRegExpAst)(e),i=new vEe(r);return i.visit(t),i.found}else return(0,gs.find)(e,function(n){return(0,gs.contains)(r,n.charCodeAt(0))})!==void 0}Cn.canMatchCharCode=xEe});var Rv=w(Ve=>{"use strict";var JY=Ve&&Ve.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Ve,"__esModule",{value:!0});Ve.charCodeToOptimizedIndex=Ve.minOptimizationVal=Ve.buildLineBreakIssueMessage=Ve.LineTerminatorOptimizedTester=Ve.isShortPattern=Ve.isCustomPattern=Ve.cloneEmptyGroups=Ve.performWarningRuntimeChecks=Ve.performRuntimeChecks=Ve.addStickyFlag=Ve.addStartOfInput=Ve.findUnreachablePatterns=Ve.findModesThatDoNotExist=Ve.findInvalidGroupType=Ve.findDuplicatePatterns=Ve.findUnsupportedFlags=Ve.findStartOfInputAnchor=Ve.findEmptyMatchRegExps=Ve.findEndOfInputAnchor=Ve.findInvalidPatterns=Ve.findMissingPatterns=Ve.validatePatterns=Ve.analyzeTokenTypes=Ve.enableSticky=Ve.disableSticky=Ve.SUPPORT_STICKY=Ve.MODES=Ve.DEFAULT_MODE=void 0;var WY=$I(),ir=Bd(),xe=Gt(),Zg=qY(),zY=ty(),ko="PATTERN";Ve.DEFAULT_MODE="defaultMode";Ve.MODES="modes";Ve.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function PEe(){Ve.SUPPORT_STICKY=!1}Ve.disableSticky=PEe;function DEe(){Ve.SUPPORT_STICKY=!0}Ve.enableSticky=DEe;function kEe(r,e){e=(0,xe.defaults)(e,{useSticky:Ve.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:function(v,D){return D()}});var t=e.tracer;t("initCharCodeToOptimizedIndexMap",function(){HEe()});var i;t("Reject Lexer.NA",function(){i=(0,xe.reject)(r,function(v){return v[ko]===ir.Lexer.NA})});var n=!1,s;t("Transform Patterns",function(){n=!1,s=(0,xe.map)(i,function(v){var D=v[ko];if((0,xe.isRegExp)(D)){var T=D.source;return T.length===1&&T!=="^"&&T!=="$"&&T!=="."&&!D.ignoreCase?T:T.length===2&&T[0]==="\\"&&!(0,xe.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],T[1])?T[1]:e.useSticky?Tv(D):Nv(D)}else{if((0,xe.isFunction)(D))return n=!0,{exec:D};if((0,xe.has)(D,"exec"))return n=!0,D;if(typeof D=="string"){if(D.length===1)return D;var H=D.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(H);return e.useSticky?Tv(j):Nv(j)}else throw Error("non exhaustive match")}})});var o,a,l,c,u;t("misc mapping",function(){o=(0,xe.map)(i,function(v){return v.tokenTypeIdx}),a=(0,xe.map)(i,function(v){var D=v.GROUP;if(D!==ir.Lexer.SKIPPED){if((0,xe.isString)(D))return D;if((0,xe.isUndefined)(D))return!1;throw Error("non exhaustive match")}}),l=(0,xe.map)(i,function(v){var D=v.LONGER_ALT;if(D){var T=(0,xe.isArray)(D)?(0,xe.map)(D,function(H){return(0,xe.indexOf)(i,H)}):[(0,xe.indexOf)(i,D)];return T}}),c=(0,xe.map)(i,function(v){return v.PUSH_MODE}),u=(0,xe.map)(i,function(v){return(0,xe.has)(v,"POP_MODE")})});var g;t("Line Terminator Handling",function(){var v=Aj(e.lineTerminatorCharacters);g=(0,xe.map)(i,function(D){return!1}),e.positionTracking!=="onlyOffset"&&(g=(0,xe.map)(i,function(D){if((0,xe.has)(D,"LINE_BREAKS"))return D.LINE_BREAKS;if(oj(D,v)===!1)return(0,Zg.canMatchCharCode)(v,D.PATTERN)}))});var f,h,p,C;t("Misc Mapping #2",function(){f=(0,xe.map)(i,Ov),h=(0,xe.map)(s,sj),p=(0,xe.reduce)(i,function(v,D){var T=D.GROUP;return(0,xe.isString)(T)&&T!==ir.Lexer.SKIPPED&&(v[T]=[]),v},{}),C=(0,xe.map)(s,function(v,D){return{pattern:s[D],longerAlt:l[D],canLineTerminator:g[D],isCustom:f[D],short:h[D],group:a[D],push:c[D],pop:u[D],tokenTypeIdx:o[D],tokenType:i[D]}})});var y=!0,B=[];return e.safeMode||t("First Char Optimization",function(){B=(0,xe.reduce)(i,function(v,D,T){if(typeof D.PATTERN=="string"){var H=D.PATTERN.charCodeAt(0),j=Lv(H);Fv(v,j,C[T])}else if((0,xe.isArray)(D.START_CHARS_HINT)){var $;(0,xe.forEach)(D.START_CHARS_HINT,function(W){var _=typeof W=="string"?W.charCodeAt(0):W,A=Lv(_);$!==A&&($=A,Fv(v,A,C[T]))})}else if((0,xe.isRegExp)(D.PATTERN))if(D.PATTERN.unicode)y=!1,e.ensureOptimizations&&(0,xe.PRINT_ERROR)(""+Zg.failedOptimizationPrefixMsg+(" Unable to analyze < "+D.PATTERN.toString()+` > pattern. +`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var V=(0,Zg.getOptimizedStartCodesIndices)(D.PATTERN,e.ensureOptimizations);(0,xe.isEmpty)(V)&&(y=!1),(0,xe.forEach)(V,function(W){Fv(v,W,C[T])})}else e.ensureOptimizations&&(0,xe.PRINT_ERROR)(""+Zg.failedOptimizationPrefixMsg+(" TokenType: <"+D.name+`> is using a custom token pattern without providing parameter. +`)+` This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return v},[])}),t("ArrayPacking",function(){B=(0,xe.packArray)(B)}),{emptyGroups:p,patternIdxToConfig:C,charCodeToPatternIdxToConfig:B,hasCustom:n,canBeOptimized:y}}Ve.analyzeTokenTypes=kEe;function REe(r,e){var t=[],i=VY(r);t=t.concat(i.errors);var n=XY(i.valid),s=n.valid;return t=t.concat(n.errors),t=t.concat(FEe(s)),t=t.concat(rj(s)),t=t.concat(ij(s,e)),t=t.concat(nj(s)),t}Ve.validatePatterns=REe;function FEe(r){var e=[],t=(0,xe.filter)(r,function(i){return(0,xe.isRegExp)(i[ko])});return e=e.concat(ZY(t)),e=e.concat($Y(t)),e=e.concat(ej(t)),e=e.concat(tj(t)),e=e.concat(_Y(t)),e}function VY(r){var e=(0,xe.filter)(r,function(n){return!(0,xe.has)(n,ko)}),t=(0,xe.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:ir.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[n]}}),i=(0,xe.difference)(r,e);return{errors:t,valid:i}}Ve.findMissingPatterns=VY;function XY(r){var e=(0,xe.filter)(r,function(n){var s=n[ko];return!(0,xe.isRegExp)(s)&&!(0,xe.isFunction)(s)&&!(0,xe.has)(s,"exec")&&!(0,xe.isString)(s)}),t=(0,xe.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ir.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[n]}}),i=(0,xe.difference)(r,e);return{errors:t,valid:i}}Ve.findInvalidPatterns=XY;var NEe=/[^\\][\$]/;function ZY(r){var e=function(n){JY(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitEndAnchor=function(o){this.found=!0},s}(WY.BaseRegExpVisitor),t=(0,xe.filter)(r,function(n){var s=n[ko];try{var o=(0,zY.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return NEe.test(s.source)}}),i=(0,xe.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Ve.findEndOfInputAnchor=ZY;function _Y(r){var e=(0,xe.filter)(r,function(i){var n=i[ko];return n.test("")}),t=(0,xe.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:ir.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[i]}});return t}Ve.findEmptyMatchRegExps=_Y;var TEe=/[^\\[][\^]|^\^/;function $Y(r){var e=function(n){JY(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitStartAnchor=function(o){this.found=!0},s}(WY.BaseRegExpVisitor),t=(0,xe.filter)(r,function(n){var s=n[ko];try{var o=(0,zY.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return TEe.test(s.source)}}),i=(0,xe.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Ve.findStartOfInputAnchor=$Y;function ej(r){var e=(0,xe.filter)(r,function(i){var n=i[ko];return n instanceof RegExp&&(n.multiline||n.global)}),t=(0,xe.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ir.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}});return t}Ve.findUnsupportedFlags=ej;function tj(r){var e=[],t=(0,xe.map)(r,function(s){return(0,xe.reduce)(r,function(o,a){return s.PATTERN.source===a.PATTERN.source&&!(0,xe.contains)(e,a)&&a.PATTERN!==ir.Lexer.NA&&(e.push(a),o.push(a)),o},[])});t=(0,xe.compact)(t);var i=(0,xe.filter)(t,function(s){return s.length>1}),n=(0,xe.map)(i,function(s){var o=(0,xe.map)(s,function(l){return l.name}),a=(0,xe.first)(s).PATTERN;return{message:"The same RegExp pattern ->"+a+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:ir.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}});return n}Ve.findDuplicatePatterns=tj;function rj(r){var e=(0,xe.filter)(r,function(i){if(!(0,xe.has)(i,"GROUP"))return!1;var n=i.GROUP;return n!==ir.Lexer.SKIPPED&&n!==ir.Lexer.NA&&!(0,xe.isString)(n)}),t=(0,xe.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ir.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}});return t}Ve.findInvalidGroupType=rj;function ij(r,e){var t=(0,xe.filter)(r,function(n){return n.PUSH_MODE!==void 0&&!(0,xe.contains)(e,n.PUSH_MODE)}),i=(0,xe.map)(t,function(n){var s="Token Type: ->"+n.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+n.PUSH_MODE+"<-which does not exist";return{message:s,type:ir.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}});return i}Ve.findModesThatDoNotExist=ij;function nj(r){var e=[],t=(0,xe.reduce)(r,function(i,n,s){var o=n.PATTERN;return o===ir.Lexer.NA||((0,xe.isString)(o)?i.push({str:o,idx:s,tokenType:n}):(0,xe.isRegExp)(o)&&OEe(o)&&i.push({str:o.source,idx:s,tokenType:n})),i},[]);return(0,xe.forEach)(r,function(i,n){(0,xe.forEach)(t,function(s){var o=s.str,a=s.idx,l=s.tokenType;if(n"+i.name+"<-")+`in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:ir.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),e}Ve.findUnreachablePatterns=nj;function LEe(r,e){if((0,xe.isRegExp)(e)){var t=e.exec(r);return t!==null&&t.index===0}else{if((0,xe.isFunction)(e))return e(r,0,[],{});if((0,xe.has)(e,"exec"))return e.exec(r,0,[],{});if(typeof e=="string")return e===r;throw Error("non exhaustive match")}}function OEe(r){var e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,xe.find)(e,function(t){return r.source.indexOf(t)!==-1})===void 0}function Nv(r){var e=r.ignoreCase?"i":"";return new RegExp("^(?:"+r.source+")",e)}Ve.addStartOfInput=Nv;function Tv(r){var e=r.ignoreCase?"iy":"y";return new RegExp(""+r.source,e)}Ve.addStickyFlag=Tv;function MEe(r,e,t){var i=[];return(0,xe.has)(r,Ve.DEFAULT_MODE)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ve.DEFAULT_MODE+`> property in its definition +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,xe.has)(r,Ve.MODES)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ve.MODES+`> property in its definition +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,xe.has)(r,Ve.MODES)&&(0,xe.has)(r,Ve.DEFAULT_MODE)&&!(0,xe.has)(r.modes,r.defaultMode)&&i.push({message:"A MultiMode Lexer cannot be initialized with a "+Ve.DEFAULT_MODE+": <"+r.defaultMode+`>which does not exist +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,xe.has)(r,Ve.MODES)&&(0,xe.forEach)(r.modes,function(n,s){(0,xe.forEach)(n,function(o,a){(0,xe.isUndefined)(o)&&i.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+s+"> at index: <"+a+`> +`),type:ir.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),i}Ve.performRuntimeChecks=MEe;function KEe(r,e,t){var i=[],n=!1,s=(0,xe.compact)((0,xe.flatten)((0,xe.mapValues)(r.modes,function(l){return l}))),o=(0,xe.reject)(s,function(l){return l[ko]===ir.Lexer.NA}),a=Aj(t);return e&&(0,xe.forEach)(o,function(l){var c=oj(l,a);if(c!==!1){var u=aj(l,c),g={message:u,type:c.issue,tokenType:l};i.push(g)}else(0,xe.has)(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(n=!0):(0,Zg.canMatchCharCode)(a,l.PATTERN)&&(n=!0)}),e&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:ir.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),i}Ve.performWarningRuntimeChecks=KEe;function UEe(r){var e={},t=(0,xe.keys)(r);return(0,xe.forEach)(t,function(i){var n=r[i];if((0,xe.isArray)(n))e[i]=[];else throw Error("non exhaustive match")}),e}Ve.cloneEmptyGroups=UEe;function Ov(r){var e=r.PATTERN;if((0,xe.isRegExp)(e))return!1;if((0,xe.isFunction)(e))return!0;if((0,xe.has)(e,"exec"))return!0;if((0,xe.isString)(e))return!1;throw Error("non exhaustive match")}Ve.isCustomPattern=Ov;function sj(r){return(0,xe.isString)(r)&&r.length===1?r.charCodeAt(0):!1}Ve.isShortPattern=sj;Ve.LineTerminatorOptimizedTester={test:function(r){for(var e=r.length,t=this.lastIndex;t Token Type +`)+(" Root cause: "+e.errMsg+`. +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===ir.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. +`+(" The problem is in the <"+r.name+`> Token Type +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}Ve.buildLineBreakIssueMessage=aj;function Aj(r){var e=(0,xe.map)(r,function(t){return(0,xe.isString)(t)&&t.length>0?t.charCodeAt(0):t});return e}function Fv(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}Ve.minOptimizationVal=256;var ny=[];function Lv(r){return r255?255+~~(r/255):r}}});var _g=w(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.isTokenType=Nt.hasExtendingTokensTypesMapProperty=Nt.hasExtendingTokensTypesProperty=Nt.hasCategoriesProperty=Nt.hasShortKeyProperty=Nt.singleAssignCategoriesToksMap=Nt.assignCategoriesMapProp=Nt.assignCategoriesTokensProp=Nt.assignTokenDefaultProps=Nt.expandCategories=Nt.augmentTokenTypes=Nt.tokenIdxToClass=Nt.tokenShortNameIdx=Nt.tokenStructuredMatcherNoCategories=Nt.tokenStructuredMatcher=void 0;var Zr=Gt();function GEe(r,e){var t=r.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}Nt.tokenStructuredMatcher=GEe;function YEe(r,e){return r.tokenTypeIdx===e.tokenTypeIdx}Nt.tokenStructuredMatcherNoCategories=YEe;Nt.tokenShortNameIdx=1;Nt.tokenIdxToClass={};function jEe(r){var e=lj(r);cj(e),gj(e),uj(e),(0,Zr.forEach)(e,function(t){t.isParent=t.categoryMatches.length>0})}Nt.augmentTokenTypes=jEe;function lj(r){for(var e=(0,Zr.cloneArr)(r),t=r,i=!0;i;){t=(0,Zr.compact)((0,Zr.flatten)((0,Zr.map)(t,function(s){return s.CATEGORIES})));var n=(0,Zr.difference)(t,e);e=e.concat(n),(0,Zr.isEmpty)(n)?i=!1:t=n}return e}Nt.expandCategories=lj;function cj(r){(0,Zr.forEach)(r,function(e){fj(e)||(Nt.tokenIdxToClass[Nt.tokenShortNameIdx]=e,e.tokenTypeIdx=Nt.tokenShortNameIdx++),Mv(e)&&!(0,Zr.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Mv(e)||(e.CATEGORIES=[]),hj(e)||(e.categoryMatches=[]),pj(e)||(e.categoryMatchesMap={})})}Nt.assignTokenDefaultProps=cj;function uj(r){(0,Zr.forEach)(r,function(e){e.categoryMatches=[],(0,Zr.forEach)(e.categoryMatchesMap,function(t,i){e.categoryMatches.push(Nt.tokenIdxToClass[i].tokenTypeIdx)})})}Nt.assignCategoriesTokensProp=uj;function gj(r){(0,Zr.forEach)(r,function(e){Kv([],e)})}Nt.assignCategoriesMapProp=gj;function Kv(r,e){(0,Zr.forEach)(r,function(t){e.categoryMatchesMap[t.tokenTypeIdx]=!0}),(0,Zr.forEach)(e.CATEGORIES,function(t){var i=r.concat(e);(0,Zr.contains)(i,t)||Kv(i,t)})}Nt.singleAssignCategoriesToksMap=Kv;function fj(r){return(0,Zr.has)(r,"tokenTypeIdx")}Nt.hasShortKeyProperty=fj;function Mv(r){return(0,Zr.has)(r,"CATEGORIES")}Nt.hasCategoriesProperty=Mv;function hj(r){return(0,Zr.has)(r,"categoryMatches")}Nt.hasExtendingTokensTypesProperty=hj;function pj(r){return(0,Zr.has)(r,"categoryMatchesMap")}Nt.hasExtendingTokensTypesMapProperty=pj;function qEe(r){return(0,Zr.has)(r,"tokenTypeIdx")}Nt.isTokenType=qEe});var Uv=w(sy=>{"use strict";Object.defineProperty(sy,"__esModule",{value:!0});sy.defaultLexerErrorProvider=void 0;sy.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(r){return"Unable to pop Lexer Mode after encountering Token ->"+r.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(r,e,t,i,n){return"unexpected character: ->"+r.charAt(e)+"<- at offset: "+e+","+(" skipped "+t+" characters.")}}});var Bd=w(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.Lexer=Cc.LexerDefinitionErrorType=void 0;var _s=Rv(),nr=Gt(),JEe=_g(),WEe=Uv(),zEe=ty(),VEe;(function(r){r[r.MISSING_PATTERN=0]="MISSING_PATTERN",r[r.INVALID_PATTERN=1]="INVALID_PATTERN",r[r.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",r[r.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",r[r.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",r[r.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",r[r.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",r[r.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",r[r.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",r[r.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",r[r.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",r[r.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",r[r.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",r[r.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",r[r.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",r[r.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",r[r.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(VEe=Cc.LexerDefinitionErrorType||(Cc.LexerDefinitionErrorType={}));var bd={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:WEe.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(bd);var XEe=function(){function r(e,t){var i=this;if(t===void 0&&(t=bd),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=(0,nr.merge)(bd,t);var n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var s,o=!0;i.TRACE_INIT("Lexer Config handling",function(){if(i.config.lineTerminatorsPattern===bd.lineTerminatorsPattern)i.config.lineTerminatorsPattern=_s.LineTerminatorOptimizedTester;else if(i.config.lineTerminatorCharacters===bd.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');i.trackStartLines=/full|onlyStart/i.test(i.config.positionTracking),i.trackEndLines=/full/i.test(i.config.positionTracking),(0,nr.isArray)(e)?(s={modes:{}},s.modes[_s.DEFAULT_MODE]=(0,nr.cloneArr)(e),s[_s.DEFAULT_MODE]=_s.DEFAULT_MODE):(o=!1,s=(0,nr.cloneObj)(e))}),i.config.skipValidations===!1&&(i.TRACE_INIT("performRuntimeChecks",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,_s.performRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))}),i.TRACE_INIT("performWarningRuntimeChecks",function(){i.lexerDefinitionWarning=i.lexerDefinitionWarning.concat((0,_s.performWarningRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))})),s.modes=s.modes?s.modes:{},(0,nr.forEach)(s.modes,function(u,g){s.modes[g]=(0,nr.reject)(u,function(f){return(0,nr.isUndefined)(f)})});var a=(0,nr.keys)(s.modes);if((0,nr.forEach)(s.modes,function(u,g){i.TRACE_INIT("Mode: <"+g+"> processing",function(){if(i.modes.push(g),i.config.skipValidations===!1&&i.TRACE_INIT("validatePatterns",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,_s.validatePatterns)(u,a))}),(0,nr.isEmpty)(i.lexerDefinitionErrors)){(0,JEe.augmentTokenTypes)(u);var f;i.TRACE_INIT("analyzeTokenTypes",function(){f=(0,_s.analyzeTokenTypes)(u,{lineTerminatorCharacters:i.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:i.TRACE_INIT.bind(i)})}),i.patternIdxToConfig[g]=f.patternIdxToConfig,i.charCodeToPatternIdxToConfig[g]=f.charCodeToPatternIdxToConfig,i.emptyGroups=(0,nr.merge)(i.emptyGroups,f.emptyGroups),i.hasCustom=f.hasCustom||i.hasCustom,i.canModeBeOptimized[g]=f.canBeOptimized}})}),i.defaultMode=s.defaultMode,!(0,nr.isEmpty)(i.lexerDefinitionErrors)&&!i.config.deferDefinitionErrorsHandling){var l=(0,nr.map)(i.lexerDefinitionErrors,function(u){return u.message}),c=l.join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+c)}(0,nr.forEach)(i.lexerDefinitionWarning,function(u){(0,nr.PRINT_WARNING)(u.message)}),i.TRACE_INIT("Choosing sub-methods implementations",function(){if(_s.SUPPORT_STICKY?(i.chopInput=nr.IDENTITY,i.match=i.matchWithTest):(i.updateLastIndex=nr.NOOP,i.match=i.matchWithExec),o&&(i.handleModes=nr.NOOP),i.trackStartLines===!1&&(i.computeNewColumn=nr.IDENTITY),i.trackEndLines===!1&&(i.updateTokenEndLineColumnLocation=nr.NOOP),/full/i.test(i.config.positionTracking))i.createTokenInstance=i.createFullToken;else if(/onlyStart/i.test(i.config.positionTracking))i.createTokenInstance=i.createStartOnlyToken;else if(/onlyOffset/i.test(i.config.positionTracking))i.createTokenInstance=i.createOffsetOnlyToken;else throw Error('Invalid config option: "'+i.config.positionTracking+'"');i.hasCustom?(i.addToken=i.addTokenUsingPush,i.handlePayload=i.handlePayloadWithCustom):(i.addToken=i.addTokenUsingMemberAccess,i.handlePayload=i.handlePayloadNoCustom)}),i.TRACE_INIT("Failed Optimization Warnings",function(){var u=(0,nr.reduce)(i.canModeBeOptimized,function(g,f,h){return f===!1&&g.push(h),g},[]);if(t.ensureOptimizations&&!(0,nr.isEmpty)(u))throw Error("Lexer Modes: < "+u.join(", ")+` > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),i.TRACE_INIT("clearRegExpParserCache",function(){(0,zEe.clearRegExpParserCache)()}),i.TRACE_INIT("toFastProperties",function(){(0,nr.toFastProperties)(i)})})}return r.prototype.tokenize=function(e,t){if(t===void 0&&(t=this.defaultMode),!(0,nr.isEmpty)(this.lexerDefinitionErrors)){var i=(0,nr.map)(this.lexerDefinitionErrors,function(o){return o.message}),n=i.join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+n)}var s=this.tokenizeInternal(e,t);return s},r.prototype.tokenizeInternal=function(e,t){var i=this,n,s,o,a,l,c,u,g,f,h,p,C,y,B,v,D,T=e,H=T.length,j=0,$=0,V=this.hasCustom?0:Math.floor(e.length/10),W=new Array(V),_=[],A=this.trackStartLines?1:void 0,Ae=this.trackStartLines?1:void 0,ge=(0,_s.cloneEmptyGroups)(this.emptyGroups),re=this.trackStartLines,O=this.config.lineTerminatorsPattern,F=0,ue=[],pe=[],ke=[],Fe=[];Object.freeze(Fe);var Ne=void 0;function oe(){return ue}function le(pr){var Ii=(0,_s.charCodeToOptimizedIndex)(pr),rs=pe[Ii];return rs===void 0?Fe:rs}var Be=function(pr){if(ke.length===1&&pr.tokenType.PUSH_MODE===void 0){var Ii=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(pr);_.push({offset:pr.startOffset,line:pr.startLine!==void 0?pr.startLine:void 0,column:pr.startColumn!==void 0?pr.startColumn:void 0,length:pr.image.length,message:Ii})}else{ke.pop();var rs=(0,nr.last)(ke);ue=i.patternIdxToConfig[rs],pe=i.charCodeToPatternIdxToConfig[rs],F=ue.length;var fa=i.canModeBeOptimized[rs]&&i.config.safeMode===!1;pe&&fa?Ne=le:Ne=oe}};function fe(pr){ke.push(pr),pe=this.charCodeToPatternIdxToConfig[pr],ue=this.patternIdxToConfig[pr],F=ue.length,F=ue.length;var Ii=this.canModeBeOptimized[pr]&&this.config.safeMode===!1;pe&&Ii?Ne=le:Ne=oe}fe.call(this,t);for(var ae;jc.length){c=a,u=g,ae=_e;break}}}break}}if(c!==null){if(f=c.length,h=ae.group,h!==void 0&&(p=ae.tokenTypeIdx,C=this.createTokenInstance(c,j,p,ae.tokenType,A,Ae,f),this.handlePayload(C,u),h===!1?$=this.addToken(W,$,C):ge[h].push(C)),e=this.chopInput(e,f),j=j+f,Ae=this.computeNewColumn(Ae,f),re===!0&&ae.canLineTerminator===!0){var It=0,Or=void 0,ii=void 0;O.lastIndex=0;do Or=O.test(c),Or===!0&&(ii=O.lastIndex-1,It++);while(Or===!0);It!==0&&(A=A+It,Ae=f-ii,this.updateTokenEndLineColumnLocation(C,h,ii,It,A,Ae,f))}this.handleModes(ae,Be,fe,C)}else{for(var gi=j,hr=A,fi=Ae,ni=!1;!ni&&j <"+e+">");var n=(0,nr.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",r.NA=/NOT_APPLICABLE/,r}();Cc.Lexer=XEe});var TA=w(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.tokenMatcher=Qi.createTokenInstance=Qi.EOF=Qi.createToken=Qi.hasTokenLabel=Qi.tokenName=Qi.tokenLabel=void 0;var $s=Gt(),ZEe=Bd(),Hv=_g();function _Ee(r){return bj(r)?r.LABEL:r.name}Qi.tokenLabel=_Ee;function $Ee(r){return r.name}Qi.tokenName=$Ee;function bj(r){return(0,$s.isString)(r.LABEL)&&r.LABEL!==""}Qi.hasTokenLabel=bj;var eIe="parent",dj="categories",Cj="label",mj="group",Ej="push_mode",Ij="pop_mode",yj="longer_alt",wj="line_breaks",Bj="start_chars_hint";function Qj(r){return tIe(r)}Qi.createToken=Qj;function tIe(r){var e=r.pattern,t={};if(t.name=r.name,(0,$s.isUndefined)(e)||(t.PATTERN=e),(0,$s.has)(r,eIe))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,$s.has)(r,dj)&&(t.CATEGORIES=r[dj]),(0,Hv.augmentTokenTypes)([t]),(0,$s.has)(r,Cj)&&(t.LABEL=r[Cj]),(0,$s.has)(r,mj)&&(t.GROUP=r[mj]),(0,$s.has)(r,Ij)&&(t.POP_MODE=r[Ij]),(0,$s.has)(r,Ej)&&(t.PUSH_MODE=r[Ej]),(0,$s.has)(r,yj)&&(t.LONGER_ALT=r[yj]),(0,$s.has)(r,wj)&&(t.LINE_BREAKS=r[wj]),(0,$s.has)(r,Bj)&&(t.START_CHARS_HINT=r[Bj]),t}Qi.EOF=Qj({name:"EOF",pattern:ZEe.Lexer.NA});(0,Hv.augmentTokenTypes)([Qi.EOF]);function rIe(r,e,t,i,n,s,o,a){return{image:e,startOffset:t,endOffset:i,startLine:n,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:r.tokenTypeIdx,tokenType:r}}Qi.createTokenInstance=rIe;function iIe(r,e){return(0,Hv.tokenStructuredMatcher)(r,e)}Qi.tokenMatcher=iIe});var mn=w(zt=>{"use strict";var Pa=zt&&zt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(zt,"__esModule",{value:!0});zt.serializeProduction=zt.serializeGrammar=zt.Terminal=zt.Alternation=zt.RepetitionWithSeparator=zt.Repetition=zt.RepetitionMandatoryWithSeparator=zt.RepetitionMandatory=zt.Option=zt.Alternative=zt.Rule=zt.NonTerminal=zt.AbstractProduction=void 0;var Ar=Gt(),nIe=TA(),Ro=function(){function r(e){this._definition=e}return Object.defineProperty(r.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this),(0,Ar.forEach)(this.definition,function(t){t.accept(e)})},r}();zt.AbstractProduction=Ro;var Sj=function(r){Pa(e,r);function e(t){var i=r.call(this,[])||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(Ro);zt.NonTerminal=Sj;var vj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.orgText="",(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(Ro);zt.Rule=vj;var xj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.ignoreAmbiguities=!1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(Ro);zt.Alternative=xj;var Pj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(Ro);zt.Option=Pj;var Dj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(Ro);zt.RepetitionMandatory=Dj;var kj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(Ro);zt.RepetitionMandatoryWithSeparator=kj;var Rj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(Ro);zt.Repetition=Rj;var Fj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(Ro);zt.RepetitionWithSeparator=Fj;var Nj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,i.ignoreAmbiguities=!1,i.hasPredicates=!1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(Ro);zt.Alternation=Nj;var oy=function(){function r(e){this.idx=1,(0,Ar.assign)(this,(0,Ar.pick)(e,function(t){return t!==void 0}))}return r.prototype.accept=function(e){e.visit(this)},r}();zt.Terminal=oy;function sIe(r){return(0,Ar.map)(r,Qd)}zt.serializeGrammar=sIe;function Qd(r){function e(s){return(0,Ar.map)(s,Qd)}if(r instanceof Sj){var t={type:"NonTerminal",name:r.nonTerminalName,idx:r.idx};return(0,Ar.isString)(r.label)&&(t.label=r.label),t}else{if(r instanceof xj)return{type:"Alternative",definition:e(r.definition)};if(r instanceof Pj)return{type:"Option",idx:r.idx,definition:e(r.definition)};if(r instanceof Dj)return{type:"RepetitionMandatory",idx:r.idx,definition:e(r.definition)};if(r instanceof kj)return{type:"RepetitionMandatoryWithSeparator",idx:r.idx,separator:Qd(new oy({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof Fj)return{type:"RepetitionWithSeparator",idx:r.idx,separator:Qd(new oy({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof Rj)return{type:"Repetition",idx:r.idx,definition:e(r.definition)};if(r instanceof Nj)return{type:"Alternation",idx:r.idx,definition:e(r.definition)};if(r instanceof oy){var i={type:"Terminal",name:r.terminalType.name,label:(0,nIe.tokenLabel)(r.terminalType),idx:r.idx};(0,Ar.isString)(r.label)&&(i.terminalLabel=r.label);var n=r.terminalType.PATTERN;return r.terminalType.PATTERN&&(i.pattern=(0,Ar.isRegExp)(n)?n.source:n),i}else{if(r instanceof vj)return{type:"Rule",name:r.name,orgText:r.orgText,definition:e(r.definition)};throw Error("non exhaustive match")}}}zt.serializeProduction=Qd});var Ay=w(ay=>{"use strict";Object.defineProperty(ay,"__esModule",{value:!0});ay.RestWalker=void 0;var Gv=Gt(),En=mn(),oIe=function(){function r(){}return r.prototype.walk=function(e,t){var i=this;t===void 0&&(t=[]),(0,Gv.forEach)(e.definition,function(n,s){var o=(0,Gv.drop)(e.definition,s+1);if(n instanceof En.NonTerminal)i.walkProdRef(n,o,t);else if(n instanceof En.Terminal)i.walkTerminal(n,o,t);else if(n instanceof En.Alternative)i.walkFlat(n,o,t);else if(n instanceof En.Option)i.walkOption(n,o,t);else if(n instanceof En.RepetitionMandatory)i.walkAtLeastOne(n,o,t);else if(n instanceof En.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(n,o,t);else if(n instanceof En.RepetitionWithSeparator)i.walkManySep(n,o,t);else if(n instanceof En.Repetition)i.walkMany(n,o,t);else if(n instanceof En.Alternation)i.walkOr(n,o,t);else throw Error("non exhaustive match")})},r.prototype.walkTerminal=function(e,t,i){},r.prototype.walkProdRef=function(e,t,i){},r.prototype.walkFlat=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkOption=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkAtLeastOne=function(e,t,i){var n=[new En.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkAtLeastOneSep=function(e,t,i){var n=Tj(e,t,i);this.walk(e,n)},r.prototype.walkMany=function(e,t,i){var n=[new En.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkManySep=function(e,t,i){var n=Tj(e,t,i);this.walk(e,n)},r.prototype.walkOr=function(e,t,i){var n=this,s=t.concat(i);(0,Gv.forEach)(e.definition,function(o){var a=new En.Alternative({definition:[o]});n.walk(a,s)})},r}();ay.RestWalker=oIe;function Tj(r,e,t){var i=[new En.Option({definition:[new En.Terminal({terminalType:r.separator})].concat(r.definition)})],n=i.concat(e,t);return n}});var $g=w(ly=>{"use strict";Object.defineProperty(ly,"__esModule",{value:!0});ly.GAstVisitor=void 0;var Fo=mn(),aIe=function(){function r(){}return r.prototype.visit=function(e){var t=e;switch(t.constructor){case Fo.NonTerminal:return this.visitNonTerminal(t);case Fo.Alternative:return this.visitAlternative(t);case Fo.Option:return this.visitOption(t);case Fo.RepetitionMandatory:return this.visitRepetitionMandatory(t);case Fo.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(t);case Fo.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(t);case Fo.Repetition:return this.visitRepetition(t);case Fo.Alternation:return this.visitAlternation(t);case Fo.Terminal:return this.visitTerminal(t);case Fo.Rule:return this.visitRule(t);default:throw Error("non exhaustive match")}},r.prototype.visitNonTerminal=function(e){},r.prototype.visitAlternative=function(e){},r.prototype.visitOption=function(e){},r.prototype.visitRepetition=function(e){},r.prototype.visitRepetitionMandatory=function(e){},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){},r.prototype.visitRepetitionWithSeparator=function(e){},r.prototype.visitAlternation=function(e){},r.prototype.visitTerminal=function(e){},r.prototype.visitRule=function(e){},r}();ly.GAstVisitor=aIe});var vd=w(Mi=>{"use strict";var AIe=Mi&&Mi.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.collectMethods=Mi.DslMethodsCollectorVisitor=Mi.getProductionDslName=Mi.isBranchingProd=Mi.isOptionalProd=Mi.isSequenceProd=void 0;var Sd=Gt(),br=mn(),lIe=$g();function cIe(r){return r instanceof br.Alternative||r instanceof br.Option||r instanceof br.Repetition||r instanceof br.RepetitionMandatory||r instanceof br.RepetitionMandatoryWithSeparator||r instanceof br.RepetitionWithSeparator||r instanceof br.Terminal||r instanceof br.Rule}Mi.isSequenceProd=cIe;function Yv(r,e){e===void 0&&(e=[]);var t=r instanceof br.Option||r instanceof br.Repetition||r instanceof br.RepetitionWithSeparator;return t?!0:r instanceof br.Alternation?(0,Sd.some)(r.definition,function(i){return Yv(i,e)}):r instanceof br.NonTerminal&&(0,Sd.contains)(e,r)?!1:r instanceof br.AbstractProduction?(r instanceof br.NonTerminal&&e.push(r),(0,Sd.every)(r.definition,function(i){return Yv(i,e)})):!1}Mi.isOptionalProd=Yv;function uIe(r){return r instanceof br.Alternation}Mi.isBranchingProd=uIe;function gIe(r){if(r instanceof br.NonTerminal)return"SUBRULE";if(r instanceof br.Option)return"OPTION";if(r instanceof br.Alternation)return"OR";if(r instanceof br.RepetitionMandatory)return"AT_LEAST_ONE";if(r instanceof br.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(r instanceof br.RepetitionWithSeparator)return"MANY_SEP";if(r instanceof br.Repetition)return"MANY";if(r instanceof br.Terminal)return"CONSUME";throw Error("non exhaustive match")}Mi.getProductionDslName=gIe;var Lj=function(r){AIe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var i=t.terminalType.name+this.separator+"Terminal";(0,Sd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitNonTerminal=function(t){var i=t.nonTerminalName+this.separator+"Terminal";(0,Sd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(lIe.GAstVisitor);Mi.DslMethodsCollectorVisitor=Lj;var cy=new Lj;function fIe(r){cy.reset(),r.accept(cy);var e=cy.dslMethods;return cy.reset(),e}Mi.collectMethods=fIe});var qv=w(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.firstForTerminal=No.firstForBranching=No.firstForSequence=No.first=void 0;var uy=Gt(),Oj=mn(),jv=vd();function gy(r){if(r instanceof Oj.NonTerminal)return gy(r.referencedRule);if(r instanceof Oj.Terminal)return Uj(r);if((0,jv.isSequenceProd)(r))return Mj(r);if((0,jv.isBranchingProd)(r))return Kj(r);throw Error("non exhaustive match")}No.first=gy;function Mj(r){for(var e=[],t=r.definition,i=0,n=t.length>i,s,o=!0;n&&o;)s=t[i],o=(0,jv.isOptionalProd)(s),e=e.concat(gy(s)),i=i+1,n=t.length>i;return(0,uy.uniq)(e)}No.firstForSequence=Mj;function Kj(r){var e=(0,uy.map)(r.definition,function(t){return gy(t)});return(0,uy.uniq)((0,uy.flatten)(e))}No.firstForBranching=Kj;function Uj(r){return[r.terminalType]}No.firstForTerminal=Uj});var Jv=w(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});fy.IN=void 0;fy.IN="_~IN~_"});var qj=w(fs=>{"use strict";var hIe=fs&&fs.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(fs,"__esModule",{value:!0});fs.buildInProdFollowPrefix=fs.buildBetweenProdsFollowPrefix=fs.computeAllProdsFollows=fs.ResyncFollowsWalker=void 0;var pIe=Ay(),dIe=qv(),Hj=Gt(),Gj=Jv(),CIe=mn(),Yj=function(r){hIe(e,r);function e(t){var i=r.call(this)||this;return i.topProd=t,i.follows={},i}return e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,i,n){},e.prototype.walkProdRef=function(t,i,n){var s=jj(t.referencedRule,t.idx)+this.topProd.name,o=i.concat(n),a=new CIe.Alternative({definition:o}),l=(0,dIe.first)(a);this.follows[s]=l},e}(pIe.RestWalker);fs.ResyncFollowsWalker=Yj;function mIe(r){var e={};return(0,Hj.forEach)(r,function(t){var i=new Yj(t).startWalking();(0,Hj.assign)(e,i)}),e}fs.computeAllProdsFollows=mIe;function jj(r,e){return r.name+e+Gj.IN}fs.buildBetweenProdsFollowPrefix=jj;function EIe(r){var e=r.terminalType.name;return e+r.idx+Gj.IN}fs.buildInProdFollowPrefix=EIe});var xd=w(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.defaultGrammarValidatorErrorProvider=Da.defaultGrammarResolverErrorProvider=Da.defaultParserErrorProvider=void 0;var ef=TA(),IIe=Gt(),eo=Gt(),Wv=mn(),Jj=vd();Da.defaultParserErrorProvider={buildMismatchTokenMessage:function(r){var e=r.expected,t=r.actual,i=r.previous,n=r.ruleName,s=(0,ef.hasTokenLabel)(e),o=s?"--> "+(0,ef.tokenLabel)(e)+" <--":"token of type --> "+e.name+" <--",a="Expecting "+o+" but found --> '"+t.image+"' <--";return a},buildNotAllInputParsedMessage:function(r){var e=r.firstRedundant,t=r.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(r){var e=r.expectedPathsPerAlt,t=r.actual,i=r.previous,n=r.customUserDescription,s=r.ruleName,o="Expecting: ",a=(0,eo.first)(t).image,l=` +but found: '`+a+"'";if(n)return o+n+l;var c=(0,eo.reduce)(e,function(h,p){return h.concat(p)},[]),u=(0,eo.map)(c,function(h){return"["+(0,eo.map)(h,function(p){return(0,ef.tokenLabel)(p)}).join(", ")+"]"}),g=(0,eo.map)(u,function(h,p){return" "+(p+1)+". "+h}),f=`one of these possible Token sequences: +`+g.join(` +`);return o+f+l},buildEarlyExitMessage:function(r){var e=r.expectedIterationPaths,t=r.actual,i=r.customUserDescription,n=r.ruleName,s="Expecting: ",o=(0,eo.first)(t).image,a=` +but found: '`+o+"'";if(i)return s+i+a;var l=(0,eo.map)(e,function(u){return"["+(0,eo.map)(u,function(g){return(0,ef.tokenLabel)(g)}).join(",")+"]"}),c=`expecting at least one iteration which starts with one of these possible Token sequences:: + `+("<"+l.join(" ,")+">");return s+c+a}};Object.freeze(Da.defaultParserErrorProvider);Da.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(r,e){var t="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+r.name+"<-";return t}};Da.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(r,e){function t(u){return u instanceof Wv.Terminal?u.terminalType.name:u instanceof Wv.NonTerminal?u.nonTerminalName:""}var i=r.name,n=(0,eo.first)(e),s=n.idx,o=(0,Jj.getProductionDslName)(n),a=t(n),l=s>0,c="->"+o+(l?s:"")+"<- "+(a?"with argument: ->"+a+"<-":"")+` + appears more than once (`+e.length+" times) in the top level rule: ->"+i+`<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,` +`),c},buildNamespaceConflictError:function(r){var e=`Namespace conflict found in grammar. +`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+r.name+`>. +`)+`To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`;return e},buildAlternationPrefixAmbiguityError:function(r){var e=(0,eo.map)(r.prefixPath,function(n){return(0,ef.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous alternatives: <"+r.ambiguityIndices.join(" ,")+`> due to common lookahead prefix +`+("in inside <"+r.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`;return i},buildAlternationAmbiguityError:function(r){var e=(0,eo.map)(r.prefixPath,function(n){return(0,ef.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous Alternatives Detected: <"+r.ambiguityIndices.join(" ,")+"> in "+(" inside <"+r.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`);return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,i},buildEmptyRepetitionError:function(r){var e=(0,Jj.getProductionDslName)(r.repetition);r.repetition.idx!==0&&(e+=r.repetition.idx);var t="The repetition <"+e+"> within Rule <"+r.topLevelRule.name+`> can never consume any tokens. +This could lead to an infinite loop.`;return t},buildTokenNameError:function(r){return"deprecated"},buildEmptyAlternationError:function(r){var e="Ambiguous empty alternative: <"+(r.emptyChoiceIdx+1)+">"+(" in inside <"+r.topLevelRule.name+`> Rule. +`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(r){var e=`An Alternation cannot have more than 256 alternatives: +`+(" inside <"+r.topLevelRule.name+`> Rule. + has `+(r.alternation.definition.length+1)+" alternatives.");return e},buildLeftRecursionError:function(r){var e=r.topLevelRule.name,t=IIe.map(r.leftRecursionPath,function(s){return s.name}),i=e+" --> "+t.concat([e]).join(" --> "),n=`Left Recursion found in grammar. +`+("rule: <"+e+`> can be invoked from itself (directly or indirectly) +`)+(`without consuming any Tokens. The grammar path that causes this is: + `+i+` +`)+` To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return n},buildInvalidRuleNameError:function(r){return"deprecated"},buildDuplicateRuleNameError:function(r){var e;r.topLevelRule instanceof Wv.Rule?e=r.topLevelRule.name:e=r.topLevelRule;var t="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+r.grammarName+"<-";return t}}});var Vj=w(LA=>{"use strict";var yIe=LA&&LA.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(LA,"__esModule",{value:!0});LA.GastRefResolverVisitor=LA.resolveGrammar=void 0;var wIe=jn(),Wj=Gt(),BIe=$g();function bIe(r,e){var t=new zj(r,e);return t.resolveRefs(),t.errors}LA.resolveGrammar=bIe;var zj=function(r){yIe(e,r);function e(t,i){var n=r.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=i,n.errors=[],n}return e.prototype.resolveRefs=function(){var t=this;(0,Wj.forEach)((0,Wj.values)(this.nameToTopRule),function(i){t.currTopLevel=i,i.accept(t)})},e.prototype.visitNonTerminal=function(t){var i=this.nameToTopRule[t.nonTerminalName];if(i)t.referencedRule=i;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:wIe.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(BIe.GAstVisitor);LA.GastRefResolverVisitor=zj});var Dd=w(Nr=>{"use strict";var mc=Nr&&Nr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.nextPossibleTokensAfter=Nr.possiblePathsFrom=Nr.NextTerminalAfterAtLeastOneSepWalker=Nr.NextTerminalAfterAtLeastOneWalker=Nr.NextTerminalAfterManySepWalker=Nr.NextTerminalAfterManyWalker=Nr.AbstractNextTerminalAfterProductionWalker=Nr.NextAfterTokenWalker=Nr.AbstractNextPossibleTokensWalker=void 0;var Xj=Ay(),Kt=Gt(),QIe=qv(),kt=mn(),Zj=function(r){mc(e,r);function e(t,i){var n=r.call(this)||this;return n.topProd=t,n.path=i,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,Kt.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,Kt.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(t,i){i===void 0&&(i=[]),this.found||r.prototype.walk.call(this,t,i)},e.prototype.walkProdRef=function(t,i,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var s=i.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,s)}},e.prototype.updateExpectedNext=function(){(0,Kt.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(Xj.RestWalker);Nr.AbstractNextPossibleTokensWalker=Zj;var SIe=function(r){mc(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.path=i,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e.prototype.walkTerminal=function(t,i,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var s=i.concat(n),o=new kt.Alternative({definition:s});this.possibleTokTypes=(0,QIe.first)(o),this.found=!0}},e}(Zj);Nr.NextAfterTokenWalker=SIe;var Pd=function(r){mc(e,r);function e(t,i){var n=r.call(this)||this;return n.topRule=t,n.occurrence=i,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(Xj.RestWalker);Nr.AbstractNextTerminalAfterProductionWalker=Pd;var vIe=function(r){mc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkMany=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkMany.call(this,t,i,n)},e}(Pd);Nr.NextTerminalAfterManyWalker=vIe;var xIe=function(r){mc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkManySep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkManySep.call(this,t,i,n)},e}(Pd);Nr.NextTerminalAfterManySepWalker=xIe;var PIe=function(r){mc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOne=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOne.call(this,t,i,n)},e}(Pd);Nr.NextTerminalAfterAtLeastOneWalker=PIe;var DIe=function(r){mc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOneSep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOneSep.call(this,t,i,n)},e}(Pd);Nr.NextTerminalAfterAtLeastOneSepWalker=DIe;function _j(r,e,t){t===void 0&&(t=[]),t=(0,Kt.cloneArr)(t);var i=[],n=0;function s(c){return c.concat((0,Kt.drop)(r,n+1))}function o(c){var u=_j(s(c),e,t);return i.concat(u)}for(;t.length=0;ge--){var re=B.definition[ge],O={idx:p,def:re.definition.concat((0,Kt.drop)(h)),ruleStack:C,occurrenceStack:y};g.push(O),g.push(o)}else if(B instanceof kt.Alternative)g.push({idx:p,def:B.definition.concat((0,Kt.drop)(h)),ruleStack:C,occurrenceStack:y});else if(B instanceof kt.Rule)g.push(RIe(B,p,C,y));else throw Error("non exhaustive match")}}return u}Nr.nextPossibleTokensAfter=kIe;function RIe(r,e,t,i){var n=(0,Kt.cloneArr)(t);n.push(r.name);var s=(0,Kt.cloneArr)(i);return s.push(1),{idx:e,def:r.definition,ruleStack:n,occurrenceStack:s}}});var kd=w(Zt=>{"use strict";var tq=Zt&&Zt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.areTokenCategoriesNotUsed=Zt.isStrictPrefixOfPath=Zt.containsPath=Zt.getLookaheadPathsForOptionalProd=Zt.getLookaheadPathsForOr=Zt.lookAheadSequenceFromAlternatives=Zt.buildSingleAlternativeLookaheadFunction=Zt.buildAlternativesLookAheadFunc=Zt.buildLookaheadFuncForOptionalProd=Zt.buildLookaheadFuncForOr=Zt.getProdType=Zt.PROD_TYPE=void 0;var sr=Gt(),$j=Dd(),FIe=Ay(),hy=_g(),OA=mn(),NIe=$g(),oi;(function(r){r[r.OPTION=0]="OPTION",r[r.REPETITION=1]="REPETITION",r[r.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",r[r.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",r[r.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",r[r.ALTERNATION=5]="ALTERNATION"})(oi=Zt.PROD_TYPE||(Zt.PROD_TYPE={}));function TIe(r){if(r instanceof OA.Option)return oi.OPTION;if(r instanceof OA.Repetition)return oi.REPETITION;if(r instanceof OA.RepetitionMandatory)return oi.REPETITION_MANDATORY;if(r instanceof OA.RepetitionMandatoryWithSeparator)return oi.REPETITION_MANDATORY_WITH_SEPARATOR;if(r instanceof OA.RepetitionWithSeparator)return oi.REPETITION_WITH_SEPARATOR;if(r instanceof OA.Alternation)return oi.ALTERNATION;throw Error("non exhaustive match")}Zt.getProdType=TIe;function LIe(r,e,t,i,n,s){var o=iq(r,e,t),a=Xv(o)?hy.tokenStructuredMatcherNoCategories:hy.tokenStructuredMatcher;return s(o,i,a,n)}Zt.buildLookaheadFuncForOr=LIe;function OIe(r,e,t,i,n,s){var o=nq(r,e,n,t),a=Xv(o)?hy.tokenStructuredMatcherNoCategories:hy.tokenStructuredMatcher;return s(o[0],a,i)}Zt.buildLookaheadFuncForOptionalProd=OIe;function MIe(r,e,t,i){var n=r.length,s=(0,sr.every)(r,function(l){return(0,sr.every)(l,function(c){return c.length===1})});if(e)return function(l){for(var c=(0,sr.map)(l,function(D){return D.GATE}),u=0;u{"use strict";var Zv=Vt&&Vt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Vt,"__esModule",{value:!0});Vt.checkPrefixAlternativesAmbiguities=Vt.validateSomeNonEmptyLookaheadPath=Vt.validateTooManyAlts=Vt.RepetionCollector=Vt.validateAmbiguousAlternationAlternatives=Vt.validateEmptyOrAlternative=Vt.getFirstNoneTerminal=Vt.validateNoLeftRecursion=Vt.validateRuleIsOverridden=Vt.validateRuleDoesNotAlreadyExist=Vt.OccurrenceValidationCollector=Vt.identifyProductionForDuplicates=Vt.validateGrammar=void 0;var er=Gt(),Qr=Gt(),To=jn(),_v=vd(),tf=kd(),YIe=Dd(),to=mn(),$v=$g();function jIe(r,e,t,i,n){var s=er.map(r,function(h){return qIe(h,i)}),o=er.map(r,function(h){return ex(h,h,i)}),a=[],l=[],c=[];(0,Qr.every)(o,Qr.isEmpty)&&(a=(0,Qr.map)(r,function(h){return cq(h,i)}),l=(0,Qr.map)(r,function(h){return uq(h,e,i)}),c=hq(r,e,i));var u=zIe(r,t,i),g=(0,Qr.map)(r,function(h){return fq(h,i)}),f=(0,Qr.map)(r,function(h){return lq(h,r,n,i)});return er.flatten(s.concat(c,o,a,l,u,g,f))}Vt.validateGrammar=jIe;function qIe(r,e){var t=new Aq;r.accept(t);var i=t.allProductions,n=er.groupBy(i,oq),s=er.pick(n,function(a){return a.length>1}),o=er.map(er.values(s),function(a){var l=er.first(a),c=e.buildDuplicateFoundError(r,a),u=(0,_v.getProductionDslName)(l),g={message:c,type:To.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:r.name,dslName:u,occurrence:l.idx},f=aq(l);return f&&(g.parameter=f),g});return o}function oq(r){return(0,_v.getProductionDslName)(r)+"_#_"+r.idx+"_#_"+aq(r)}Vt.identifyProductionForDuplicates=oq;function aq(r){return r instanceof to.Terminal?r.terminalType.name:r instanceof to.NonTerminal?r.nonTerminalName:""}var Aq=function(r){Zv(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}($v.GAstVisitor);Vt.OccurrenceValidationCollector=Aq;function lq(r,e,t,i){var n=[],s=(0,Qr.reduce)(e,function(a,l){return l.name===r.name?a+1:a},0);if(s>1){var o=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t});n.push({message:o,type:To.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:r.name})}return n}Vt.validateRuleDoesNotAlreadyExist=lq;function JIe(r,e,t){var i=[],n;return er.contains(e,r)||(n="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+t+"<-as it is not defined in any of the super grammars ",i.push({message:n,type:To.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:r})),i}Vt.validateRuleIsOverridden=JIe;function ex(r,e,t,i){i===void 0&&(i=[]);var n=[],s=Rd(e.definition);if(er.isEmpty(s))return[];var o=r.name,a=er.contains(s,r);a&&n.push({message:t.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:To.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var l=er.difference(s,i.concat([r])),c=er.map(l,function(u){var g=er.cloneArr(i);return g.push(u),ex(r,u,t,g)});return n.concat(er.flatten(c))}Vt.validateNoLeftRecursion=ex;function Rd(r){var e=[];if(er.isEmpty(r))return e;var t=er.first(r);if(t instanceof to.NonTerminal)e.push(t.referencedRule);else if(t instanceof to.Alternative||t instanceof to.Option||t instanceof to.RepetitionMandatory||t instanceof to.RepetitionMandatoryWithSeparator||t instanceof to.RepetitionWithSeparator||t instanceof to.Repetition)e=e.concat(Rd(t.definition));else if(t instanceof to.Alternation)e=er.flatten(er.map(t.definition,function(o){return Rd(o.definition)}));else if(!(t instanceof to.Terminal))throw Error("non exhaustive match");var i=(0,_v.isOptionalProd)(t),n=r.length>1;if(i&&n){var s=er.drop(r);return e.concat(Rd(s))}else return e}Vt.getFirstNoneTerminal=Rd;var tx=function(r){Zv(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.alternations=[],t}return e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}($v.GAstVisitor);function cq(r,e){var t=new tx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){var a=er.dropRight(o.definition),l=er.map(a,function(c,u){var g=(0,YIe.nextPossibleTokensAfter)([c],[],null,1);return er.isEmpty(g)?{message:e.buildEmptyAlternationError({topLevelRule:r,alternation:o,emptyChoiceIdx:u}),type:To.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:r.name,occurrence:o.idx,alternative:u+1}:null});return s.concat(er.compact(l))},[]);return n}Vt.validateEmptyOrAlternative=cq;function uq(r,e,t){var i=new tx;r.accept(i);var n=i.alternations;n=(0,Qr.reject)(n,function(o){return o.ignoreAmbiguities===!0});var s=er.reduce(n,function(o,a){var l=a.idx,c=a.maxLookahead||e,u=(0,tf.getLookaheadPathsForOr)(l,r,c,a),g=WIe(u,a,r,t),f=pq(u,a,r,t);return o.concat(g,f)},[]);return s}Vt.validateAmbiguousAlternationAlternatives=uq;var gq=function(r){Zv(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}($v.GAstVisitor);Vt.RepetionCollector=gq;function fq(r,e){var t=new tx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){return o.definition.length>255&&s.push({message:e.buildTooManyAlternativesError({topLevelRule:r,alternation:o}),type:To.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:r.name,occurrence:o.idx}),s},[]);return n}Vt.validateTooManyAlts=fq;function hq(r,e,t){var i=[];return(0,Qr.forEach)(r,function(n){var s=new gq;n.accept(s);var o=s.allProductions;(0,Qr.forEach)(o,function(a){var l=(0,tf.getProdType)(a),c=a.maxLookahead||e,u=a.idx,g=(0,tf.getLookaheadPathsForOptionalProd)(u,n,l,c),f=g[0];if((0,Qr.isEmpty)((0,Qr.flatten)(f))){var h=t.buildEmptyRepetitionError({topLevelRule:n,repetition:a});i.push({message:h,type:To.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}Vt.validateSomeNonEmptyLookaheadPath=hq;function WIe(r,e,t,i){var n=[],s=(0,Qr.reduce)(r,function(a,l,c){return e.definition[c].ignoreAmbiguities===!0||(0,Qr.forEach)(l,function(u){var g=[c];(0,Qr.forEach)(r,function(f,h){c!==h&&(0,tf.containsPath)(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&g.push(h)}),g.length>1&&!(0,tf.containsPath)(n,u)&&(n.push(u),a.push({alts:g,path:u}))}),a},[]),o=er.map(s,function(a){var l=(0,Qr.map)(a.alts,function(u){return u+1}),c=i.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:l,prefixPath:a.path});return{message:c,type:To.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:[a.alts]}});return o}function pq(r,e,t,i){var n=[],s=(0,Qr.reduce)(r,function(o,a,l){var c=(0,Qr.map)(a,function(u){return{idx:l,path:u}});return o.concat(c)},[]);return(0,Qr.forEach)(s,function(o){var a=e.definition[o.idx];if(a.ignoreAmbiguities!==!0){var l=o.idx,c=o.path,u=(0,Qr.findAll)(s,function(f){return e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.validateGrammar=rf.resolveGrammar=void 0;var ix=Gt(),VIe=Vj(),XIe=rx(),dq=xd();function ZIe(r){r=(0,ix.defaults)(r,{errMsgProvider:dq.defaultGrammarResolverErrorProvider});var e={};return(0,ix.forEach)(r.rules,function(t){e[t.name]=t}),(0,VIe.resolveGrammar)(e,r.errMsgProvider)}rf.resolveGrammar=ZIe;function _Ie(r){return r=(0,ix.defaults)(r,{errMsgProvider:dq.defaultGrammarValidatorErrorProvider}),(0,XIe.validateGrammar)(r.rules,r.maxLookahead,r.tokenTypes,r.errMsgProvider,r.grammarName)}rf.validateGrammar=_Ie});var nf=w(In=>{"use strict";var Fd=In&&In.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(In,"__esModule",{value:!0});In.EarlyExitException=In.NotAllInputParsedException=In.NoViableAltException=In.MismatchedTokenException=In.isRecognitionException=void 0;var $Ie=Gt(),mq="MismatchedTokenException",Eq="NoViableAltException",Iq="EarlyExitException",yq="NotAllInputParsedException",wq=[mq,Eq,Iq,yq];Object.freeze(wq);function eye(r){return(0,$Ie.contains)(wq,r.name)}In.isRecognitionException=eye;var py=function(r){Fd(e,r);function e(t,i){var n=this.constructor,s=r.call(this,t)||this;return s.token=i,s.resyncedTokens=[],Object.setPrototypeOf(s,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,s.constructor),s}return e}(Error),tye=function(r){Fd(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=mq,s}return e}(py);In.MismatchedTokenException=tye;var rye=function(r){Fd(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=Eq,s}return e}(py);In.NoViableAltException=rye;var iye=function(r){Fd(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name=yq,n}return e}(py);In.NotAllInputParsedException=iye;var nye=function(r){Fd(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=Iq,s}return e}(py);In.EarlyExitException=nye});var sx=w(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.attemptInRepetitionRecovery=Ki.Recoverable=Ki.InRuleRecoveryException=Ki.IN_RULE_RECOVERY_EXCEPTION=Ki.EOF_FOLLOW_KEY=void 0;var dy=TA(),hs=Gt(),sye=nf(),oye=Jv(),aye=jn();Ki.EOF_FOLLOW_KEY={};Ki.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function nx(r){this.name=Ki.IN_RULE_RECOVERY_EXCEPTION,this.message=r}Ki.InRuleRecoveryException=nx;nx.prototype=Error.prototype;var Aye=function(){function r(){}return r.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,hs.has)(e,"recoveryEnabled")?e.recoveryEnabled:aye.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Bq)},r.prototype.getTokenToInsert=function(e){var t=(0,dy.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},r.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},r.prototype.tryInRepetitionRecovery=function(e,t,i,n){for(var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),g=this.LA(1),f=function(){var h=s.LA(0),p=s.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:h,ruleName:s.getCurrRuleFullName()}),C=new sye.MismatchedTokenException(p,u,s.LA(0));C.resyncedTokens=(0,hs.dropRight)(l),s.SAVE_ERROR(C)};!c;)if(this.tokenMatcher(g,n)){f();return}else if(i.call(this)){f(),e.apply(this,t);return}else this.tokenMatcher(g,o)?c=!0:(g=this.SKIP_TOKEN(),this.addToResyncTokens(g,l));this.importLexerState(a)},r.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,i){return!(i===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},r.prototype.getFollowsForInRuleRecovery=function(e,t){var i=this.getCurrentGrammarPath(e,t),n=this.getNextPossibleTokenTypes(i);return n},r.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var i=this.getTokenToInsert(e);return i}if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new nx("sad sad panda")},r.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},r.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var i=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,hs.isEmpty)(t))return!1;var n=this.LA(1),s=(0,hs.find)(t,function(o){return i.tokenMatcher(n,o)})!==void 0;return s},r.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},r.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),i=this.getFollowSetFromFollowKey(t);return(0,hs.contains)(i,e)},r.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),i=2;;){var n=t.tokenType;if((0,hs.contains)(e,n))return n;t=this.LA(i),i++}},r.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return Ki.EOF_FOLLOW_KEY;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),i=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(i)}},r.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return(0,hs.map)(t,function(n,s){return s===0?Ki.EOF_FOLLOW_KEY:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:i[s],inRule:e.shortRuleNameToFullName(t[s-1])}})},r.prototype.flattenFollowSet=function(){var e=this,t=(0,hs.map)(this.buildFullFollowKeyStack(),function(i){return e.getFollowSetFromFollowKey(i)});return(0,hs.flatten)(t)},r.prototype.getFollowSetFromFollowKey=function(e){if(e===Ki.EOF_FOLLOW_KEY)return[dy.EOF];var t=e.ruleName+e.idxInCallingRule+oye.IN+e.inRule;return this.resyncFollows[t]},r.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,dy.EOF)||t.push(e),t},r.prototype.reSyncTo=function(e){for(var t=[],i=this.LA(1);this.tokenMatcher(i,e)===!1;)i=this.SKIP_TOKEN(),this.addToResyncTokens(i,t);return(0,hs.dropRight)(t)},r.prototype.attemptInRepetitionRecovery=function(e,t,i,n,s,o,a){},r.prototype.getCurrentGrammarPath=function(e,t){var i=this.getHumanReadableRuleStack(),n=(0,hs.cloneArr)(this.RULE_OCCURRENCE_STACK),s={ruleStack:i,occurrenceStack:n,lastTok:e,lastTokOccurrence:t};return s},r.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,hs.map)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},r}();Ki.Recoverable=Aye;function Bq(r,e,t,i,n,s,o){var a=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[a];if(l===void 0){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],g=new s(u,n);l=g.startWalking(),this.firstAfterRepMap[a]=l}var f=l.token,h=l.occurrence,p=l.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=dy.EOF,h=1),this.shouldInRepetitionRecoveryBeTried(f,h,o)&&this.tryInRepetitionRecovery(r,e,t,f)}Ki.attemptInRepetitionRecovery=Bq});var Cy=w(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.getKeyForAutomaticLookahead=Jt.AT_LEAST_ONE_SEP_IDX=Jt.MANY_SEP_IDX=Jt.AT_LEAST_ONE_IDX=Jt.MANY_IDX=Jt.OPTION_IDX=Jt.OR_IDX=Jt.BITS_FOR_ALT_IDX=Jt.BITS_FOR_RULE_IDX=Jt.BITS_FOR_OCCURRENCE_IDX=Jt.BITS_FOR_METHOD_TYPE=void 0;Jt.BITS_FOR_METHOD_TYPE=4;Jt.BITS_FOR_OCCURRENCE_IDX=8;Jt.BITS_FOR_RULE_IDX=12;Jt.BITS_FOR_ALT_IDX=8;Jt.OR_IDX=1<{"use strict";Object.defineProperty(my,"__esModule",{value:!0});my.LooksAhead=void 0;var ka=kd(),ro=Gt(),bq=jn(),Ra=Cy(),Ec=vd(),cye=function(){function r(){}return r.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,ro.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:bq.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=(0,ro.has)(e,"maxLookahead")?e.maxLookahead:bq.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=(0,ro.isES2015MapSupported)()?new Map:[],(0,ro.isES2015MapSupported)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},r.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,ro.forEach)(e,function(i){t.TRACE_INIT(i.name+" Rule Lookahead",function(){var n=(0,Ec.collectMethods)(i),s=n.alternation,o=n.repetition,a=n.option,l=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,u=n.repetitionWithSeparator;(0,ro.forEach)(s,function(g){var f=g.idx===0?"":g.idx;t.TRACE_INIT(""+(0,Ec.getProductionDslName)(g)+f,function(){var h=(0,ka.buildLookaheadFuncForOr)(g.idx,i,g.maxLookahead||t.maxLookahead,g.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),p=(0,Ra.getKeyForAutomaticLookahead)(t.fullRuleNameToShort[i.name],Ra.OR_IDX,g.idx);t.setLaFuncCache(p,h)})}),(0,ro.forEach)(o,function(g){t.computeLookaheadFunc(i,g.idx,Ra.MANY_IDX,ka.PROD_TYPE.REPETITION,g.maxLookahead,(0,Ec.getProductionDslName)(g))}),(0,ro.forEach)(a,function(g){t.computeLookaheadFunc(i,g.idx,Ra.OPTION_IDX,ka.PROD_TYPE.OPTION,g.maxLookahead,(0,Ec.getProductionDslName)(g))}),(0,ro.forEach)(l,function(g){t.computeLookaheadFunc(i,g.idx,Ra.AT_LEAST_ONE_IDX,ka.PROD_TYPE.REPETITION_MANDATORY,g.maxLookahead,(0,Ec.getProductionDslName)(g))}),(0,ro.forEach)(c,function(g){t.computeLookaheadFunc(i,g.idx,Ra.AT_LEAST_ONE_SEP_IDX,ka.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,g.maxLookahead,(0,Ec.getProductionDslName)(g))}),(0,ro.forEach)(u,function(g){t.computeLookaheadFunc(i,g.idx,Ra.MANY_SEP_IDX,ka.PROD_TYPE.REPETITION_WITH_SEPARATOR,g.maxLookahead,(0,Ec.getProductionDslName)(g))})})})},r.prototype.computeLookaheadFunc=function(e,t,i,n,s,o){var a=this;this.TRACE_INIT(""+o+(t===0?"":t),function(){var l=(0,ka.buildLookaheadFuncForOptionalProd)(t,e,s||a.maxLookahead,a.dynamicTokensEnabled,n,a.lookAheadBuilderForOptional),c=(0,Ra.getKeyForAutomaticLookahead)(a.fullRuleNameToShort[e.name],i,t);a.setLaFuncCache(c,l)})},r.prototype.lookAheadBuilderForOptional=function(e,t,i){return(0,ka.buildSingleAlternativeLookaheadFunction)(e,t,i)},r.prototype.lookAheadBuilderForAlternatives=function(e,t,i,n){return(0,ka.buildAlternativesLookAheadFunc)(e,t,i,n)},r.prototype.getKeyForAutomaticLookahead=function(e,t){var i=this.getLastExplicitRuleShortName();return(0,Ra.getKeyForAutomaticLookahead)(i,e,t)},r.prototype.getLaFuncFromCache=function(e){},r.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},r.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},r.prototype.setLaFuncCache=function(e,t){},r.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},r.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},r}();my.LooksAhead=cye});var Sq=w(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.addNoneTerminalToCst=Lo.addTerminalToCst=Lo.setNodeLocationFull=Lo.setNodeLocationOnlyOffset=void 0;function uye(r,e){isNaN(r.startOffset)===!0?(r.startOffset=e.startOffset,r.endOffset=e.endOffset):r.endOffset{"use strict";Object.defineProperty(MA,"__esModule",{value:!0});MA.defineNameProp=MA.functionName=MA.classNameFromInstance=void 0;var pye=Gt();function dye(r){return xq(r.constructor)}MA.classNameFromInstance=dye;var vq="name";function xq(r){var e=r.name;return e||"anonymous"}MA.functionName=xq;function Cye(r,e){var t=Object.getOwnPropertyDescriptor(r,vq);return(0,pye.isUndefined)(t)||t.configurable?(Object.defineProperty(r,vq,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0):!1}MA.defineNameProp=Cye});var Fq=w(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.validateRedundantMethods=Si.validateMissingCstMethods=Si.validateVisitor=Si.CstVisitorDefinitionError=Si.createBaseVisitorConstructorWithDefaults=Si.createBaseSemanticVisitorConstructor=Si.defaultVisit=void 0;var ps=Gt(),Nd=ox();function Pq(r,e){for(var t=(0,ps.keys)(r),i=t.length,n=0;n: + `+(""+s.join(` + +`).replace(/\n/g,` + `)))}}};return t.prototype=i,t.prototype.constructor=t,t._RULE_NAMES=e,t}Si.createBaseSemanticVisitorConstructor=mye;function Eye(r,e,t){var i=function(){};(0,Nd.defineNameProp)(i,r+"BaseSemanticsWithDefaults");var n=Object.create(t.prototype);return(0,ps.forEach)(e,function(s){n[s]=Pq}),i.prototype=n,i.prototype.constructor=i,i}Si.createBaseVisitorConstructorWithDefaults=Eye;var ax;(function(r){r[r.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",r[r.MISSING_METHOD=1]="MISSING_METHOD"})(ax=Si.CstVisitorDefinitionError||(Si.CstVisitorDefinitionError={}));function Dq(r,e){var t=kq(r,e),i=Rq(r,e);return t.concat(i)}Si.validateVisitor=Dq;function kq(r,e){var t=(0,ps.map)(e,function(i){if(!(0,ps.isFunction)(r[i]))return{msg:"Missing visitor method: <"+i+"> on "+(0,Nd.functionName)(r.constructor)+" CST Visitor.",type:ax.MISSING_METHOD,methodName:i}});return(0,ps.compact)(t)}Si.validateMissingCstMethods=kq;var Iye=["constructor","visit","validateVisitor"];function Rq(r,e){var t=[];for(var i in r)(0,ps.isFunction)(r[i])&&!(0,ps.contains)(Iye,i)&&!(0,ps.contains)(e,i)&&t.push({msg:"Redundant visitor method: <"+i+"> on "+(0,Nd.functionName)(r.constructor)+` CST Visitor +There is no Grammar Rule corresponding to this method's name. +`,type:ax.REDUNDANT_METHOD,methodName:i});return t}Si.validateRedundantMethods=Rq});var Tq=w(Ey=>{"use strict";Object.defineProperty(Ey,"__esModule",{value:!0});Ey.TreeBuilder=void 0;var sf=Sq(),_r=Gt(),Nq=Fq(),yye=jn(),wye=function(){function r(){}return r.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,_r.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:yye.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=_r.NOOP,this.cstFinallyStateUpdate=_r.NOOP,this.cstPostTerminal=_r.NOOP,this.cstPostNonTerminal=_r.NOOP,this.cstPostRule=_r.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=sf.setNodeLocationFull,this.setNodeLocationFromNode=sf.setNodeLocationFull,this.cstPostRule=_r.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=_r.NOOP,this.setNodeLocationFromNode=_r.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=sf.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=sf.setNodeLocationOnlyOffset,this.cstPostRule=_r.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=_r.NOOP,this.setNodeLocationFromNode=_r.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=_r.NOOP,this.setNodeLocationFromNode=_r.NOOP,this.cstPostRule=_r.NOOP,this.setInitialNodeLocation=_r.NOOP;else throw Error('Invalid config option: "'+e.nodeLocationTracking+'"')},r.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},r.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},r.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.cstInvocationStateUpdate=function(e,t){var i={name:e,children:{}};this.setInitialNodeLocation(i),this.CST_STACK.push(i)},r.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},r.prototype.cstPostRuleFull=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?(i.endOffset=t.endOffset,i.endLine=t.endLine,i.endColumn=t.endColumn):(i.startOffset=NaN,i.startLine=NaN,i.startColumn=NaN)},r.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?i.endOffset=t.endOffset:i.startOffset=NaN},r.prototype.cstPostTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,sf.addTerminalToCst)(i,t,e),this.setNodeLocationFromToken(i.location,t)},r.prototype.cstPostNonTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,sf.addNoneTerminalToCst)(i,t,e),this.setNodeLocationFromNode(i.location,e.location)},r.prototype.getBaseCstVisitorConstructor=function(){if((0,_r.isUndefined)(this.baseCstVisitorConstructor)){var e=(0,Nq.createBaseSemanticVisitorConstructor)(this.className,(0,_r.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},r.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,_r.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){var e=(0,Nq.createBaseVisitorConstructorWithDefaults)(this.className,(0,_r.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},r.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},r.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},r.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},r}();Ey.TreeBuilder=wye});var Oq=w(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});Iy.LexerAdapter=void 0;var Lq=jn(),Bye=function(){function r(){}return r.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(r.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),r.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Lq.END_OF_FILE},r.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Lq.END_OF_FILE:this.tokVector[t]},r.prototype.consumeToken=function(){this.currIdx++},r.prototype.exportLexerState=function(){return this.currIdx},r.prototype.importLexerState=function(e){this.currIdx=e},r.prototype.resetLexerState=function(){this.currIdx=-1},r.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},r.prototype.getLexerPosition=function(){return this.exportLexerState()},r}();Iy.LexerAdapter=Bye});var Kq=w(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});yy.RecognizerApi=void 0;var Mq=Gt(),bye=nf(),Ax=jn(),Qye=xd(),Sye=rx(),vye=mn(),xye=function(){function r(){}return r.prototype.ACTION=function(e){return e.call(this)},r.prototype.consume=function(e,t,i){return this.consumeInternal(t,e,i)},r.prototype.subrule=function(e,t,i){return this.subruleInternal(t,e,i)},r.prototype.option=function(e,t){return this.optionInternal(t,e)},r.prototype.or=function(e,t){return this.orInternal(t,e)},r.prototype.many=function(e,t){return this.manyInternal(e,t)},r.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},r.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},r.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},r.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},r.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},r.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},r.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},r.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},r.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},r.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},r.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},r.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},r.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},r.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},r.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},r.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},r.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},r.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},r.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},r.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},r.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},r.prototype.OPTION=function(e){return this.optionInternal(e,0)},r.prototype.OPTION1=function(e){return this.optionInternal(e,1)},r.prototype.OPTION2=function(e){return this.optionInternal(e,2)},r.prototype.OPTION3=function(e){return this.optionInternal(e,3)},r.prototype.OPTION4=function(e){return this.optionInternal(e,4)},r.prototype.OPTION5=function(e){return this.optionInternal(e,5)},r.prototype.OPTION6=function(e){return this.optionInternal(e,6)},r.prototype.OPTION7=function(e){return this.optionInternal(e,7)},r.prototype.OPTION8=function(e){return this.optionInternal(e,8)},r.prototype.OPTION9=function(e){return this.optionInternal(e,9)},r.prototype.OR=function(e){return this.orInternal(e,0)},r.prototype.OR1=function(e){return this.orInternal(e,1)},r.prototype.OR2=function(e){return this.orInternal(e,2)},r.prototype.OR3=function(e){return this.orInternal(e,3)},r.prototype.OR4=function(e){return this.orInternal(e,4)},r.prototype.OR5=function(e){return this.orInternal(e,5)},r.prototype.OR6=function(e){return this.orInternal(e,6)},r.prototype.OR7=function(e){return this.orInternal(e,7)},r.prototype.OR8=function(e){return this.orInternal(e,8)},r.prototype.OR9=function(e){return this.orInternal(e,9)},r.prototype.MANY=function(e){this.manyInternal(0,e)},r.prototype.MANY1=function(e){this.manyInternal(1,e)},r.prototype.MANY2=function(e){this.manyInternal(2,e)},r.prototype.MANY3=function(e){this.manyInternal(3,e)},r.prototype.MANY4=function(e){this.manyInternal(4,e)},r.prototype.MANY5=function(e){this.manyInternal(5,e)},r.prototype.MANY6=function(e){this.manyInternal(6,e)},r.prototype.MANY7=function(e){this.manyInternal(7,e)},r.prototype.MANY8=function(e){this.manyInternal(8,e)},r.prototype.MANY9=function(e){this.manyInternal(9,e)},r.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},r.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},r.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},r.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},r.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},r.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},r.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},r.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},r.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},r.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},r.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},r.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},r.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},r.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},r.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},r.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},r.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},r.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},r.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},r.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},r.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},r.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},r.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},r.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},r.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},r.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},r.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},r.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},r.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},r.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},r.prototype.RULE=function(e,t,i){if(i===void 0&&(i=Ax.DEFAULT_RULE_CONFIG),(0,Mq.contains)(this.definedRulesNames,e)){var n=Qye.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:n,type:Ax.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,i);return this[e]=o,o},r.prototype.OVERRIDE_RULE=function(e,t,i){i===void 0&&(i=Ax.DEFAULT_RULE_CONFIG);var n=[];n=n.concat((0,Sye.validateRuleIsOverridden)(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(n);var s=this.defineRule(e,t,i);return this[e]=s,s},r.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var i=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if((0,bye.isRecognitionException)(n))return!1;throw n}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}},r.prototype.getGAstProductions=function(){return this.gastProductionsCache},r.prototype.getSerializedGastProductions=function(){return(0,vye.serializeGrammar)((0,Mq.values)(this.gastProductionsCache))},r}();yy.RecognizerApi=xye});var Yq=w(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0});By.RecognizerEngine=void 0;var Pr=Gt(),qn=Cy(),wy=nf(),Uq=kd(),of=Dd(),Hq=jn(),Pye=sx(),Gq=TA(),Td=_g(),Dye=ox(),kye=function(){function r(){}return r.prototype.initRecognizerEngine=function(e,t){if(this.className=(0,Dye.classNameFromInstance)(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Td.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,Pr.has)(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if((0,Pr.isArray)(e)){if((0,Pr.isEmpty)(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if((0,Pr.isArray)(e))this.tokensMap=(0,Pr.reduce)(e,function(o,a){return o[a.name]=a,o},{});else if((0,Pr.has)(e,"modes")&&(0,Pr.every)((0,Pr.flatten)((0,Pr.values)(e.modes)),Td.isTokenType)){var i=(0,Pr.flatten)((0,Pr.values)(e.modes)),n=(0,Pr.uniq)(i);this.tokensMap=(0,Pr.reduce)(n,function(o,a){return o[a.name]=a,o},{})}else if((0,Pr.isObject)(e))this.tokensMap=(0,Pr.cloneObj)(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Gq.EOF;var s=(0,Pr.every)((0,Pr.values)(e),function(o){return(0,Pr.isEmpty)(o.categoryMatches)});this.tokenMatcher=s?Td.tokenStructuredMatcherNoCategories:Td.tokenStructuredMatcher,(0,Td.augmentTokenTypes)((0,Pr.values)(this.tokensMap))},r.prototype.defineRule=function(e,t,i){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var n=(0,Pr.has)(i,"resyncEnabled")?i.resyncEnabled:Hq.DEFAULT_RULE_CONFIG.resyncEnabled,s=(0,Pr.has)(i,"recoveryValueFunc")?i.recoveryValueFunc:Hq.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<t},r.prototype.orInternal=function(e,t){var i=this.getKeyForAutomaticLookahead(qn.OR_IDX,t),n=(0,Pr.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(i),o=s.call(this,n);if(o!==void 0){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},r.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new wy.NotAllInputParsedException(t,e))}},r.prototype.subruleInternal=function(e,t,i){var n;try{var s=i!==void 0?i.ARGS:void 0;return n=e.call(this,t,s),this.cstPostNonTerminal(n,i!==void 0&&i.LABEL!==void 0?i.LABEL:e.ruleName),n}catch(o){this.subruleInternalError(o,i,e.ruleName)}},r.prototype.subruleInternalError=function(e,t,i){throw(0,wy.isRecognitionException)(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:i),delete e.partialCstResult),e},r.prototype.consumeInternal=function(e,t,i){var n;try{var s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),n=s):this.consumeInternalError(e,s,i)}catch(o){n=this.consumeInternalRecovery(e,t,o)}return this.cstPostTerminal(i!==void 0&&i.LABEL!==void 0?i.LABEL:e.name,n),n},r.prototype.consumeInternalError=function(e,t,i){var n,s=this.LA(0);throw i!==void 0&&i.ERR_MSG?n=i.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new wy.MismatchedTokenException(n,t,s))},r.prototype.consumeInternalRecovery=function(e,t,i){if(this.recoveryEnabled&&i.name==="MismatchedTokenException"&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(s){throw s.name===Pye.IN_RULE_RECOVERY_EXCEPTION?i:s}}else throw i},r.prototype.saveRecogState=function(){var e=this.errors,t=(0,Pr.cloneArr)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}},r.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},r.prototype.ruleInvocationStateUpdate=function(e,t,i){this.RULE_OCCURRENCE_STACK.push(i),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},r.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},r.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},r.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},r.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),Gq.EOF)},r.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},r}();By.RecognizerEngine=kye});var qq=w(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});by.ErrorHandler=void 0;var lx=nf(),cx=Gt(),jq=kd(),Rye=jn(),Fye=function(){function r(){}return r.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,cx.has)(e,"errorMessageProvider")?e.errorMessageProvider:Rye.DEFAULT_PARSER_CONFIG.errorMessageProvider},r.prototype.SAVE_ERROR=function(e){if((0,lx.isRecognitionException)(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,cx.cloneArr)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(r.prototype,"errors",{get:function(){return(0,cx.cloneArr)(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),r.prototype.raiseEarlyExitException=function(e,t,i){for(var n=this.getCurrRuleFullName(),s=this.getGAstProductions()[n],o=(0,jq.getLookaheadPathsForOptionalProd)(e,s,t,this.maxLookahead),a=o[0],l=[],c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:l,previous:this.LA(0),customUserDescription:i,ruleName:n});throw this.SAVE_ERROR(new lx.EarlyExitException(u,this.LA(1),this.LA(0)))},r.prototype.raiseNoAltException=function(e,t){for(var i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],s=(0,jq.getLookaheadPathsForOr)(e,n,this.maxLookahead),o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var l=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new lx.NoViableAltException(c,this.LA(1),l))},r}();by.ErrorHandler=Fye});var zq=w(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});Qy.ContentAssist=void 0;var Jq=Dd(),Wq=Gt(),Nye=function(){function r(){}return r.prototype.initContentAssist=function(){},r.prototype.computeContentAssist=function(e,t){var i=this.gastProductionsCache[e];if((0,Wq.isUndefined)(i))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return(0,Jq.nextPossibleTokensAfter)([i],t,this.tokenMatcher,this.maxLookahead)},r.prototype.getNextPossibleTokenTypes=function(e){var t=(0,Wq.first)(e.ruleStack),i=this.getGAstProductions(),n=i[t],s=new Jq.NextAfterTokenWalker(n,e).startWalking();return s},r}();Qy.ContentAssist=Nye});var rJ=w(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0});xy.GastRecorder=void 0;var yn=Gt(),Oo=mn(),Tye=Bd(),_q=_g(),$q=TA(),Lye=jn(),Oye=Cy(),vy={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(vy);var Vq=!0,Xq=Math.pow(2,Oye.BITS_FOR_OCCURRENCE_IDX)-1,eJ=(0,$q.createToken)({name:"RECORDING_PHASE_TOKEN",pattern:Tye.Lexer.NA});(0,_q.augmentTokenTypes)([eJ]);var tJ=(0,$q.createTokenInstance)(eJ,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(tJ);var Mye={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Kye=function(){function r(){}return r.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},r.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var t=function(n){var s=n>0?n:"";e["CONSUME"+s]=function(o,a){return this.consumeInternalRecord(o,n,a)},e["SUBRULE"+s]=function(o,a){return this.subruleInternalRecord(o,n,a)},e["OPTION"+s]=function(o){return this.optionInternalRecord(o,n)},e["OR"+s]=function(o){return this.orInternalRecord(o,n)},e["MANY"+s]=function(o){this.manyInternalRecord(n,o)},e["MANY_SEP"+s]=function(o){this.manySepFirstInternalRecord(n,o)},e["AT_LEAST_ONE"+s]=function(o){this.atLeastOneInternalRecord(n,o)},e["AT_LEAST_ONE_SEP"+s]=function(o){this.atLeastOneSepFirstInternalRecord(n,o)}},i=0;i<10;i++)t(i);e.consume=function(n,s,o){return this.consumeInternalRecord(s,n,o)},e.subrule=function(n,s,o){return this.subruleInternalRecord(s,n,o)},e.option=function(n,s){return this.optionInternalRecord(s,n)},e.or=function(n,s){return this.orInternalRecord(s,n)},e.many=function(n,s){this.manyInternalRecord(n,s)},e.atLeastOne=function(n,s){this.atLeastOneInternalRecord(n,s)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},r.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var t=0;t<10;t++){var i=t>0?t:"";delete e["CONSUME"+i],delete e["SUBRULE"+i],delete e["OPTION"+i],delete e["OR"+i],delete e["MANY"+i],delete e["MANY_SEP"+i],delete e["AT_LEAST_ONE"+i],delete e["AT_LEAST_ONE_SEP"+i]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},r.prototype.ACTION_RECORD=function(e){},r.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},r.prototype.LA_RECORD=function(e){return Lye.END_OF_FILE},r.prototype.topLevelRuleRecord=function(e,t){try{var i=new Oo.Rule({definition:[],name:e});return i.name=e,this.recordingProdStack.push(i),t.call(this),this.recordingProdStack.pop(),i}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}},r.prototype.optionInternalRecord=function(e,t){return Ld.call(this,Oo.Option,e,t)},r.prototype.atLeastOneInternalRecord=function(e,t){Ld.call(this,Oo.RepetitionMandatory,t,e)},r.prototype.atLeastOneSepFirstInternalRecord=function(e,t){Ld.call(this,Oo.RepetitionMandatoryWithSeparator,t,e,Vq)},r.prototype.manyInternalRecord=function(e,t){Ld.call(this,Oo.Repetition,t,e)},r.prototype.manySepFirstInternalRecord=function(e,t){Ld.call(this,Oo.RepetitionWithSeparator,t,e,Vq)},r.prototype.orInternalRecord=function(e,t){return Uye.call(this,e,t)},r.prototype.subruleInternalRecord=function(e,t,i){if(Sy(t),!e||(0,yn.has)(e,"ruleName")===!1){var n=new Error(" argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,yn.peek)(this.recordingProdStack),o=e.ruleName,a=new Oo.NonTerminal({idx:t,nonTerminalName:o,label:i==null?void 0:i.LABEL,referencedRule:void 0});return s.definition.push(a),this.outputCst?Mye:vy},r.prototype.consumeInternalRecord=function(e,t,i){if(Sy(t),!(0,_q.hasShortKeyProperty)(e)){var n=new Error(" argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,yn.peek)(this.recordingProdStack),o=new Oo.Terminal({idx:t,terminalType:e,label:i==null?void 0:i.LABEL});return s.definition.push(o),tJ},r}();xy.GastRecorder=Kye;function Ld(r,e,t,i){i===void 0&&(i=!1),Sy(t);var n=(0,yn.peek)(this.recordingProdStack),s=(0,yn.isFunction)(e)?e:e.DEF,o=new r({definition:[],idx:t});return i&&(o.separator=e.SEP),(0,yn.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),n.definition.push(o),this.recordingProdStack.pop(),vy}function Uye(r,e){var t=this;Sy(e);var i=(0,yn.peek)(this.recordingProdStack),n=(0,yn.isArray)(r)===!1,s=n===!1?r:r.DEF,o=new Oo.Alternation({definition:[],idx:e,ignoreAmbiguities:n&&r.IGNORE_AMBIGUITIES===!0});(0,yn.has)(r,"MAX_LOOKAHEAD")&&(o.maxLookahead=r.MAX_LOOKAHEAD);var a=(0,yn.some)(s,function(l){return(0,yn.isFunction)(l.GATE)});return o.hasPredicates=a,i.definition.push(o),(0,yn.forEach)(s,function(l){var c=new Oo.Alternative({definition:[]});o.definition.push(c),(0,yn.has)(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:(0,yn.has)(l,"GATE")&&(c.ignoreAmbiguities=!0),t.recordingProdStack.push(c),l.ALT.call(t),t.recordingProdStack.pop()}),vy}function Zq(r){return r===0?"":""+r}function Sy(r){if(r<0||r>Xq){var e=new Error("Invalid DSL Method idx value: <"+r+`> + `+("Idx value must be a none negative value smaller than "+(Xq+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var nJ=w(Py=>{"use strict";Object.defineProperty(Py,"__esModule",{value:!0});Py.PerformanceTracer=void 0;var iJ=Gt(),Hye=jn(),Gye=function(){function r(){}return r.prototype.initPerformanceTracer=function(e){if((0,iJ.has)(e,"traceInitPerf")){var t=e.traceInitPerf,i=typeof t=="number";this.traceInitMaxIdent=i?t:1/0,this.traceInitPerf=i?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Hye.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},r.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <"+e+">");var n=(0,iJ.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r}();Py.PerformanceTracer=Gye});var sJ=w(Dy=>{"use strict";Object.defineProperty(Dy,"__esModule",{value:!0});Dy.applyMixins=void 0;function Yye(r,e){e.forEach(function(t){var i=t.prototype;Object.getOwnPropertyNames(i).forEach(function(n){if(n!=="constructor"){var s=Object.getOwnPropertyDescriptor(i,n);s&&(s.get||s.set)?Object.defineProperty(r.prototype,n,s):r.prototype[n]=t.prototype[n]}})})}Dy.applyMixins=Yye});var jn=w(dr=>{"use strict";var AJ=dr&&dr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(dr,"__esModule",{value:!0});dr.EmbeddedActionsParser=dr.CstParser=dr.Parser=dr.EMPTY_ALT=dr.ParserDefinitionErrorType=dr.DEFAULT_RULE_CONFIG=dr.DEFAULT_PARSER_CONFIG=dr.END_OF_FILE=void 0;var en=Gt(),jye=qj(),oJ=TA(),lJ=xd(),aJ=Cq(),qye=sx(),Jye=Qq(),Wye=Tq(),zye=Oq(),Vye=Kq(),Xye=Yq(),Zye=qq(),_ye=zq(),$ye=rJ(),ewe=nJ(),twe=sJ();dr.END_OF_FILE=(0,oJ.createTokenInstance)(oJ.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(dr.END_OF_FILE);dr.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:lJ.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});dr.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var rwe;(function(r){r[r.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",r[r.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",r[r.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",r[r.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",r[r.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",r[r.LEFT_RECURSION=5]="LEFT_RECURSION",r[r.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",r[r.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",r[r.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",r[r.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",r[r.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",r[r.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",r[r.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(rwe=dr.ParserDefinitionErrorType||(dr.ParserDefinitionErrorType={}));function iwe(r){return r===void 0&&(r=void 0),function(){return r}}dr.EMPTY_ALT=iwe;var ky=function(){function r(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(t),i.initLexerAdapter(),i.initLooksAhead(t),i.initRecognizerEngine(e,t),i.initRecoverable(t),i.initTreeBuilder(t),i.initContentAssist(),i.initGastRecorder(t),i.initPerformanceTracer(t),(0,en.has)(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=(0,en.has)(t,"skipValidations")?t.skipValidations:dr.DEFAULT_PARSER_CONFIG.skipValidations}return r.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},r.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var t;e.selfAnalysisDone=!0;var i=e.className;e.TRACE_INIT("toFastProps",function(){(0,en.toFastProperties)(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),(0,en.forEach)(e.definedRulesNames,function(s){var o=e[s],a=o.originalGrammarAction,l=void 0;e.TRACE_INIT(s+" Rule",function(){l=e.topLevelRuleRecord(s,a)}),e.gastProductionsCache[s]=l})}finally{e.disableRecording()}});var n=[];if(e.TRACE_INIT("Grammar Resolving",function(){n=(0,aJ.resolveGrammar)({rules:(0,en.values)(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(n)}),e.TRACE_INIT("Grammar Validations",function(){if((0,en.isEmpty)(n)&&e.skipValidations===!1){var s=(0,aJ.validateGrammar)({rules:(0,en.values)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,en.values)(e.tokensMap),errMsgProvider:lJ.defaultGrammarValidatorErrorProvider,grammarName:i});e.definitionErrors=e.definitionErrors.concat(s)}}),(0,en.isEmpty)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var s=(0,jye.computeAllProdsFollows)((0,en.values)(e.gastProductionsCache));e.resyncFollows=s}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions((0,en.values)(e.gastProductionsCache))})),!r.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,en.isEmpty)(e.definitionErrors))throw t=(0,en.map)(e.definitionErrors,function(s){return s.message}),new Error(`Parser Definition Errors detected: + `+t.join(` +------------------------------- +`))})},r.DEFER_DEFINITION_ERRORS_HANDLING=!1,r}();dr.Parser=ky;(0,twe.applyMixins)(ky,[qye.Recoverable,Jye.LooksAhead,Wye.TreeBuilder,zye.LexerAdapter,Xye.RecognizerEngine,Vye.RecognizerApi,Zye.ErrorHandler,_ye.ContentAssist,$ye.GastRecorder,ewe.PerformanceTracer]);var nwe=function(r){AJ(e,r);function e(t,i){i===void 0&&(i=dr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,en.cloneObj)(i);return s.outputCst=!0,n=r.call(this,t,s)||this,n}return e}(ky);dr.CstParser=nwe;var swe=function(r){AJ(e,r);function e(t,i){i===void 0&&(i=dr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,en.cloneObj)(i);return s.outputCst=!1,n=r.call(this,t,s)||this,n}return e}(ky);dr.EmbeddedActionsParser=swe});var uJ=w(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0});Ry.createSyntaxDiagramsCode=void 0;var cJ=Dv();function owe(r,e){var t=e===void 0?{}:e,i=t.resourceBase,n=i===void 0?"https://unpkg.com/chevrotain@"+cJ.VERSION+"/diagrams/":i,s=t.css,o=s===void 0?"https://unpkg.com/chevrotain@"+cJ.VERSION+"/diagrams/diagrams.css":s,a=` + + + + + +`,l=` + +`,c=` +